mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
* lisp/man.el (man): Use active region for the default value.
While reading a manual name, provide text from the selected region as another default value for the second 'M-n' in the minibuffer. Also replace spaces with dashes in the name.
This commit is contained in:
parent
e28ac4eca6
commit
3d7f51d872
1 changed files with 8 additions and 1 deletions
|
|
@ -1123,7 +1123,14 @@ for the current invocation."
|
|||
(and (not (equal default-entry ""))
|
||||
default-entry))
|
||||
#'Man-completion-table
|
||||
nil nil nil 'Man-topic-history default-entry)))
|
||||
nil nil nil 'Man-topic-history
|
||||
`(,default-entry
|
||||
,@(when (use-region-p)
|
||||
(list (string-replace
|
||||
" " "-"
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning)
|
||||
(region-end)))))))))
|
||||
(if Man-cache-completion-results-flag
|
||||
(read)
|
||||
(let ((Man-completion-cache)) (read))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue