aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2008-03-03 03:24:32 +0000
committerGlenn Morris <[email protected]>2008-03-03 03:24:32 +0000
commitaba08fe5f68c19febc0ffde6b67af5142b269a97 (patch)
treef6196fa0d2660b5249b264ccdc20db82bd025dda
parent4cba674aba37edbc235a4e1a88d7421d77af9084 (diff)
(viper-frame-value): Prefer buffer-local value, if set, over frame value.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emulation/viper-util.el13
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5f0fe54217..08dcb611ba 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2008-03-03 Glenn Morris <[email protected]>
+ * emulation/viper-util.el (viper-frame-value): Prefer buffer-local
+ value, if set, over frame value.
+
* simple.el (transient-mark-mode): Don't turn on by default.
* net/tls.el (open-tls-stream): Restore the 2007-11-04 change
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index e96f671cc5..291c03c4c4 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -130,11 +130,14 @@ Otherwise return the normal value."
,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)