From 3faea23ac18c8921bb4f083ca9bc039e91aec3e5 Mon Sep 17 00:00:00 2001 From: Karl Fogel Date: Thu, 8 Feb 2007 06:31:28 +0000 Subject: [PATCH] (fundamental-mode-hook): Declare new hook. (fundamental-mode): Run the new dedicated hook, and don't run after-change-major-mode-hooks manually anymore. --- lisp/ChangeLog | 6 ++++++ lisp/simple.el | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41b1295ef37..8d7615e325b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/simple.el b/lisp/simple.el index 6f4f5eb4073..dcd70b5b308 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -382,13 +382,19 @@ location." ;;; +(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. -- 2.39.2