diff options
| author | João Távora | 2020-07-10 01:47:10 +0100 |
|---|---|---|
| committer | João Távora | 2020-07-10 01:47:33 +0100 |
| commit | 9ade7ea7b77ec40c16deb4dff139ce7127a703e2 (patch) | |
| tree | a5932af29cbd9fcdb7e3d95d2c0909211324579a | |
| parent | c86f3fe0d023cdd25edbbce91c5b32654f2b734e (diff) | |
| download | emacs-9ade7ea7b77ec40c16deb4dff139ce7127a703e2.tar.gz emacs-9ade7ea7b77ec40c16deb4dff139ce7127a703e2.zip | |
Fix Eldoc problem when loading on Emacs 26.3
When defining the obsolete variable alias for old
eldoc-documentation-function (which now points to the newer
eldoc-documentation-strategy), one gets the error "don't know how to
make a localized vareiable an alias". I'm not sure, but I suspect
this is because Eldoc is preloaded in Emacs 26.3 and the
eldoc-documentation-function variable is already set locally by some
Elisp buffer.
Uninterning the symbol shortly before defining the alias seems to fix
it.
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function):
Unintern on load.
(Version): Bump to 1.3.0
| -rw-r--r-- | lisp/emacs-lisp/eldoc.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 7c8e0e71175..6420c5cce65 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Noah Friedman <friedman@splode.com> | 5 | ;; Author: Noah Friedman <friedman@splode.com> |
| 6 | ;; Keywords: extensions | 6 | ;; Keywords: extensions |
| 7 | ;; Created: 1995-10-06 | 7 | ;; Created: 1995-10-06 |
| 8 | ;; Version: 1.2.0 | 8 | ;; Version: 1.3.0 |
| 9 | ;; Package-Requires: ((emacs "26.3")) | 9 | ;; Package-Requires: ((emacs "26.3")) |
| 10 | 10 | ||
| 11 | ;; This is a GNU ELPA :core package. Avoid functionality that is not | 11 | ;; This is a GNU ELPA :core package. Avoid functionality that is not |
| @@ -535,6 +535,9 @@ Meant as a value for `eldoc-documentation-strategy'." | |||
| 535 | (if (stringp str) (funcall callback str)) | 535 | (if (stringp str) (funcall callback str)) |
| 536 | nil)))) | 536 | nil)))) |
| 537 | 537 | ||
| 538 | ;; FIXME: The unintern fixes "don't know how to make a localized | ||
| 539 | ;; variable an alias". | ||
| 540 | (unintern 'eldoc-documentation-function) | ||
| 538 | (define-obsolete-variable-alias 'eldoc-documentation-function | 541 | (define-obsolete-variable-alias 'eldoc-documentation-function |
| 539 | 'eldoc-documentation-strategy "eldoc-1.1.0") | 542 | 'eldoc-documentation-strategy "eldoc-1.1.0") |
| 540 | 543 | ||