unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* interactive interface to supply variables
@ 2013-12-14 19:09 Emanuel Berg
  2013-12-14 19:52 ` Juanma Barranquero
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Emanuel Berg @ 2013-12-14 19:09 UTC (permalink / raw)
  To: help-gnu-emacs

(defvar test-var 1)
(symbol-value 'test-var)      ; 1
(symbol-name 'test-var)       ; "test-var" (both correct)

But:

(custom-variable-p 'test-var) ; nil

This messes up this defun:

(defun describe-variable-short (var)
  (interactive "v Variable: ")
  (message (format " %s: %s" (symbol-name var) (symbol-value var))) )

Because if `custom-variable-p' is nil, (interactive "v
... reports [No match].

How does `describe-variable' do that? (Perhaps I should
just copy their interface, because they also suggest
the variable at point as default. But that's step two.)

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-12-15 18:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-14 19:09 interactive interface to supply variables Emanuel Berg
2013-12-14 19:52 ` Juanma Barranquero
2013-12-15  4:58   ` Michael Heerdegen
     [not found]   ` <mailman.9280.1387083570.10748.help-gnu-emacs@gnu.org>
2013-12-15  5:23     ` Emanuel Berg
     [not found] ` <mailman.9242.1387050824.10748.help-gnu-emacs@gnu.org>
2013-12-14 20:46   ` Emanuel Berg
2013-12-14 21:01 ` Barry Margolin
2013-12-14 21:42   ` Emanuel Berg
2013-12-14 21:09 ` Jambunathan K
     [not found] ` <mailman.9258.1387055530.10748.help-gnu-emacs@gnu.org>
2013-12-14 21:46   ` Emanuel Berg
2013-12-14 21:51   ` Emanuel Berg
2013-12-15  5:41     ` Jambunathan K
     [not found]     ` <mailman.9281.1387086321.10748.help-gnu-emacs@gnu.org>
2013-12-15 18:14       ` Emanuel Berg
2013-12-15  0:09   ` Emanuel Berg
2013-12-15  0:46     ` Emanuel Berg
2013-12-14 23:39 ` Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).