[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/rec-mode eaf5e93 60/98: rec-mode: support for a mode ho
From: |
Stefan Monnier |
Subject: |
[elpa] externals/rec-mode eaf5e93 60/98: rec-mode: support for a mode hook. |
Date: |
Thu, 12 Nov 2020 13:18:40 -0500 (EST) |
branch: externals/rec-mode
commit eaf5e93964f00b0d6fb4cfbaa557f8bd64729301
Author: Jose E. Marchesi <jemarch@gnu.org>
Commit: Antoine Kalmbach <ane@iki.fi>
rec-mode: support for a mode hook.
---
etc/rec-mode.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/etc/rec-mode.el b/etc/rec-mode.el
index 2d293cb..08003bc 100644
--- a/etc/rec-mode.el
+++ b/etc/rec-mode.el
@@ -53,6 +53,11 @@ values. The default is `t'."
:type 'boolean
:group 'rec-mode)
+(defcustom rec-mode-hook nil
+ "Hook run when entering rec mode."
+ :type 'hook
+ :group 'rec-mode)
+
(defvar rec-max-lines-in-fields 15
"Values of fields having more than the specified lines will be
hidden by default in navigation mode.")
@@ -2092,7 +2097,10 @@ function returns `nil'."
"A major mode for editing rec files.
Commands:
-\\{rec-mode-map}"
+\\{rec-mode-map}
+
+Turning on rec-mode calls the members of the variable
+`rec-mode-hook' with no args, if that value is is non-nil."
(interactive)
(kill-all-local-variables)
(widen)
@@ -2116,6 +2124,7 @@ Commands:
(set-syntax-table rec-mode-syntax-table)
(setq mode-name "Rec")
(setq major-mode 'rec-mode)
+ (run-hooks 'rec-mode-hooks)
;; Goto the first record of the first type (including the Unknown).
;; If there is a problem (i.e. syntax error) then go to fundamental
;; mode and show the output of recfix in a separated buffer.
- [elpa] externals/rec-mode 2735e99 72/98: rec-mode: avoid extra unused window in fast selection., (continued)
- [elpa] externals/rec-mode 2735e99 72/98: rec-mode: avoid extra unused window in fast selection., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 7e5c145 74/98: rec-mode: use a prefix argument to move N records forward/backward, Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 797445b 77/98: rec-mode: fix a call to string-match-p with invalid arguments., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode ef55915 78/98: rec-mode: support search-insensitive searches., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode b447b39 86/98: rec-mode: require tabulated-list., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode a89b7c2 89/98: rec-mode: split fields by comma and whitespace for summary, Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 3e2f5a7 46/98: rec-mode: support for multiple field names in %type entries., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode ceb00b5 41/98: rec-mode: rec-cmd-edit-field supports a numeric argument., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 9f7a14d 43/98: rec-mode: fix edition of the default record set., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode b149dfc 58/98: rec-mode: avoid trying to delete the sole window in the current frame., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode eaf5e93 60/98: rec-mode: support for a mode hook.,
Stefan Monnier <=
- [elpa] externals/rec-mode 4b485a0 76/98: rec-mode: several fixes while removing byte-compilation warnings., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 80b2815 75/98: rec-mode: fix selection commands when there are more than one record sets on the recfile., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode d97175a 82/98: rec-mode: define faces and use them, Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode e94505f 95/98: README, COPYING, Info fixes, Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 472f378 39/98: rec-mode: initial work for selection., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 20c3d6f 51/98: Do not kill the preceding empty line., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode f106531 62/98: rec-mode: do the right thing when the selected window is the only window in the frame., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 8d404d8 56/98: rec-mode: fixed to allow comments in records., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 113747c 71/98: maint: syntax-check fixes., Stefan Monnier, 2020/11/12
- [elpa] externals/rec-mode 0ea7b18 80/98: rec-mode: quote the shell argument with the file name when invoking recfix., Stefan Monnier, 2020/11/12