(samp-list (mapcar (lambda (name)
(cons name (propertize text 'face name)))
names))
- (max-samp (seq-max (mapcar #'string-pixel-width
- (mapcar #'cdr samp-list)))))
+ (max-samp (seq-max (cons 0 (mapcar #'string-pixel-width
+ (mapcar #'cdr samp-list))))))
(if (eq (cdr-safe read-face-name-sample-text) 'after)
;; Sample comes after the face name.
- (let ((max-name (seq-max (mapcar #'string-width names))))
+ (let ((max-name (seq-max (cons 0 (mapcar #'string-width names)))))
(lambda (name)
(let* ((samp (cdr (assoc name samp-list)))
(padw (- max-samp (string-pixel-width samp))))
(defun completion-styles-affixation (names)
"Return completion affixations for completion styles list NAMES."
- (let ((max-name (seq-max (mapcar #'string-width names))))
+ (let ((max-name (seq-max (cons 0 (mapcar #'string-width names)))))
(mapcar
(lambda (name)
(list name
(defun completion-file-name-affixation (files)
"Return completion affixations for file list FILES."
- (let ((max-file (seq-max (mapcar #'string-width files))))
+ (let ((max-file (seq-max (cons 0 (mapcar #'string-width files)))))
(mapcar
(lambda (file)
(let ((full (substitute-in-file-name
(mapcar
(apply-partially #'buffer-local-value 'major-mode)
(mapcar #'get-buffer names))))))
- (max (seq-max (mapcar #'string-width modes)))
+ (max (seq-max (cons 0 (mapcar #'string-width modes))))
(name
(completing-read
"Restrict to mode: "
(defun completion-buffer-name-affixation (names)
"Return completion affixations for buffer name list NAMES."
- (let ((max-name (seq-max (mapcar #'string-width names)))
+ (let ((max-name (seq-max (cons 0 (mapcar #'string-width names))))
(max-mode
(seq-max
- (mapcar #'string-width
- (mapcar #'symbol-name
- (mapcar (apply-partially #'buffer-local-value
- 'major-mode)
- (mapcar #'get-buffer names)))))))
+ (cons 0 (mapcar #'string-width
+ (mapcar #'symbol-name
+ (mapcar (apply-partially #'buffer-local-value
+ 'major-mode)
+ (mapcar #'get-buffer names))))))))
(mapcar
(lambda (name)
(let* ((buf (get-buffer name))
(eq (get-text-property (point) 'category) category))))
(defun read-extended-command--affixation (command-names)
- (let* ((max-name (seq-max (mapcar #'string-width
- (or (remove nil command-names)
- '("")))))
+ (let* ((max-name (seq-max
+ (cons 0 (mapcar #'string-width
+ (remove nil command-names)))))
(bindings
(when suggest-key-bindings
(with-selected-window (or (minibuffer-selected-window)
(cons fun (and binding (not (stringp binding))
(key-description binding)))))
command-names))))
- (max-bind (seq-max (mapcar #'string-width
- (or (remove nil (mapcar #'cdr bindings))
- '(""))))))
+ (max-bind (seq-max
+ (cons 0 (mapcar #'string-width
+ (remove nil (mapcar #'cdr bindings)))))))
(mapcar
(lambda (command-name)
(let* ((fun (and (stringp command-name) (intern-soft command-name)))