Function: dcl-guess-option-value

dcl-guess-option-value is a byte-compiled function defined in dcl-mode.el.gz.

Signature

(dcl-guess-option-value OPTION)

Documentation

Guess what value the user would like to give the symbol option.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/dcl-mode.el.gz
;;;-------------------------------------------------------------------------
(defun dcl-guess-option-value (option)
  "Guess what value the user would like to give the symbol option."
  (let* ((option-assoc (assoc option dcl-option-alist))
	 (option (car option-assoc))
	 (action (car (cdr option-assoc)))
	 (value (cond
		 ((fboundp action)
		  (funcall action option-assoc))
		 ((eq action 'toggle)
		  (not (symbol-value option)))
		 ((eq action 'curval)
		  (cond ((or (stringp (symbol-value option))
			     (numberp (symbol-value option)))
			 (format "%S" (symbol-value option)))
			(t
			 (format "'%S" (symbol-value option))))))))
    ;; format the value as a string if not already done
    (if (stringp value)
	value
      (format "%S" value))))