emacs-diffs
[Top][All Lists]
Advanced

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

master b28f35a 5/8: Backwards-compatibility function definitions for so-


From: Phil
Subject: master b28f35a 5/8: Backwards-compatibility function definitions for so-long.el
Date: Thu, 14 Nov 2019 06:48:02 -0500 (EST)

branch: master
commit b28f35ac65631243b8e29856a2d13e70d2567b53
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 5c9711b..982a699 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)
 



reply via email to

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