aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2016-11-22 09:21:03 +0100
committerMichael Albinus2016-11-22 09:21:03 +0100
commit2043e6004cac26b8cfacf079cd31a1caa11a699d (patch)
tree1d2bd62e55ef637b1e7349cbd4cf5619cabed60f
parent4f9fdb730ed8a1476698b5b1c9b11f4ebfdc1f63 (diff)
parent16e705bb56dc09278cd537a3763d867ab66f20a4 (diff)
downloademacs-2043e6004cac26b8cfacf079cd31a1caa11a699d.tar.gz
emacs-2043e6004cac26b8cfacf079cd31a1caa11a699d.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
-rw-r--r--doc/emacs/buffers.texi12
-rw-r--r--etc/NEWS18
-rw-r--r--lisp/bs.el43
-rw-r--r--lisp/buff-menu.el46
-rw-r--r--lisp/ebuff-menu.el3
-rw-r--r--lisp/emacs-lisp/tabulated-list.el6
-rw-r--r--lisp/htmlfontify.el30
-rw-r--r--lisp/ibuffer.el14
8 files changed, 142 insertions, 30 deletions
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index 2eb837f1510..c70e583b9ed 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -411,6 +411,18 @@ Remove all flags from the current line, and move down
411@kindex DEL @r{(Buffer Menu)} 411@kindex DEL @r{(Buffer Menu)}
412Move to the previous line and remove all flags on that line 412Move to the previous line and remove all flags on that line
413(@code{Buffer-menu-backup-unmark}). 413(@code{Buffer-menu-backup-unmark}).
414
415@item M-@key{DEL}
416@findex Buffer-menu-unmark-all-buffers
417@kindex M-DEL @r{(Buffer Menu)}
418Remove a particular flag from all lines
419(@code{Buffer-menu-unmark-all-buffers}).
420
421@item U
422@findex Buffer-menu-unmark-all
423@kindex U @r{(Buffer Menu)}
424Remove all flags from all the lines
425(@code{Buffer-menu-unmark-all}).
414@end table 426@end table
415 427
416@noindent 428@noindent
diff --git a/etc/NEWS b/etc/NEWS
index 619d56ba7b7..02e93e4f9fb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -283,6 +283,24 @@ the file's actual content before prompting the user.
283 283
284* Changes in Specialized Modes and Packages in Emacs 26.1 284* Changes in Specialized Modes and Packages in Emacs 26.1
285 285
286** Electric-Buffer-menu
287
288+++
289*** Key 'U' is bound to 'Buffer-menu-unmark-all' and key 'M-DEL' is
290bound to 'Buffer-menu-unmark-all-buffers'.
291
292** bs
293
294---
295*** Two new commands 'bs-unmark-all', bound to 'U', and
296'bs-unmark-previous', bound to <backspace>.
297
298** Buffer-menu
299
300+++
301*** Two new commands 'Buffer-menu-unmark-all', bound to 'U' and
302'Buffer-menu-unmark-all-buffers', bound to 'M-DEL'.
303
286** Ibuffer 304** Ibuffer
287 305
288--- 306---
diff --git a/lisp/bs.el b/lisp/bs.el
index 835116912d4..d05a568197c 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -491,6 +491,8 @@ Used internally, only.")
491 (define-key map "t" 'bs-visit-tags-table) 491 (define-key map "t" 'bs-visit-tags-table)
492 (define-key map "m" 'bs-mark-current) 492 (define-key map "m" 'bs-mark-current)
493 (define-key map "u" 'bs-unmark-current) 493 (define-key map "u" 'bs-unmark-current)
494 (define-key map "U" 'bs-unmark-all)
495 (define-key map "\177" 'bs-unmark-previous)
494 (define-key map ">" 'scroll-right) 496 (define-key map ">" 'scroll-right)
495 (define-key map "<" 'scroll-left) 497 (define-key map "<" 'scroll-left)
496 (define-key map "?" 'bs-help) 498 (define-key map "?" 'bs-help)
@@ -635,6 +637,8 @@ For faster navigation each digit key is a digit argument.
635\\[bs-clear-modified] -- clear modified-flag on that buffer. 637\\[bs-clear-modified] -- clear modified-flag on that buffer.
636\\[bs-mark-current] -- mark current line's buffer to be displayed. 638\\[bs-mark-current] -- mark current line's buffer to be displayed.
637\\[bs-unmark-current] -- unmark current line's buffer to be displayed. 639\\[bs-unmark-current] -- unmark current line's buffer to be displayed.
640\\[bs-unmark-all] -- unmark all buffer lines.
641\\[bs-unmark-previous] -- unmark previous line's buffer to be displayed.
638\\[bs-show-sorted] -- display buffer list sorted by next sort aspect. 642\\[bs-show-sorted] -- display buffer list sorted by next sort aspect.
639\\[bs-set-configuration-and-refresh] -- ask user for a configuration and \ 643\\[bs-set-configuration-and-refresh] -- ask user for a configuration and \
640apply selected configuration. 644apply selected configuration.
@@ -867,7 +871,7 @@ the status of buffer on current line."
867(defun bs-mark-current (count) 871(defun bs-mark-current (count)
868 "Mark buffers. 872 "Mark buffers.
869COUNT is the number of buffers to mark. 873COUNT is the number of buffers to mark.
870Move cursor vertically down COUNT lines." 874Move point vertically down COUNT lines."
871 (interactive "p") 875 (interactive "p")
872 (bs--mark-unmark count 876 (bs--mark-unmark count
873 (lambda (buf) 877 (lambda (buf)
@@ -876,12 +880,39 @@ Move cursor vertically down COUNT lines."
876(defun bs-unmark-current (count) 880(defun bs-unmark-current (count)
877 "Unmark buffers. 881 "Unmark buffers.
878COUNT is the number of buffers to unmark. 882COUNT is the number of buffers to unmark.
879Move cursor vertically down COUNT lines." 883Move point vertically down COUNT lines."
880 (interactive "p") 884 (interactive "p")
881 (bs--mark-unmark count 885 (bs--mark-unmark count
882 (lambda (buf) 886 (lambda (buf)
883 (setq bs--marked-buffers (delq buf bs--marked-buffers))))) 887 (setq bs--marked-buffers (delq buf bs--marked-buffers)))))
884 888
889(defun bs-unmark-previous (count)
890 "Unmark previous COUNT buffers.
891Move point vertically up COUNT lines.
892When called interactively a numeric prefix argument sets COUNT."
893 (interactive "p")
894 (forward-line (- count))
895 (save-excursion (bs-unmark-current count)))
896
897(defun bs-unmark-all ()
898 "Unmark all buffers."
899 (interactive)
900 (let ((marked (string-to-char bs-string-marked))
901 (current (string-to-char bs-string-current))
902 (marked-cur (string-to-char bs-string-current-marked))
903 (unmarked (string-to-char bs-string-show-normally))
904 (inhibit-read-only t))
905 (save-excursion
906 (goto-char (point-min))
907 (forward-line 2)
908 (while (not (eobp))
909 (if (eq (char-after) marked)
910 (subst-char-in-region (point) (1+ (point)) marked unmarked)
911 (when (eq (char-after) marked-cur)
912 (subst-char-in-region (point) (1+ (point)) marked-cur current)))
913 (forward-line 1))
914 (setq bs--marked-buffers nil))))
915
885(defun bs--show-config-message (what) 916(defun bs--show-config-message (what)
886 "Show message indicating the new showing status WHAT. 917 "Show message indicating the new showing status WHAT.
887WHAT is a value of nil, `never', or `always'." 918WHAT is a value of nil, `never', or `always'."
@@ -973,14 +1004,14 @@ Uses function `read-only-mode'."
973 (apply fun args))) 1004 (apply fun args)))
974 1005
975(defun bs-up (arg) 1006(defun bs-up (arg)
976 "Move cursor vertically up ARG lines in Buffer Selection Menu." 1007 "Move point vertically up ARG lines in Buffer Selection Menu."
977 (interactive "p") 1008 (interactive "p")
978 (if (and arg (numberp arg) (< arg 0)) 1009 (if (and arg (numberp arg) (< arg 0))
979 (bs--nth-wrapper (- arg) 'bs--down) 1010 (bs--nth-wrapper (- arg) 'bs--down)
980 (bs--nth-wrapper arg 'bs--up))) 1011 (bs--nth-wrapper arg 'bs--up)))
981 1012
982(defun bs--up () 1013(defun bs--up ()
983 "Move cursor vertically up one line. 1014 "Move point vertically up one line.
984If on top of buffer list go to last line." 1015If on top of buffer list go to last line."
985 (if (> (count-lines 1 (point)) bs-header-lines-length) 1016 (if (> (count-lines 1 (point)) bs-header-lines-length)
986 (forward-line -1) 1017 (forward-line -1)
@@ -989,14 +1020,14 @@ If on top of buffer list go to last line."
989 (recenter -1))) 1020 (recenter -1)))
990 1021
991(defun bs-down (arg) 1022(defun bs-down (arg)
992 "Move cursor vertically down ARG lines in Buffer Selection Menu." 1023 "Move point vertically down ARG lines in Buffer Selection Menu."
993 (interactive "p") 1024 (interactive "p")
994 (if (and arg (numberp arg) (< arg 0)) 1025 (if (and arg (numberp arg) (< arg 0))
995 (bs--nth-wrapper (- arg) 'bs--up) 1026 (bs--nth-wrapper (- arg) 'bs--up)
996 (bs--nth-wrapper arg 'bs--down))) 1027 (bs--nth-wrapper arg 'bs--down)))
997 1028
998(defun bs--down () 1029(defun bs--down ()
999 "Move cursor vertically down one line. 1030 "Move point vertically down one line.
1000If at end of buffer list go to first line." 1031If at end of buffer list go to first line."
1001 (if (eq (line-end-position) (point-max)) 1032 (if (eq (line-end-position) (point-max))
1002 (progn 1033 (progn
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 47426285c80..e2aa2da0388 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -37,6 +37,12 @@
37 :group 'tools 37 :group 'tools
38 :group 'convenience) 38 :group 'convenience)
39 39
40(defvar Buffer-menu-marker-char ?>
41 "The mark character for marked buffers.")
42
43(defvar Buffer-menu-del-char ?D
44 "Character used to flag buffers for deletion.")
45
40(defcustom Buffer-menu-use-header-line t 46(defcustom Buffer-menu-use-header-line t
41 "If non-nil, use the header line to display Buffer Menu column titles." 47 "If non-nil, use the header line to display Buffer Menu column titles."
42 :type 'boolean 48 :type 'boolean
@@ -121,6 +127,8 @@ commands.")
121 (define-key map "\177" 'Buffer-menu-backup-unmark) 127 (define-key map "\177" 'Buffer-menu-backup-unmark)
122 (define-key map "~" 'Buffer-menu-not-modified) 128 (define-key map "~" 'Buffer-menu-not-modified)
123 (define-key map "u" 'Buffer-menu-unmark) 129 (define-key map "u" 'Buffer-menu-unmark)
130 (define-key map "\M-\177" 'Buffer-menu-unmark-all-buffers)
131 (define-key map "U" 'Buffer-menu-unmark-all)
124 (define-key map "m" 'Buffer-menu-mark) 132 (define-key map "m" 'Buffer-menu-mark)
125 (define-key map "t" 'Buffer-menu-visit-tags-table) 133 (define-key map "t" 'Buffer-menu-visit-tags-table)
126 (define-key map "%" 'Buffer-menu-toggle-read-only) 134 (define-key map "%" 'Buffer-menu-toggle-read-only)
@@ -197,6 +205,12 @@ commands.")
197 (bindings--define-key menu-map [umk] 205 (bindings--define-key menu-map [umk]
198 '(menu-item "Unmark" Buffer-menu-unmark 206 '(menu-item "Unmark" Buffer-menu-unmark
199 :help "Cancel all requested operations on buffer on this line and move down")) 207 :help "Cancel all requested operations on buffer on this line and move down"))
208 (bindings--define-key menu-map [umkab]
209 '(menu-item "Remove marks..." Buffer-menu-unmark-all-buffers
210 :help "Cancel a requested operation on all buffers"))
211 (bindings--define-key menu-map [umka]
212 '(menu-item "Unmark all" Buffer-menu-unmark-all
213 :help "Cancel all requested operations on buffers"))
200 (bindings--define-key menu-map [mk] 214 (bindings--define-key menu-map [mk]
201 '(menu-item "Mark" Buffer-menu-mark 215 '(menu-item "Mark" Buffer-menu-mark
202 :help "Mark buffer on this line for being displayed by v command")) 216 :help "Mark buffer on this line for being displayed by v command"))
@@ -239,6 +253,8 @@ In Buffer Menu mode, the following commands are defined:
239\\[Buffer-menu-execute] Delete or save marked buffers. 253\\[Buffer-menu-execute] Delete or save marked buffers.
240\\[Buffer-menu-unmark] Remove all marks from current line. 254\\[Buffer-menu-unmark] Remove all marks from current line.
241 With prefix argument, also move up one line. 255 With prefix argument, also move up one line.
256\\[Buffer-menu-unmark-all-buffers] Remove a particular mark from all lines.
257\\[Buffer-menu-unmark-all] Remove all marks from all lines.
242\\[Buffer-menu-backup-unmark] Back up a line and remove marks. 258\\[Buffer-menu-backup-unmark] Back up a line and remove marks.
243\\[Buffer-menu-toggle-read-only] Toggle read-only status of buffer on this line. 259\\[Buffer-menu-toggle-read-only] Toggle read-only status of buffer on this line.
244\\[revert-buffer] Update the list of buffers. 260\\[revert-buffer] Update the list of buffers.
@@ -328,7 +344,7 @@ is nil or omitted, and signal an error otherwise."
328(defun Buffer-menu-no-header () 344(defun Buffer-menu-no-header ()
329 (beginning-of-line) 345 (beginning-of-line)
330 (if (or Buffer-menu-use-header-line 346 (if (or Buffer-menu-use-header-line
331 (not (eq (char-after) ?C))) 347 (not (tabulated-list-header-overlay-p (point))))
332 t 348 t
333 (ding) 349 (ding)
334 (forward-line 1) 350 (forward-line 1)
@@ -346,7 +362,7 @@ is nil or omitted, and signal an error otherwise."
346 "Mark the Buffer menu entry at point for later display. 362 "Mark the Buffer menu entry at point for later display.
347It will be displayed by the \\<Buffer-menu-mode-map>\\[Buffer-menu-select] command." 363It will be displayed by the \\<Buffer-menu-mode-map>\\[Buffer-menu-select] command."
348 (interactive) 364 (interactive)
349 (tabulated-list-set-col 0 ">" t) 365 (tabulated-list-set-col 0 (char-to-string Buffer-menu-marker-char) t)
350 (forward-line)) 366 (forward-line))
351 367
352(defun Buffer-menu-unmark (&optional backup) 368(defun Buffer-menu-unmark (&optional backup)
@@ -356,6 +372,28 @@ Optional prefix arg means move up."
356 (Buffer-menu--unmark) 372 (Buffer-menu--unmark)
357 (forward-line (if backup -1 1))) 373 (forward-line (if backup -1 1)))
358 374
375(defun Buffer-menu-unmark-all-buffers (mark)
376 "Cancel a requested operation on all buffers.
377MARK is the character to flag the operation on the buffers.
378When called interactively prompt for MARK; RET remove all marks."
379 (interactive "cRemove marks (RET means all):")
380 (save-excursion
381 (goto-char (point-min))
382 (when (tabulated-list-header-overlay-p)
383 (forward-line))
384 (while (not (eobp))
385 (let ((xmarks (list (aref (tabulated-list-get-entry) 0)
386 (aref (tabulated-list-get-entry) 2))))
387 (when (or (char-equal mark ?\r)
388 (member (char-to-string mark) xmarks))
389 (Buffer-menu--unmark)))
390 (forward-line))))
391
392(defun Buffer-menu-unmark-all ()
393 "Cancel all requested operations on buffers."
394 (interactive)
395 (Buffer-menu-unmark-all-buffers ?\r))
396
359(defun Buffer-menu-backup-unmark () 397(defun Buffer-menu-backup-unmark ()
360 "Move up and cancel all requested operations on buffer on line above." 398 "Move up and cancel all requested operations on buffer on line above."
361 (interactive) 399 (interactive)
@@ -382,12 +420,12 @@ buffers to delete; a negative ARG means to delete backwards."
382 (setq arg 1)) 420 (setq arg 1))
383 (while (> arg 0) 421 (while (> arg 0)
384 (when (Buffer-menu-buffer) 422 (when (Buffer-menu-buffer)
385 (tabulated-list-set-col 0 "D" t)) 423 (tabulated-list-set-col 0 (char-to-string Buffer-menu-del-char) t))
386 (forward-line 1) 424 (forward-line 1)
387 (setq arg (1- arg))) 425 (setq arg (1- arg)))
388 (while (< arg 0) 426 (while (< arg 0)
389 (when (Buffer-menu-buffer) 427 (when (Buffer-menu-buffer)
390 (tabulated-list-set-col 0 "D" t)) 428 (tabulated-list-set-col 0 (char-to-string Buffer-menu-del-char) t))
391 (forward-line -1) 429 (forward-line -1)
392 (setq arg (1+ arg)))) 430 (setq arg (1+ arg))))
393 431
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el
index 5536f946dc3..74a9dd542d1 100644
--- a/lisp/ebuff-menu.el
+++ b/lisp/ebuff-menu.el
@@ -55,6 +55,8 @@
55 (define-key map "\177" 'Buffer-menu-backup-unmark) 55 (define-key map "\177" 'Buffer-menu-backup-unmark)
56 (define-key map "~" 'Buffer-menu-not-modified) 56 (define-key map "~" 'Buffer-menu-not-modified)
57 (define-key map "u" 'Buffer-menu-unmark) 57 (define-key map "u" 'Buffer-menu-unmark)
58 (define-key map "\M-\177" 'Buffer-menu-unmark-all-buffers)
59 (define-key map "U" 'Buffer-menu-unmark-all)
58 (let ((i ?0)) 60 (let ((i ?0))
59 (while (<= i ?9) 61 (while (<= i ?9)
60 (define-key map (char-to-string i) 'digit-argument) 62 (define-key map (char-to-string i) 'digit-argument)
@@ -114,6 +116,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry.
114\\[Buffer-menu-save] -- mark that buffer to be saved. 116\\[Buffer-menu-save] -- mark that buffer to be saved.
115\\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted. 117\\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted.
116\\[Buffer-menu-unmark] -- remove all kinds of marks from current line. 118\\[Buffer-menu-unmark] -- remove all kinds of marks from current line.
119\\[Buffer-menu-unmark-all] -- remove all kinds of marks from all lines.
117\\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done. 120\\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done.
118\\[Buffer-menu-backup-unmark] -- back up a line and remove marks." 121\\[Buffer-menu-backup-unmark] -- back up a line and remove marks."
119 (interactive "P") 122 (interactive "P")
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index cf297f1ef4a..9523d5e89e3 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -259,6 +259,12 @@ Do nothing if `tabulated-list--header-string' is nil."
259 (make-overlay (point-min) (point)))) 259 (make-overlay (point-min) (point))))
260 (overlay-put tabulated-list--header-overlay 'face 'underline)))) 260 (overlay-put tabulated-list--header-overlay 'face 'underline))))
261 261
262(defsubst tabulated-list-header-overlay-p (&optional pos)
263 "Return non-nil if there is a fake header.
264Optional arg POS is a buffer position where to look for a fake header;
265defaults to `point-min'."
266 (overlays-at (or pos (point-min))))
267
262(defun tabulated-list-revert (&rest ignored) 268(defun tabulated-list-revert (&rest ignored)
263 "The `revert-buffer-function' for `tabulated-list-mode'. 269 "The `revert-buffer-function' for `tabulated-list-mode'.
264It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'." 270It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 08d1dd2d98a..5ffbb6dfe2f 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -81,7 +81,7 @@
81;; Changes: moved to changelog (CHANGES) file. 81;; Changes: moved to changelog (CHANGES) file.
82 82
83;;; Code: 83;;; Code:
84(eval-when-compile (require 'cl)) 84(eval-when-compile (require 'cl-lib))
85(require 'faces) 85(require 'faces)
86;; (`facep' `face-attr-construct' `x-color-values' `color-values' `face-name') 86;; (`facep' `face-attr-construct' `x-color-values' `color-values' `face-name')
87(require 'custom) 87(require 'custom)
@@ -818,7 +818,7 @@ regular specifiers."
818 (if spec 818 (if spec
819 (let ((tag (car spec)) 819 (let ((tag (car spec))
820 (val (cadr spec))) 820 (val (cadr spec)))
821 (cons (case tag 821 (cons (cl-case tag
822 (:color (cons "colour" val)) 822 (:color (cons "colour" val))
823 (:width (cons "width" val)) 823 (:width (cons "width" val))
824 (:style (cons "style" val))) 824 (:style (cons "style" val)))
@@ -831,7 +831,7 @@ regular specifiers."
831 (list 831 (list
832 (if col (cons "border-color" (cdr (assoc "colour" css)))) 832 (if col (cons "border-color" (cdr (assoc "colour" css))))
833 (cons "border-width" (format "%dpx" (or (cdr (assoc "width" css)) 1))) 833 (cons "border-width" (format "%dpx" (or (cdr (assoc "width" css)) 1)))
834 (cons "border-style" (case s 834 (cons "border-style" (cl-case s
835 (released-button "outset") 835 (released-button "outset")
836 (pressed-button "inset" ) 836 (pressed-button "inset" )
837 (t "solid" )))))) 837 (t "solid" ))))))
@@ -850,7 +850,7 @@ TAG is an Emacs font attribute key (eg :underline).
850VAL is ignored." 850VAL is ignored."
851 (list 851 (list
852 ;; FIXME: Why not '("text-decoration" . "underline")? --Stef 852 ;; FIXME: Why not '("text-decoration" . "underline")? --Stef
853 (case tag 853 (cl-case tag
854 (:underline (cons "text-decoration" "underline" )) 854 (:underline (cons "text-decoration" "underline" ))
855 (:overline (cons "text-decoration" "overline" )) 855 (:overline (cons "text-decoration" "overline" ))
856 (:strike-through (cons "text-decoration" "line-through"))))) 856 (:strike-through (cons "text-decoration" "line-through")))))
@@ -1003,7 +1003,7 @@ merged by the user - `hfy-flatten-style' should do this."
1003 (hfy-face-to-style-i 1003 (hfy-face-to-style-i
1004 (hfy-face-attr-for-class v hfy-display-class)))))) 1004 (hfy-face-attr-for-class v hfy-display-class))))))
1005 (setq this 1005 (setq this
1006 (if val (case key 1006 (if val (cl-case key
1007 (:family (hfy-family val)) 1007 (:family (hfy-family val))
1008 (:width (hfy-width val)) 1008 (:width (hfy-width val))
1009 (:weight (hfy-weight val)) 1009 (:weight (hfy-weight val))
@@ -1287,7 +1287,7 @@ return a `defface' style list of face properties instead of a face symbol."
1287 (setq fprops (cdr fprops))) 1287 (setq fprops (cdr fprops)))
1288 ;; ((prop val)) 1288 ;; ((prop val))
1289 (setq p (caar fprops)) 1289 (setq p (caar fprops))
1290 (setq v (cadar fprops)) 1290 (setq v (cl-cadar fprops))
1291 (setq fprops (cdr fprops))) 1291 (setq fprops (cdr fprops)))
1292 (if (listp (cdr fprops)) 1292 (if (listp (cdr fprops))
1293 (progn 1293 (progn
@@ -1304,7 +1304,7 @@ return a `defface' style list of face properties instead of a face symbol."
1304 (setq v (cdr fprops)) 1304 (setq v (cdr fprops))
1305 (setq fprops nil)) 1305 (setq fprops nil))
1306 (error "Eh... another format! fprops=%s" fprops) ))) 1306 (error "Eh... another format! fprops=%s" fprops) )))
1307 (setq p (case p 1307 (setq p (cl-case p
1308 ;; These are all the properties handled 1308 ;; These are all the properties handled
1309 ;; in `hfy-face-to-style-i'. 1309 ;; in `hfy-face-to-style-i'.
1310 ;; 1310 ;;
@@ -1407,8 +1407,8 @@ Returns a modified copy of FACE-MAP."
1407 ;;(push (car tmp-map) reduced-map) 1407 ;;(push (car tmp-map) reduced-map)
1408 ;;(push (cadr tmp-map) reduced-map) 1408 ;;(push (cadr tmp-map) reduced-map)
1409 (while tmp-map 1409 (while tmp-map
1410 (setq first-start (cadddr tmp-map) 1410 (setq first-start (cl-cadddr tmp-map)
1411 first-stop (caddr tmp-map) 1411 first-stop (cl-caddr tmp-map)
1412 last-start (cadr tmp-map) 1412 last-start (cadr tmp-map)
1413 last-stop (car tmp-map) 1413 last-stop (car tmp-map)
1414 map-buf tmp-map 1414 map-buf tmp-map
@@ -1421,8 +1421,8 @@ Returns a modified copy of FACE-MAP."
1421 (not (re-search-forward "[^ \t\n\r]" (car last-start) t)))) 1421 (not (re-search-forward "[^ \t\n\r]" (car last-start) t))))
1422 (setq map-buf (cddr map-buf) 1422 (setq map-buf (cddr map-buf)
1423 span-start first-start 1423 span-start first-start
1424 first-start (cadddr map-buf) 1424 first-start (cl-cadddr map-buf)
1425 first-stop (caddr map-buf) 1425 first-stop (cl-caddr map-buf)
1426 last-start (cadr map-buf) 1426 last-start (cadr map-buf)
1427 last-stop (car map-buf))) 1427 last-stop (car map-buf)))
1428 (push span-stop reduced-map) 1428 (push span-stop reduced-map)
@@ -1762,7 +1762,7 @@ FILE, if set, is the file name."
1762 (if (not (setq pr (get-text-property pt lp))) nil 1762 (if (not (setq pr (get-text-property pt lp))) nil
1763 (goto-char pt) 1763 (goto-char pt)
1764 (remove-text-properties pt (1+ pt) (list lp nil)) 1764 (remove-text-properties pt (1+ pt) (list lp nil))
1765 (case lp 1765 (cl-case lp
1766 (hfy-link 1766 (hfy-link
1767 (if (setq rr (get-text-property pt 'hfy-inst)) 1767 (if (setq rr (get-text-property pt 'hfy-inst))
1768 (insert (format "<a name=\"%s\"></a>" rr))) 1768 (insert (format "<a name=\"%s\"></a>" rr)))
@@ -1805,7 +1805,7 @@ It is assumed that STRING has text properties that allow it to be
1805fontified. This is a simple convenience wrapper around 1805fontified. This is a simple convenience wrapper around
1806`htmlfontify-buffer'." 1806`htmlfontify-buffer'."
1807 (let* ((hfy-optimizations-1 (copy-sequence hfy-optimizations)) 1807 (let* ((hfy-optimizations-1 (copy-sequence hfy-optimizations))
1808 (hfy-optimizations (pushnew 'skip-refontification hfy-optimizations-1))) 1808 (hfy-optimizations (cl-pushnew 'skip-refontification hfy-optimizations-1)))
1809 (with-temp-buffer 1809 (with-temp-buffer
1810 (insert string) 1810 (insert string)
1811 (htmlfontify-buffer) 1811 (htmlfontify-buffer)
@@ -1825,7 +1825,7 @@ fontified. This is a simple convenience wrapper around
1825 (if (fboundp 'font-lock-ensure) 1825 (if (fboundp 'font-lock-ensure)
1826 (font-lock-ensure) 1826 (font-lock-ensure)
1827 (when font-lock-defaults 1827 (when font-lock-defaults
1828 (font-lock-ensure)))) 1828 (font-lock-fontify-buffer))))
1829 ((fboundp #'jit-lock-fontify-now) 1829 ((fboundp #'jit-lock-fontify-now)
1830 (message "hfy jit-lock mode (%S %S)" window-system major-mode) 1830 (message "hfy jit-lock mode (%S %S)" window-system major-mode)
1831 (jit-lock-fontify-now)) 1831 (jit-lock-fontify-now))
@@ -1962,7 +1962,7 @@ property, with a value of \"tag.line-number\"."
1962 (lambda (TLIST) 1962 (lambda (TLIST)
1963 (if (string= file (car TLIST)) 1963 (if (string= file (car TLIST))
1964 (let* ((line (cadr TLIST) ) 1964 (let* ((line (cadr TLIST) )
1965 (chr (caddr TLIST) ) 1965 (chr (cl-caddr TLIST))
1966 (link (format "%s.%d" TAG line) )) 1966 (link (format "%s.%d" TAG line) ))
1967 (put-text-property (+ 1 chr) 1967 (put-text-property (+ 1 chr)
1968 (+ 2 chr) 1968 (+ 2 chr)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index faadb67408a..dc5681c4659 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1556,19 +1556,23 @@ If point is on a group name, this function operates on that group."
1556 (if (or elide (with-no-warnings ibuffer-elide-long-columns)) 1556 (if (or elide (with-no-warnings ibuffer-elide-long-columns))
1557 `(if (> strlen 5) 1557 `(if (> strlen 5)
1558 ,(if from-end-p 1558 ,(if from-end-p
1559 ;; FIXME: this should probably also be using
1560 ;; `truncate-string-to-width' (Bug#24972)
1559 `(concat ,ellipsis 1561 `(concat ,ellipsis
1560 (substring ,strvar 1562 (substring ,strvar
1561 (string-width ibuffer-eliding-string))) 1563 (string-width ibuffer-eliding-string)))
1562 `(truncate-string-to-width 1564 `(concat
1563 ,strvar strlen nil nil 1565 (truncate-string-to-width
1564 ,ellipsis)) 1566 ,strvar (- strlen (string-width ,ellipsis)) nil ?.)
1567 ,ellipsis))
1565 ,strvar) 1568 ,strvar)
1566 strvar))) 1569 strvar)))
1567 1570
1568(defun ibuffer-compile-make-substring-form (strvar maxvar from-end-p) 1571(defun ibuffer-compile-make-substring-form (strvar maxvar from-end-p)
1569 (if from-end-p 1572 (if from-end-p
1570 `(truncate-string-to-width str (string-width str) (- strlen ,maxvar)) 1573 ;; FIXME: not sure if this case is correct (Bug#24972)
1571 `(truncate-string-to-width ,strvar ,maxvar))) 1574 `(truncate-string-to-width str (string-width str) (- strlen ,maxvar) nil ?\s)
1575 `(truncate-string-to-width ,strvar ,maxvar nil ?\s)))
1572 1576
1573(defun ibuffer-compile-make-format-form (strvar widthform alignment) 1577(defun ibuffer-compile-make-format-form (strvar widthform alignment)
1574 (let* ((left `(make-string tmp2 ?\s)) 1578 (let* ((left `(make-string tmp2 ?\s))