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: Mon, 20 Sep 2004 20:43:39 -0400

Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.410 emacs/lisp/subr.el:1.411
*** emacs/lisp/subr.el:1.410    Sun Sep 19 06:07:38 2004
--- emacs/lisp/subr.el  Tue Sep 21 00:37:22 2004
***************
*** 1944,1949 ****
--- 1944,1951 ----
  (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.
+ If `delay-mode-hooks' is nil, run `after-change-major-mode-hook'
+ after running the mode hooks.
  Major mode functions should use this."
    (if delay-mode-hooks
        ;; Delaying case.
***************
*** 1952,1959 ****
      ;; 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)
    "Execute BODY, but delay any `run-mode-hooks'.
--- 1954,1961 ----
      ;; 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)
!     (apply 'run-hooks hooks)
!     (run-hooks 'after-change-major-mode-hook)))
  
  (defmacro delay-mode-hooks (&rest body)
    "Execute BODY, but delay any `run-mode-hooks'.




reply via email to

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