emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/subr.el


From: Luc Teirlinck
Subject: [Emacs-diffs] Changes to emacs/lisp/subr.el
Date: Sat, 18 Sep 2004 20:03:33 -0400

Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.407 emacs/lisp/subr.el:1.408
*** emacs/lisp/subr.el:1.407    Wed Sep  8 12:24:29 2004
--- emacs/lisp/subr.el  Sat Sep 18 23:57:10 2004
***************
*** 1937,1942 ****
--- 1937,1946 ----
  (make-variable-buffer-local 'delayed-mode-hooks)
  (put 'delay-mode-hooks 'permanent-local t)
  
+ (defvar after-change-major-mode-hook nil
+   "Mode independent hook run after changing major modes.
+ This is run just before the mode dependent hooks.")
+ 
  (defun run-mode-hooks (&rest hooks)
    "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
  Execution is delayed if `delay-mode-hooks' is non-nil.
***************
*** 1948,1953 ****
--- 1952,1958 ----
      ;; Normal case, just run the hook as before plus any delayed hooks.
      (setq hooks (nconc (nreverse delayed-mode-hooks) hooks))
      (setq delayed-mode-hooks nil)
+     (run-hooks 'after-change-major-mode-hook)
      (apply 'run-hooks hooks)))
  
  (defmacro delay-mode-hooks (&rest body)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]