summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-08-22 00:14:07 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-08-22 00:14:07 +0200
commitae5fe348fb481c88bb2447197098ed9a47f128d6 (patch)
treeee84d981c98dadc39b6c667fba60063dce7819d6 /lisp/emacs-lisp
parent29a989c02089162dd30132ab80e6eb4afb224446 (diff)
downloademacs-ae5fe348fb481c88bb2447197098ed9a47f128d6.tar.gz
emacs-ae5fe348fb481c88bb2447197098ed9a47f128d6.tar.bz2
emacs-ae5fe348fb481c88bb2447197098ed9a47f128d6.zip
Revert "Make the generalized buffer-local-variable obsolete"
This reverts commit bfe222288e02472bff0e1ab5ba7ef26af6a2769a. This led to the local modes not working.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el1
-rw-r--r--lisp/emacs-lisp/gv.el25
2 files changed, 12 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index ebc9aa75e56..5dde2d2bfbb 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1355,7 +1355,6 @@ FORMAT and ARGS are as in `byte-compile-warn'."
(let ((byte-compile-form-stack (cons arg byte-compile-form-stack)))
(apply #'byte-compile-warn format args)))
-;;;###autoload
(defun byte-compile-warn-obsolete (symbol type)
"Warn that SYMBOL (a variable, function or generalized variable) is obsolete.
TYPE is a string that say which one of these three types it is."
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index db902d9db8c..0c374ec5e37 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -141,18 +141,6 @@ all the parts of PLACE that can be evaluated and then runs E.
(declare (indent 2) (debug (sexp form def-body)))
`(gv-get ,place (lambda ,vars ,@body)))
-(defun make-obsolete-generalized-variable (obsolete-name current-name when)
- "Make byte-compiler warn that generalized variable OBSOLETE-NAME is obsolete.
-The warning will say that CURRENT-NAME should be used instead.
-
-If CURRENT-NAME is a string, that is the `use instead' message.
-
-WHEN should be a string indicating when the variable was first
-made obsolete, for example a date or a release number."
- (put obsolete-name 'byte-obsolete-generalized-variable
- (purecopy (list current-name when)))
- obsolete-name)
-
;; Different ways to declare a generalized variable.
;;;###autoload
(defmacro gv-define-expander (name handler)
@@ -407,7 +395,6 @@ The return value is the last VAL in the list.
(gv-define-setter buffer-local-value (val var buf)
(macroexp-let2 nil v val
`(with-current-buffer ,buf (set (make-local-variable ,var) ,v))))
-(make-obsolete-generalized-variable 'buffer-local-value nil "29.1")
(gv-define-expander alist-get
(lambda (do key alist &optional default remove testfn)
@@ -632,6 +619,18 @@ REF must have been previously obtained with `gv-ref'."
;;; Generalized variables.
+(defun make-obsolete-generalized-variable (obsolete-name current-name when)
+ "Make byte-compiler warn that generalized variable OBSOLETE-NAME is obsolete.
+The warning will say that CURRENT-NAME should be used instead.
+
+If CURRENT-NAME is a string, that is the `use instead' message.
+
+WHEN should be a string indicating when the variable was first
+made obsolete, for example a date or a release number."
+ (put obsolete-name 'byte-obsolete-generalized-variable
+ (purecopy (list current-name when)))
+ obsolete-name)
+
;; Some Emacs-related place types.
(gv-define-simple-setter buffer-file-name set-visited-file-name t)
(make-obsolete-generalized-variable