diff options
| author | Dmitry Gutov | 2016-07-18 02:17:06 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2016-07-18 02:17:06 +0300 |
| commit | 6dc0bafd5915b01a341cc0efbc744abd73163872 (patch) | |
| tree | 144cbae0699d60ecde3569407043d5c853a20713 | |
| parent | 02ca5db040b57ca4a36c317fcb3fb56f43ab371e (diff) | |
| download | emacs-6dc0bafd5915b01a341cc0efbc744abd73163872.tar.gz emacs-6dc0bafd5915b01a341cc0efbc744abd73163872.zip | |
; Revert "Use eldoc-documentation-functions"
This reverts commit 001d88b62ecb8163a148656acb103b354ce7613a.
It doesn't have the consensus, as evidenced by
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00138.html
| -rw-r--r-- | lisp/hexl.el | 4 | ||||
| -rw-r--r-- | lisp/ielm.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/cfengine.el | 15 | ||||
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 14 | ||||
| -rw-r--r-- | lisp/simple.el | 4 |
7 files changed, 23 insertions, 27 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el index 61d7dd0f310..5f099a5afd5 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el | |||
| @@ -395,8 +395,8 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. | |||
| 395 | (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) | 395 | (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) |
| 396 | 396 | ||
| 397 | ;; Set a callback function for eldoc. | 397 | ;; Set a callback function for eldoc. |
| 398 | (add-hook 'eldoc-documentation-functions | 398 | (add-function :before-until (local 'eldoc-documentation-function) |
| 399 | #'hexl-print-current-point-info nil t) | 399 | #'hexl-print-current-point-info) |
| 400 | (eldoc-add-command-completions "hexl-") | 400 | (eldoc-add-command-completions "hexl-") |
| 401 | (eldoc-remove-command "hexl-save-buffer" | 401 | (eldoc-remove-command "hexl-save-buffer" |
| 402 | "hexl-current-address") | 402 | "hexl-current-address") |
diff --git a/lisp/ielm.el b/lisp/ielm.el index 278a63724a3..dd02778b417 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el | |||
| @@ -541,8 +541,8 @@ Customized bindings may be defined in `ielm-map', which currently contains: | |||
| 541 | (set (make-local-variable 'completion-at-point-functions) | 541 | (set (make-local-variable 'completion-at-point-functions) |
| 542 | '(comint-replace-by-expanded-history | 542 | '(comint-replace-by-expanded-history |
| 543 | ielm-complete-filename elisp-completion-at-point)) | 543 | ielm-complete-filename elisp-completion-at-point)) |
| 544 | (add-hook 'eldoc-documentation-functions | 544 | (add-function :before-until (local 'eldoc-documentation-function) |
| 545 | #'elisp-eldoc-documentation-function nil t) | 545 | #'elisp-eldoc-documentation-function) |
| 546 | (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) | 546 | (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) |
| 547 | (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only) | 547 | (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only) |
| 548 | (setq comint-get-old-input 'ielm-get-old-input) | 548 | (setq comint-get-old-input 'ielm-get-old-input) |
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index ace012ff645..08302147204 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el | |||
| @@ -1390,15 +1390,12 @@ to the action header." | |||
| 1390 | (when buffer-file-name | 1390 | (when buffer-file-name |
| 1391 | (shell-quote-argument buffer-file-name))))) | 1391 | (shell-quote-argument buffer-file-name))))) |
| 1392 | 1392 | ||
| 1393 | (if (boundp 'eldoc-documentation-functions) | 1393 | ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to |
| 1394 | (add-hook 'eldoc-documentation-functions | 1394 | ;; nil. |
| 1395 | #'cfengine3-documentation-function nil t) | 1395 | (or eldoc-documentation-function |
| 1396 | ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to | 1396 | (setq-local eldoc-documentation-function #'ignore)) |
| 1397 | ;; nil. | 1397 | (add-function :before-until (local 'eldoc-documentation-function) |
| 1398 | (or eldoc-documentation-function | 1398 | #'cfengine3-documentation-function) |
| 1399 | (setq-local eldoc-documentation-function #'ignore)) | ||
| 1400 | (add-function :before-until (local 'eldoc-documentation-function) | ||
| 1401 | #'cfengine3-documentation-function)) | ||
| 1402 | 1399 | ||
| 1403 | (add-hook 'completion-at-point-functions | 1400 | (add-hook 'completion-at-point-functions |
| 1404 | #'cfengine3-completion-function nil t) | 1401 | #'cfengine3-completion-function nil t) |
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 5f9bdaccd0f..f3607911aa1 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -235,8 +235,8 @@ Blank lines separate paragraphs. Semicolons start comments. | |||
| 235 | (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs)) | 235 | (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs)) |
| 236 | (setq-local electric-quote-string t) | 236 | (setq-local electric-quote-string t) |
| 237 | (setq imenu-case-fold-search nil) | 237 | (setq imenu-case-fold-search nil) |
| 238 | (add-hook 'eldoc-documentation-functions | 238 | (add-function :before-until (local 'eldoc-documentation-function) |
| 239 | #'elisp-eldoc-documentation-function nil t) | 239 | #'elisp-eldoc-documentation-function) |
| 240 | (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) | 240 | (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) |
| 241 | (setq-local project-vc-external-roots-function #'elisp-load-path-roots) | 241 | (setq-local project-vc-external-roots-function #'elisp-load-path-roots) |
| 242 | (add-hook 'completion-at-point-functions | 242 | (add-hook 'completion-at-point-functions |
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index b9a86e7bbcd..4f223f2f3cc 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -596,7 +596,8 @@ Key bindings: | |||
| 596 | (add-hook 'before-save-hook 'octave-sync-function-file-names nil t) | 596 | (add-hook 'before-save-hook 'octave-sync-function-file-names nil t) |
| 597 | (setq-local beginning-of-defun-function 'octave-beginning-of-defun) | 597 | (setq-local beginning-of-defun-function 'octave-beginning-of-defun) |
| 598 | (and octave-font-lock-texinfo-comment (octave-font-lock-texinfo-comment)) | 598 | (and octave-font-lock-texinfo-comment (octave-font-lock-texinfo-comment)) |
| 599 | (add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t) | 599 | (add-function :before-until (local 'eldoc-documentation-function) |
| 600 | 'octave-eldoc-function) | ||
| 600 | 601 | ||
| 601 | (easy-menu-add octave-mode-menu)) | 602 | (easy-menu-add octave-mode-menu)) |
| 602 | 603 | ||
| @@ -732,7 +733,7 @@ Key bindings: | |||
| 732 | (setq font-lock-defaults '(inferior-octave-font-lock-keywords nil nil)) | 733 | (setq font-lock-defaults '(inferior-octave-font-lock-keywords nil nil)) |
| 733 | 734 | ||
| 734 | (setq-local info-lookup-mode 'octave-mode) | 735 | (setq-local info-lookup-mode 'octave-mode) |
| 735 | (add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t) | 736 | (setq-local eldoc-documentation-function 'octave-eldoc-function) |
| 736 | 737 | ||
| 737 | (setq-local comint-input-ring-file-name | 738 | (setq-local comint-input-ring-file-name |
| 738 | (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist")) | 739 | (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist")) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ba3cdfe17cd..ad69f8779e0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -5153,14 +5153,12 @@ returned as is." | |||
| 5153 | (current-column)))) | 5153 | (current-column)))) |
| 5154 | (^ '(- (1+ (current-indentation)))))) | 5154 | (^ '(- (1+ (current-indentation)))))) |
| 5155 | 5155 | ||
| 5156 | (if (boundp 'eldoc-documentation-functions) | 5156 | (if (null eldoc-documentation-function) |
| 5157 | (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t) | 5157 | ;; Emacs<25 |
| 5158 | (if (null eldoc-documentation-function) | 5158 | (set (make-local-variable 'eldoc-documentation-function) |
| 5159 | ;; Emacs<25 | 5159 | #'python-eldoc-function) |
| 5160 | (set (make-local-variable 'eldoc-documentation-function) | 5160 | (add-function :before-until (local 'eldoc-documentation-function) |
| 5161 | #'python-eldoc-function) | 5161 | #'python-eldoc-function)) |
| 5162 | (add-function :before-until (local 'eldoc-documentation-function) | ||
| 5163 | #'python-eldoc-function))) | ||
| 5164 | 5162 | ||
| 5165 | (add-to-list | 5163 | (add-to-list |
| 5166 | 'hs-special-modes-alist | 5164 | 'hs-special-modes-alist |
diff --git a/lisp/simple.el b/lisp/simple.el index 06d1b927e15..a757876328b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1443,8 +1443,8 @@ result of expression evaluation." | |||
| 1443 | (minibuffer-with-setup-hook | 1443 | (minibuffer-with-setup-hook |
| 1444 | (lambda () | 1444 | (lambda () |
| 1445 | ;; FIXME: call emacs-lisp-mode? | 1445 | ;; FIXME: call emacs-lisp-mode? |
| 1446 | (add-hook 'eldoc-documentation-functions | 1446 | (add-function :before-until (local 'eldoc-documentation-function) |
| 1447 | #'elisp-eldoc-documentation-function nil t) | 1447 | #'elisp-eldoc-documentation-function) |
| 1448 | (add-hook 'completion-at-point-functions | 1448 | (add-hook 'completion-at-point-functions |
| 1449 | #'elisp-completion-at-point nil t) | 1449 | #'elisp-completion-at-point nil t) |
| 1450 | (run-hooks 'eval-expression-minibuffer-setup-hook)) | 1450 | (run-hooks 'eval-expression-minibuffer-setup-hook)) |