changeset 92422:f3c93a3ef0d5

(viper-frame-value): Prefer buffer-local value, if set, over frame value.
author Glenn Morris <rgm@gnu.org>
date Mon, 03 Mar 2008 03:24:20 +0000
parents e4b8b0c65ebc
children 312562d2ffe9
files lisp/emulation/viper-util.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/viper-util.el	Mon Mar 03 02:26:40 2008 +0000
+++ b/lisp/emulation/viper-util.el	Mon Mar 03 03:24:20 2008 +0000
@@ -130,11 +130,14 @@
        ,variable
      ;; Frame-local variables are obsolete from Emacs 22.2 onwards,
      ;; so we do it by hand instead.
-     ;; 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))))
+     ;; 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)))))
 
 ;; OS/2
 (cond ((eq (viper-device-type) 'pm)