/[emacs]/emacs/lisp/cus-edit.el
ViewVC logotype

Diff of /emacs/lisp/cus-edit.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.154 by kfstorm, Fri May 3 22:50:08 2002 UTC revision 1.155 by pj, Sun May 12 15:18:50 2002 UTC
# Line 748  it as the third element in the list." Line 748  it as the third element in the list."
748        (list var val))))        (list var val))))
749    
750  ;;;###autoload  ;;;###autoload
751  (defun customize-set-value (var val &optional comment)  (defun customize-set-value (variable value &optional comment)
752    "Set VARIABLE to VALUE, and return VALUE.  VALUE is a Lisp object.    "Set VARIABLE to VALUE, and return VALUE.  VALUE is a Lisp object.
753    
754  If VARIABLE has a `variable-interactive' property, that is used as if  If VARIABLE has a `variable-interactive' property, that is used as if
# Line 763  If given a prefix (or a COMMENT argument Line 763  If given a prefix (or a COMMENT argument
763                                         current-prefix-arg))                                         current-prefix-arg))
764        
765    (cond ((string= comment "")    (cond ((string= comment "")
766           (put var 'variable-comment nil))           (put variable 'variable-comment nil))
767          (comment          (comment
768           (put var 'variable-comment comment)))           (put variable 'variable-comment comment)))
769    (set var val))    (set variable value))
770    
771  ;;;###autoload  ;;;###autoload
772  (defun customize-set-variable (variable value &optional comment)  (defun customize-set-variable (variable value &optional comment)
# Line 801  If given a prefix (or a COMMENT argument Line 801  If given a prefix (or a COMMENT argument
801    value)    value)
802    
803  ;;;###autoload  ;;;###autoload
804  (defun customize-save-variable (var value &optional comment)  (defun customize-save-variable (variable value &optional comment)
805    "Set the default for VARIABLE to VALUE, and save it for future sessions.    "Set the default for VARIABLE to VALUE, and save it for future sessions.
806  Return VALUE.  Return VALUE.
807    
# Line 821  If given a prefix (or a COMMENT argument Line 821  If given a prefix (or a COMMENT argument
821    (interactive (custom-prompt-variable "Set and save variable: "    (interactive (custom-prompt-variable "Set and save variable: "
822                                         "Set and save value for %s as: "                                         "Set and save value for %s as: "
823                                         current-prefix-arg))                                         current-prefix-arg))
824    (funcall (or (get var 'custom-set) 'set-default) var value)    (funcall (or (get variable 'custom-set) 'set-default) variable value)
825    (put var 'saved-value (list (custom-quote value)))    (put variable 'saved-value (list (custom-quote value)))
826    (cond ((string= comment "")    (cond ((string= comment "")
827           (put var 'variable-comment nil)           (put variable 'variable-comment nil)
828           (put var 'saved-variable-comment nil))           (put variable 'saved-variable-comment nil))
829          (comment          (comment
830           (put var 'variable-comment comment)           (put variable 'variable-comment comment)
831           (put var 'saved-variable-comment comment)))           (put variable 'saved-variable-comment comment)))
832    (custom-save-all)    (custom-save-all)
833    value)    value)
834    

Legend:
Removed from v.1.154  
changed lines
  Added in v.1.155

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26