diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-04-20 12:24:04 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-04-20 12:24:04 -0400 |
commit | bcd7a0a4c55f8226e9322d1ef438040fed2dc57e (patch) | |
tree | 54f28f5694dddc8f391eed169515992bbb46cacb /lisp/progmodes/gud.el | |
parent | 806bda47ddb469f6206ecc533458eadae6a5b575 (diff) | |
download | emacs-bcd7a0a4c55f8226e9322d1ef438040fed2dc57e.tar.gz emacs-bcd7a0a4c55f8226e9322d1ef438040fed2dc57e.tar.bz2 emacs-bcd7a0a4c55f8226e9322d1ef438040fed2dc57e.zip |
Use add/remove-function to manipulate process-filters.
* lisp/emacs-lisp/nadvice.el (advice--where-alist): Add :override.
(remove-function): Autoload.
* lisp/comint.el (comint-redirect-original-filter-function): Remove.
(comint-redirect-cleanup, comint-redirect-send-command-to-process):
* lisp/vc/vc-cvs.el (vc-cvs-annotate-process-filter,vc-cvs-annotate-command):
* lisp/progmodes/octave-inf.el (inferior-octave-send-list-and-digest):
* lisp/progmodes/prolog.el (prolog-consult-compile):
* lisp/progmodes/gdb-mi.el (gdb, gdb--check-interpreter):
Use add/remove-function instead.
* lisp/progmodes/gud.el (gud-tooltip-original-filter): Remove.
(gud-tooltip-process-output, gud-tooltip-tips):
Use add/remove-function instead.
* lisp/progmodes/xscheme.el (xscheme-previous-process-state): Remove.
(scheme-interaction-mode, exit-scheme-interaction-mode):
Use add/remove-function instead.
* lisp/vc/vc-dispatcher.el: Use lexical-binding.
(vc--process-sentinel): Rename from vc-process-sentinel.
Change last arg to be the code to run. Don't use vc-previous-sentinel
and vc-sentinel-commands any more.
(vc-exec-after): Allow code to be a function. Use add/remove-function.
(compilation-error-regexp-alist, view-old-buffer-read-only): Declare.
Diffstat (limited to 'lisp/progmodes/gud.el')
-rw-r--r-- | lisp/progmodes/gud.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 4e31c5e827c..6076f88dea6 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3387,9 +3387,6 @@ ACTIVATEP non-nil means activate mouse motion events." ;;; Tips for `gud' -(defvar gud-tooltip-original-filter nil - "Process filter to restore after GUD output has been received.") - (defvar gud-tooltip-dereference nil "Non-nil means print expressions with a `*' in front of them. For C this would dereference a pointer expression.") @@ -3423,7 +3420,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference." ; gdb-mi.el gets round this problem. (defun gud-tooltip-process-output (process output) "Process debugger output and show it in a tooltip window." - (set-process-filter process gud-tooltip-original-filter) + (remove-function (process-filter process) #'gud-tooltip-process-output) (tooltip-show (tooltip-strip-prompt process output) (or gud-tooltip-echo-area tooltip-use-echo-area))) @@ -3490,8 +3487,8 @@ so they have been disabled.")) (gdb-input (concat cmd "\n") `(lambda () (gdb-tooltip-print ,expr)))) - (setq gud-tooltip-original-filter (process-filter process)) - (set-process-filter process 'gud-tooltip-process-output) + (add-function :override (process-filter process) + #'gud-tooltip-process-output) (gud-basic-call cmd)) expr)))))))) |