Function: dcl-set-option

dcl-set-option is an interactive and byte-compiled function defined in dcl-mode.el.gz.

Signature

(dcl-set-option OPTION-SYM OPTION-VALUE)

Documentation

Set a value for one of the dcl customization variables.

The function tries to guess which variable should be set and to what value. All variable names are available as completions and in the history list.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/dcl-mode.el.gz
;;;-------------------------------------------------------------------------
(defun dcl-set-option (option-sym option-value)
  "Set a value for one of the dcl customization variables.
The function tries to guess which variable should be set and to what value.
All variable names are available as completions and in the history list."
  (interactive
   (let* ((option-sym
	   (intern (completing-read
		    "Set DCL option: " ; prompt
		    (mapcar (function  ; alist of valid values
			     (lambda (option-assoc)
			       (cons  (format "%s" (car option-assoc)) nil)))
			    dcl-option-alist)
		    nil                   ; no predicate
		    t                     ; only value from the list OK
		    (dcl-guess-option)    ; initial (default) value
		    'dcl-option-history))) ; history list
	  (option-value
	   (eval-minibuffer
	    (format "Set DCL option %s to: " option-sym)
	    (dcl-guess-option-value option-sym))))
     (list option-sym option-value)))
  ;; Should make a sanity check on the symbol/value pair.
  ;; `set' instead of `setq' because we want option-sym to be evaluated.
  (set option-sym option-value))