Created
November 4, 2011 17:53
-
-
Save masutaka/1340000 to your computer and use it in GitHub Desktop.
This is my note for buffer-local function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun foo () | |
(interactive) | |
(message "this is a default message.")) | |
(defadvice foo (around my-foo-wrapper) | |
(if (not (and (boundp 'use-my-foo) 'use-my-foo)) | |
ad-do-it | |
(message "this is a special message."))) | |
(ad-activate 'foo) | |
;; in special buffer | |
(set (make-local-variable 'use-my-foo) t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://masutaka.net/chalow/2011-11-05-1.html (Japanese version only)