[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] fix/bug-35351 95cea37: fixup! Add :before-hook keyword to
From: |
Phil |
Subject: |
[Emacs-diffs] fix/bug-35351 95cea37: fixup! Add :before-hook keyword to define-derived-mode |
Date: |
Mon, 22 Apr 2019 19:19:10 -0400 (EDT) |
branch: fix/bug-35351
commit 95cea37fcd7494d9d9c63eda569c6cbd5bde9a03
Author: Phil Sainty <address@hidden>
Commit: Phil Sainty <address@hidden>
fixup! Add :before-hook keyword to define-derived-mode
Run :before-hook right away, rather than using change-major-mode-hook.
This changes the :before-hook sequence to child-before-parent rather
than parent-before-child.
---
lisp/emacs-lisp/derived.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 00aa70a..6934d1d 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -139,7 +139,8 @@ BODY can start with a bunch of keyword arguments. The
following keyword
A nil value means to simply use the same abbrev-table as the parent.
:before-hook FORM
A single lisp form which will be evaluated before anything else
- happens in `change-major-mode-hook'. It should not be quoted.
+ happens (i.e. before `change-major-mode-hook'). It should not be
+ quoted.
:after-hook FORM
A single lisp form which is evaluated after the mode hooks have been
run. It should not be quoted.
@@ -247,8 +248,7 @@ No problems result if this variable is not bound.
,docstring
(interactive)
,@(when before-hook
- `((add-hook 'change-major-mode-hook (lambda () ,before-hook)
- nil t)))
+ `(,before-hook))
; Run the parent.
(delay-mode-hooks
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] fix/bug-35351 95cea37: fixup! Add :before-hook keyword to define-derived-mode,
Phil <=