From: Leo Liu Date: Mon, 19 Sep 2011 18:57:55 +0000 (-0400) Subject: Fixes for Occur Edit mode. X-Git-Tag: emacs-pretest-24.0.90~82 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=08d355e3eb01f875e64828e5eabea56f874567f1;p=emacs.git Fixes for Occur Edit mode. * replace.el (occur-revert-arguments): Make it permanent-local. (occur-mode): Don't call font-lock-defontify. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dcc91e9572a..54b8e1ff7a2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-19 Leo Liu + + * replace.el (occur-revert-arguments): Make it permanent-local. + (occur-mode): Don't call font-lock-defontify. + 2011-09-19 Chong Yidong * net/ldap.el (ldap-search-internal): Don't push empty search diff --git a/lisp/replace.el b/lisp/replace.el index 455e1a511e8..bf6425f4099 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -826,6 +826,8 @@ a previously found match." (defvar occur-revert-arguments nil "Arguments to pass to `occur-1' to revert an Occur mode buffer. See `occur-revert-function'.") +(make-variable-buffer-local 'occur-revert-arguments) +(put 'occur-revert-arguments 'permanent-local t) (defcustom occur-mode-hook '(turn-on-font-lock) "Hook run when entering Occur mode." @@ -853,8 +855,6 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. \\{occur-mode-map}" (set (make-local-variable 'revert-buffer-function) 'occur-revert-function) - (make-local-variable 'occur-revert-arguments) - (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) (setq next-error-function 'occur-next-error)) @@ -876,7 +876,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. In this mode, changes to the *Occur* buffer are also applied to the originating buffer. -To return to ordinary Occur mode, use \\[occur-mode]." +To return to ordinary Occur mode, use \\[occur-cease-edit]." (setq buffer-read-only nil) (add-hook 'after-change-functions 'occur-after-change-function nil t) (message (substitute-command-keys