I'm not sure how far along this thread is, as I haven't been paying
attention. I have been using the following snippet of elisp from
the first ed. of the emacs book by Cameron et al. It works, but acts
strangely: it gives BOTH variables and commands. It's useful, but
would be more useful if it only collected variables!
(defun variable-apropos (string)
"Like appropos but (said to) list only symbols that are names of
variables that are user-modifiable. (From Cameron et al.). Seems
actually to list commands and variables. Code is probably
copylefted."
(interactive "sVariable apropos (regexp): ")
(let ((message
(let ((standard-output (get-buffer-create "*Help*")))
(print-help-return-message 'identity))))
(apropos string 'user-variable-p)
(and message (message message))))
Is there any obvious way to restrict the bahavior of this function?
Alan Davis
--
Alan E. Davis Marianas High School (Science Department)
AAA196, Box 10001 ada...@netpci.com http://www.saipan.netpci.com/~adavis
Saipan, MP 96950 15.16oN 145.7oE GMT+10 Northern Mariana Islands
> I'm not sure how far along this thread is, as I haven't been paying
> attention. I have been using the following snippet of elisp from
> the first ed. of the emacs book by Cameron et al. It works, but acts
> strangely: it gives BOTH variables and commands. It's useful, but
> would be more useful if it only collected variables!
***8<snip
Funny, but this very 'snippet' is what started the thread.
> Is there any obvious way to restrict the bahavior of this function?
What version of emacs are you using this on? I can't get it to work at
all on emacs-20.2. (can't tell from your headers)
--
Harry Putnam rea...@newsguy.com
> I'm using emacs 20.2.2.
> I have byte compiled it, and in my .emacs (which is in part a link to a byte
> compiled .emacs.elc) is the following:
>
> (autoload 'variable-apropos "/usr/lib/emacs/site-lisp/variable-apropos.elc")
> (define-key help-map "\C-v" 'variable-apropos)
>
> It works. It just does the commands as well as the variables.
Maybe I missed you're point. Are you saying you are using the snippet
from the book on 20.2?
My 20.2 finds variables, functions, and commands at 'M-x apropos' with no
special code at all. It was installed in rpm format from Redhat
software cd.
--
Harry Putnam rea...@newsguy.com
I'm using emacs 20.2.2.
I have byte compiled it, and in my .emacs (which is in part a link to a byte
compiled .emacs.elc) is the following:
(autoload 'variable-apropos "/usr/lib/emacs/site-lisp/variable-apropos.elc")
(define-key help-map "\C-v" 'variable-apropos)
It works. It just does the commands as well as the variables.
Alan Davis
> ada...@netpci.com (Alan Eugene Davis) writes:
>
> ..
>
>
Response to the snippet:
=======================
postscript
postscript-mode M-x postscript-mode RET
Command: Major mode for editing PostScript files.
postscript-mode-hook
ps-postscript-command
Variable: *Command used to invoke with a printer spooler or NeWS server.
Plist: variable-documentation
Response to native M-x apropos on 20.2:
======================================
postscript-mode
Command: Major mode for editing PostScript files.
ps-postscript-command
Variable: *Command used to invoke with a printer spooler or NeWS server.
Plist: variable-documentation
Interesting, anyway.
You'd be better off using hyper-apropos because of its tabular
presentation. It's probably the most user-friendly emacs help
facility but it's not bundled with Emacs (at least not 19.34).
> Alan E. Davis Marianas High School (Science Department)
Are there many high school students using emacs?
e.g. C-h a tmm RET
=============================================================================
Apropos search for: "tmm"
* = command (M-x) or user-variable.
a = autoloaded, b = byte-compiled, i = internal, l = lambda, m = macro.
Functions and Macros:
b tmm-add-prompt
b tmm-add-shortcuts - Adds shortcuts to cars of elements of th$
b tmm-define-keys
b tmm-delete-map
b tmm-get-keybind - Return the current binding of KEYSEQ, me$
b tmm-get-keymap - Prepends (DOCSTRING EVENT BINDING) to fr$
b* tmm-goto-completions
b* tmm-menubar - Text-mode emulation of looking and choos$
b* tmm-menubar-mouse - Text-mode emulation of looking and choos$
b tmm-prompt - Text-mode emulation of calling the bindi$
b* tmm-shortcut - Choose the shortcut that the user typed.
Variables and Constants:
tmm-completion-prompt - String to insert at top of completion bu$
tmm-mb-map - A place to store minibuffer map.
tmm-mid-prompt - String to insert between shortcut and me$
tmm-old-mb-map
=============================================================================