Mercurial > hg > xemacs-beta
comparison lisp/cus-edit.el @ 4701:684f0ed6cd4f
Behave better when #'variable-at-point gives nil, #'custom-variable-prompt.
lisp/ChangeLog addition:
2009-09-27 Aidan Kehoe <kehoea@parhasard.net>
* cus-edit.el (custom-variable-prompt):
nil is a symbol, check that variable-at-point is non-nil before
checking if it's a symbol when deciding on the prompt used in this
function.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 27 Sep 2009 20:37:44 +0100 |
parents | 877ad4697eea |
children | 17f7e9191c0b |
comparison
equal
deleted
inserted
replaced
4700:ef70ee47d287 | 4701:684f0ed6cd4f |
---|---|
298 Return a list suitable for use in `interactive'." | 298 Return a list suitable for use in `interactive'." |
299 (let ((v (variable-at-point)) | 299 (let ((v (variable-at-point)) |
300 (enable-recursive-minibuffers t) | 300 (enable-recursive-minibuffers t) |
301 val) | 301 val) |
302 (setq val (completing-read | 302 (setq val (completing-read |
303 (if (symbolp v) | 303 (if (and v (symbolp v)) |
304 (format "Customize variable: (default %s) " v) | 304 (format "Customize variable: (default %s) " v) |
305 "Customize variable: ") | 305 "Customize variable: ") |
306 obarray (lambda (symbol) | 306 obarray (lambda (symbol) |
307 (and (boundp symbol) | 307 (and (boundp symbol) |
308 (or (get symbol 'custom-type) | 308 (or (get symbol 'custom-type) |