Function: viper-frame-value

viper-frame-value is a macro defined in viper-util.el.gz.

Signature

(viper-frame-value VARIABLE)

Documentation

Return the value of VARIABLE local to the current frame, if there is one.

Otherwise return the normal value.

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-util.el.gz
(defmacro viper-frame-value (variable)
  "Return the value of VARIABLE local to the current frame, if there is one.
Otherwise return the normal value."
  ;; Frame-local variables are obsolete from Emacs 22.2 onwards,
  ;; so we do it by hand instead.
  ;; Buffer-local values take precedence over frame-local ones.
  `(if (local-variable-p ',variable)
       ,variable
     ;; Distinguish between no frame parameter and a frame parameter
     ;; with a value of nil.
     (let ((fp (assoc ',variable (frame-parameters))))
       (if fp (cdr fp)
	 ,variable))))