From 60ed8c727a898dee2c3be447009f31e763c8491a Mon Sep 17 00:00:00 2001 From: Alp Aker Date: Sat, 28 May 2011 15:13:00 -0400 Subject: [PATCH] Use Buffer-menu-buffer-column to replace hard-coded values (Bug#8539). * lisp/buff-menu.el (Buffer-menu-revert-function, Buffer-menu-sort): Use Buffer-menu-buffer-column. --- lisp/ChangeLog | 6 ++++++ lisp/buff-menu.el | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5aeac2b9698..29fb623cba8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ +2011-05-28 Alp Aker (tiny change) + + * buff-menu.el (Buffer-menu-revert-function, Buffer-menu-sort): + Use Buffer-menu-buffer-column (Bug#8539). + 2011-05-28 Chong Yidong + * emacs-lisp/re-builder.el (re-builder): Improve doc (Bug#8286). 2011-05-28 Dima Kogan (tiny change) diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 9886b30d122..6da9d908305 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -278,7 +278,7 @@ Letters do not insert themselves; instead, they are commands. (let ((opoint (point)) (eobp (eobp)) (ocol (current-column)) - (oline (progn (move-to-column 4) + (oline (progn (move-to-column Buffer-menu-buffer-column) (get-text-property (point) 'buffer))) (prop (point-min)) ;; do not make undo records for the reversion. @@ -703,7 +703,11 @@ For more information, see the function `buffer-menu'." (save-excursion (Buffer-menu-beginning) (while (not (eobp)) - (when (buffer-live-p (setq buf (get-text-property (+ (point) 4) 'buffer))) + (when (buffer-live-p + (setq buf (get-text-property + (+ (point) + Buffer-menu-buffer-column) + 'buffer))) (setq m1 (char-after) m1 (if (memq m1 '(?> ?D)) m1) m2 (char-after (+ (point) 2)) @@ -715,7 +719,9 @@ For more information, see the function `buffer-menu'." (save-excursion (Buffer-menu-beginning) (while (not (eobp)) - (when (setq buf (assq (get-text-property (+ (point) 4) 'buffer) l)) + (when (setq buf (assq (get-text-property (+ (point) + Buffer-menu-buffer-column) + 'buffer) l)) (setq m1 (cadr buf) m2 (cadr (cdr buf))) (when m1 -- 2.39.2