[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUGFIX] Point to correct buffer in buffer list [PATCH]
- From: Boruch Baum <boruch_baum@xxxxxxx>
- Date: Wed, 23 May 2018 17:22:46 -0400
- X-ml-name: emacs-w3m
- X-mail-count: 12988
When using `w3m-select-buffer' (C-c C-s) to navigate between emacs-w3m
buffers, point is always at the first line, when it should be at the
line for the current buffer. The attached patch fixes the behavior.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3670
diff -b -u -p -r1.3670 ChangeLog
--- ChangeLog 18 May 2018 07:59:06 -0000 1.3670
+++ ChangeLog 23 May 2018 20:08:49 -0000
@@ -1,3 +1,9 @@
+2018-05-23 Boruch Baum <boruch_baum@xxxxxxx>
+
+ * w3m.el (w3m-select-buffer): Pass correct current buffer value to
+ `w3m-select-buffer-generate-contents'
+ (w3m-select-buffer-generate-contents): Variable rename.
+
2018-05-18 Katsumi Yamaoka <yamaoka@xxxxxxx>
* w3m-proc.el (w3m-process-stop): Don't move point ([emacs-w3m:12976]).
Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1711
diff -b -u -p -r1.1711 w3m.el
--- w3m.el 17 May 2018 04:21:01 -0000 1.1711
+++ w3m.el 23 May 2018 20:08:50 -0000
@@ -11071,10 +11080,11 @@ The following command keys are available
\\{w3m-select-buffer-mode-map}"
(interactive "P")
+ (let ((curbuf (current-buffer)))
(w3m--setup-popup-window toggle w3m-select-buffer-name nomsg)
- (w3m-select-buffer-generate-contents (current-buffer))
+ (w3m-select-buffer-generate-contents curbuf)
(w3m-select-buffer-mode)
- (or nomsg (w3m-message w3m-select-buffer-message)))
+ (or nomsg (w3m-message w3m-select-buffer-message))))
(defun w3m-select-buffer-update (&rest args)
(when (get-buffer-window w3m-select-buffer-name)
@@ -11083,7 +11093,7 @@ The following command keys are available
(when w3m-use-tab
(w3m-force-window-update)))
-(defun w3m-select-buffer-generate-contents (current-buffer)
+(defun w3m-select-buffer-generate-contents (curbuf)
(let ((i 0)
(inhibit-read-only t))
(delete-region (point-min) (point-max))
@@ -11100,7 +11110,7 @@ The following command keys are available
(delete-region (point) (point-max))
(set-buffer-modified-p nil)
(goto-char (or (text-property-any (point-min) (point-max)
- 'w3m-select-buffer current-buffer)
+ 'w3m-select-buffer curbuf)
(point-min)))))
(defvar w3m-select-buffer-mode-map nil)