]> code.delx.au - gnu-emacs/blobdiff - lisp/simple.el
(Default Simplifications): Add missing ).
[gnu-emacs] / lisp / simple.el
index edf94cfd7d170fd8d1b292f3b9152314519626e6..47e275001d9d641d8956a9a3f0f8f30e8df11309 100644 (file)
@@ -253,13 +253,13 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
 ;;; Internal variable for `next-error-follow-mode-post-command-hook'.
 (defvar next-error-follow-last-line nil)
 
-(define-minor-mode next-error-follow-mode
+(define-minor-mode next-error-follow-minor-mode
   "Minor mode for compilation, occur and diff modes.
-When turned on, cursor motion in the compilation, occur or diff
-buffer determines the cursor in the corresponding buffer to move
-to the corresponding position.  "
+When turned on, cursor motion in the compilation, grep, occur or diff
+buffer causes automatic display of the corresponding source code
+location."
   nil " Fol" nil
-  (if (not next-error-follow-mode)
+  (if (not next-error-follow-minor-mode)
       (remove-hook 'post-command-hook 'next-error-follow-mode-post-command-hook t)
     (add-hook 'post-command-hook 'next-error-follow-mode-post-command-hook nil t)
     (make-variable-buffer-local 'next-error-follow-last-line)))
@@ -282,7 +282,8 @@ to the corresponding position.  "
   "Major mode not specialized for anything in particular.
 Other major modes are defined by comparison with this one."
   (interactive)
-  (kill-all-local-variables))
+  (kill-all-local-variables)
+  (run-hooks 'after-change-major-mode-hook))
 
 ;; Making and deleting lines.
 
@@ -4297,11 +4298,12 @@ to decide what to delete."
                 (not (equal buffer
                             (window-buffer (active-minibuffer-window))))))
        (error "Minibuffer is not active for completion")
+      ;; Set buffer so buffer-local choose-completion-string-functions works.
+      (set-buffer buffer)
       (unless (run-hook-with-args-until-success
               'choose-completion-string-functions
               choice buffer mini-p base-size)
        ;; Insert the completion into the buffer where it was requested.
-       (set-buffer buffer)
        (if base-size
            (delete-region (+ base-size (if mini-p
                                            (minibuffer-prompt-end)