mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
emacs: make minor refinements to prot-minibuffer
This commit is contained in:
parent
6f85a2eb17
commit
0c4d928bc4
|
|
@ -14026,12 +14026,12 @@ Omit the .. directory from FILES."
|
|||
"Return FILE group name unless TRANSFORM is non-nil."
|
||||
(cond
|
||||
(transform file)
|
||||
((string-suffix-p "/" file) "/")
|
||||
((string-prefix-p "." file) ".")
|
||||
((string-suffix-p "/" file) "Directories")
|
||||
((string-prefix-p "." file) "Dotfiles")
|
||||
((when-let* ((extension (file-name-extension file :include-dot))
|
||||
(_ (not (string-blank-p extension))))
|
||||
extension))
|
||||
(t "Other")))
|
||||
(t "Other files")))
|
||||
|
||||
(defun prot-minibuffer--set-default-sort (candidates)
|
||||
"Sort CANDIDATES according to `completions-sort' and return the sorted list."
|
||||
|
|
@ -14176,7 +14176,9 @@ Do it when TRANSFORM is non-nil, else return INPUT-METHOD."
|
|||
(_ (and binding (not (stringp binding)))))
|
||||
(format " %s " (propertize description 'face 'help-key-binding))
|
||||
""))
|
||||
(doc (if-let* ((doc (condition-case nil (documentation symbol) (error nil)))
|
||||
(doc (if-let* ((doc (condition-case nil
|
||||
(documentation symbol)
|
||||
(error nil)))
|
||||
(first-line (substring doc 0 (string-search "\n" doc))))
|
||||
(propertize first-line 'face 'completions-annotations)
|
||||
"")))
|
||||
|
|
|
|||
|
|
@ -105,12 +105,12 @@ Omit the .. directory from FILES."
|
|||
"Return FILE group name unless TRANSFORM is non-nil."
|
||||
(cond
|
||||
(transform file)
|
||||
((string-suffix-p "/" file) "/")
|
||||
((string-prefix-p "." file) ".")
|
||||
((string-suffix-p "/" file) "Directories")
|
||||
((string-prefix-p "." file) "Dotfiles")
|
||||
((when-let* ((extension (file-name-extension file :include-dot))
|
||||
(_ (not (string-blank-p extension))))
|
||||
extension))
|
||||
(t "Other")))
|
||||
(t "Other files")))
|
||||
|
||||
(defun prot-minibuffer--set-default-sort (candidates)
|
||||
"Sort CANDIDATES according to `completions-sort' and return the sorted list."
|
||||
|
|
@ -255,7 +255,9 @@ Do it when TRANSFORM is non-nil, else return INPUT-METHOD."
|
|||
(_ (and binding (not (stringp binding)))))
|
||||
(format " %s " (propertize description 'face 'help-key-binding))
|
||||
""))
|
||||
(doc (if-let* ((doc (condition-case nil (documentation symbol) (error nil)))
|
||||
(doc (if-let* ((doc (condition-case nil
|
||||
(documentation symbol)
|
||||
(error nil)))
|
||||
(first-line (substring doc 0 (string-search "\n" doc))))
|
||||
(propertize first-line 'face 'completions-annotations)
|
||||
"")))
|
||||
|
|
|
|||
Loading…
Reference in a new issue