[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer functio
From: |
Thierry Volpiatto |
Subject: |
bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function |
Date: |
Fri, 01 Mar 2013 16:22:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Here your patch modified, I have simplified
>> `net-utils-remove-ctrl-m-filter'.
>
> Actually, my patch is already in the trunk. Could you make the patch
> relative to trunk's version?
Ok, this allow reverting from somewhere else (e.g ibuffer, helm):
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index cc28bab..5e27c0e 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -358,7 +358,7 @@ This variable is only used if the variable
;; Todo: This data could be saved in a bookmark.
(defvar net-utils--revert-cmd nil)
-(defun net-utils-run-simple (buffer program-name args)
+(defun net-utils-run-simple (buffer program-name args &optional nodisplay)
"Run a network utility for diagnostic output only."
(with-current-buffer (if (stringp buffer) (get-buffer-create buffer) buffer)
(let ((proc (get-buffer-process (current-buffer))))
@@ -369,13 +369,14 @@ This variable is only used if the variable
(erase-buffer))
(net-utils-mode)
(setq-local net-utils--revert-cmd
- `(net-utils-run-simple ,(current-buffer) ,program-name ,args))
+ `(net-utils-run-simple ,(current-buffer)
+ ,program-name ,args 'nodisplay))
(set-process-filter
(apply 'start-process program-name
(current-buffer) program-name args)
'net-utils-remove-ctrl-m-filter)
(goto-char (point-min))
- (display-buffer (current-buffer))))
+ (unless nodisplay (display-buffer (current-buffer)))))
(defun net-utils--revert-function (&optional ignore-auto noconfirm)
(message "Reverting `%s'..." (buffer-name))
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Thierry Volpiatto, 2013/03/03
bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Thierry Volpiatto, 2013/03/01