[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 170faae: Add new command apropos-function (Bug#41021)
From: |
Stefan Kangas |
Subject: |
master 170faae: Add new command apropos-function (Bug#41021) |
Date: |
Mon, 10 Aug 2020 09:34:01 -0400 (EDT) |
branch: master
commit 170faae31b13defc35a26ee6429dcb82066a6a66
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Add new command apropos-function (Bug#41021)
* lisp/apropos.el (apropos-function): New command.
* etc/NEWS: Announce it.
---
etc/NEWS | 3 +++
lisp/apropos.el | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index db23741..ddb42fb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -529,6 +529,9 @@ prefix on the Subject line in various languages.
These new navigation commands are bound to 'n' and 'p' in
'apropos-mode'.
+*** New command 'apropos-function'.
+This works like 'C-u M-x apropos-command' but is more discoverable.
+
** CC Mode
*** Added support for Doxygen documentation style.
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 2566d44..6d8c784 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -543,6 +543,20 @@ will be buffer-local when set."
(and (local-variable-if-set-p symbol)
(get symbol 'variable-documentation)))))
+;;;###autoload
+(defun apropos-function (pattern)
+ "Show functions that match PATTERN.
+
+PATTERN can be a word, a list of words (separated by spaces),
+or a regexp (using some regexp special characters). If it is a word,
+search for matches for that word as a substring. If it is a list of words,
+search for matches for any two (or more) of those words.
+
+This is the same as running `apropos-command' with a \\[universal-argument]
prefix,
+or a non-nil `apropos-do-all' argument."
+ (interactive (list (apropos-read-pattern "function")))
+ (apropos-command pattern t))
+
;; For auld lang syne:
;;;###autoload
(defalias 'command-apropos 'apropos-command)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 170faae: Add new command apropos-function (Bug#41021),
Stefan Kangas <=