# HG changeset patch # User Stefan Monnier # Date 1047579041 0 # Node ID 7c924263658d5ef12eb29608ab9d4060d1310142 # Parent cfcc62c9e7df495be2a285e215cf967aa6253bd1 (custom-set-minor-mode): New fun. diff -r cfcc62c9e7df -r 7c924263658d lisp/custom.el --- a/lisp/custom.el Thu Mar 13 11:38:35 2003 +0000 +++ b/lisp/custom.el Thu Mar 13 18:10:41 2003 +0000 @@ -797,6 +797,17 @@ (set variable value)) (set-default variable value))) +(defun custom-set-minor-mode (variable value) + ":set function for minor mode variables. +Normally, this sets the default value of VARIABLE to nil if VALUE +is nil and to t otherwise, +but if `custom-local-buffer' is non-nil, +this sets the local binding in that buffer instead." + (if custom-local-buffer + (with-current-buffer custom-local-buffer + (funcall variable (or value 0))) + (funcall variable (or value 0)))) + (defun custom-quote (sexp) "Quote SEXP iff it is not self quoting." (if (or (memq sexp '(t nil))