Mercurial > hg > xemacs-beta
comparison lisp/simple.el @ 267:966663fcf606 r20-5b32
Import from CVS: tag r20-5b32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:26:29 +0200 |
parents | 8efd647ea9ca |
children | c5d627a313b1 |
comparison
equal
deleted
inserted
replaced
266:18d185df8c54 | 267:966663fcf606 |
---|---|
3211 | 3211 |
3212 (defun set-variable (var val) | 3212 (defun set-variable (var val) |
3213 "Set VARIABLE to VALUE. VALUE is a Lisp object. | 3213 "Set VARIABLE to VALUE. VALUE is a Lisp object. |
3214 When using this interactively, supply a Lisp expression for VALUE. | 3214 When using this interactively, supply a Lisp expression for VALUE. |
3215 If you want VALUE to be a string, you must surround it with doublequotes. | 3215 If you want VALUE to be a string, you must surround it with doublequotes. |
3216 If VARIABLE is a specifier, VALUE is added to it as an instantiator in | |
3217 the 'global locale with nil tag set (see `set-specifier'). | |
3216 | 3218 |
3217 If VARIABLE has a `variable-interactive' property, that is used as if | 3219 If VARIABLE has a `variable-interactive' property, that is used as if |
3218 it were the arg to `interactive' (which see) to interactively read the value." | 3220 it were the arg to `interactive' (which see) to interactively read the value." |
3219 (interactive | 3221 (interactive |
3220 (let* ((var (read-variable "Set variable: ")) | 3222 (let* ((var (read-variable "Set variable: ")) |
3244 ;; as an interactive spec for prompting. | 3246 ;; as an interactive spec for prompting. |
3245 (call-interactively (list 'lambda '(arg) | 3247 (call-interactively (list 'lambda '(arg) |
3246 (list 'interactive prop) | 3248 (list 'interactive prop) |
3247 'arg)) | 3249 'arg)) |
3248 (eval-minibuffer (format "Set %s to value: " var))))))) | 3250 (eval-minibuffer (format "Set %s to value: " var))))))) |
3249 (set var val)) | 3251 (if (specifierp (symbol-value var)) |
3252 (set-specifier (symbol-value var) val) | |
3253 (set var val))) | |
3250 | 3254 |
3251 ;; XEmacs | 3255 ;; XEmacs |
3252 (defun activate-region () | 3256 (defun activate-region () |
3253 "Activate the region, if `zmacs-regions' is true. | 3257 "Activate the region, if `zmacs-regions' is true. |
3254 Setting `zmacs-regions' to true causes LISPM-style active regions to be used. | 3258 Setting `zmacs-regions' to true causes LISPM-style active regions to be used. |