# HG changeset patch # User Karl Fogel # Date 1170916288 0 # Node ID af222c2a16b54fa4946fef60ec0b1e8f30cc14cd # Parent 7dcd1e8402e49c0cdcf608bd731eb56af122860f (fundamental-mode-hook): Declare new hook. (fundamental-mode): Run the new dedicated hook, and don't run after-change-major-mode-hooks manually anymore. diff -r 7dcd1e8402e4 -r af222c2a16b5 lisp/ChangeLog --- a/lisp/ChangeLog Thu Feb 08 02:29:33 2007 +0000 +++ b/lisp/ChangeLog Thu Feb 08 06:31:28 2007 +0000 @@ -1,3 +1,9 @@ +2007-02-08 Karl Fogel + + * emacs/lisp/simple.el (fundamental-mode-hook): Declare new hook. + (fundamental-mode): Run the new dedicated hook, and don't run + after-change-major-mode-hooks manually anymore. + 2007-02-07 Stefan Monnier * vc-svn.el (vc-svn-merge-news): Understand the new format with two diff -r 7dcd1e8402e4 -r af222c2a16b5 lisp/simple.el --- a/lisp/simple.el Thu Feb 08 02:29:33 2007 +0000 +++ b/lisp/simple.el Thu Feb 08 06:31:28 2007 +0000 @@ -382,13 +382,19 @@ ;;; +(defcustom fundamental-mode-hook nil + "Normal hook run for buffers not specialized for anything in particular." + :type 'hook + ;; No group is a perfect fit, but this is probably the closest. + :group 'editing-basics) + (defun fundamental-mode () "Major mode not specialized for anything in particular. -Other major modes are defined by comparison with this one." +Other major modes are defined by comparison with this one. +Entry to this mode runs the normal hook `fundamental-mode-hook'." (interactive) (kill-all-local-variables) - (unless delay-mode-hooks - (run-hooks 'after-change-major-mode-hook))) + (run-mode-hooks 'fundamental-mode-hook)) ;; Making and deleting lines.