[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/so-long-updates 978f37f 5/6: Backwards-compatibility function de
From: |
Phil |
Subject: |
scratch/so-long-updates 978f37f 5/6: Backwards-compatibility function definitions for so-long.el |
Date: |
Sat, 2 Nov 2019 08:23:41 -0400 (EDT) |
branch: scratch/so-long-updates
commit 978f37f8c2e33fdaf9c2f40620b233696a0187e0
Author: Phil Sainty <address@hidden>
Commit: Phil Sainty <address@hidden>
Backwards-compatibility function definitions for so-long.el
* so-long.el (so-long-inhibit-whitespace-mode)
(so-long-make-buffer-read-only, so-long-revert-buffer-read-only)
(so-long-inhibit-global-hl-line-mode): Restore dummy definitions of
now-obsolete hook functions used by earlier versions of so-long.el,
to support users who have saved these symbols in their customized
values for the hooks in question.
---
lisp/so-long.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lisp/so-long.el b/lisp/so-long.el
index ee6f964..355c5c3 100644
--- a/lisp/so-long.el
+++ b/lisp/so-long.el
@@ -1801,6 +1801,23 @@ or call the function `global-so-long-mode'.")
(message "Error unloading so-long: %S %S" (car err) (cdr err))
t))))
+;; Backwards-compatibility definitions.
+;;
+;; The following obsolete functions may exist in the user's customized hook
+;; values dating from versions < 1.0, so we need to ensure that such saved
+;; values will not trigger errors.
+(cl-flet ((ignore () nil))
+ (dolist (hookfunc '((so-long-inhibit-whitespace-mode . so-long-hook)
+ (so-long-make-buffer-read-only . so-long-hook)
+ (so-long-revert-buffer-read-only . so-long-revert-hook)
+ (so-long-inhibit-global-hl-line-mode .
so-long-mode-hook)))
+ (defalias (car hookfunc) #'ignore
+ (format "Obsolete function. It now does nothing.
+
+If it appears in `%s', you should remove it."
+ (cdr hookfunc)))
+ (make-obsolete (car hookfunc) nil "so-long.el version 1.0")))
+
(provide 'so-long)
- branch scratch/so-long-updates created (now 781ab5d), Phil, 2019/11/02
- scratch/so-long-updates 0c61fe0 1/6: ; Documentation and spelling, Phil, 2019/11/02
- scratch/so-long-updates 89157bc 4/6: * lisp/so-long.el (so-long-unload-function): Improved feature unload, Phil, 2019/11/02
- scratch/so-long-updates 6712edc 3/6: ; * lisp/so-long.el (so-long-predicate): Custom type consistency, Phil, 2019/11/02
- scratch/so-long-updates 978f37f 5/6: Backwards-compatibility function definitions for so-long.el,
Phil <=
- scratch/so-long-updates 781ab5d 6/6: Support loading so-long.el on top of an earlier version, Phil, 2019/11/02
- scratch/so-long-updates 571b50c 2/6: Defer triggering `so-long' until the buffer is displayed, Phil, 2019/11/02