From aba08fe5f68c19febc0ffde6b67af5142b269a97 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 3 Mar 2008 03:24:32 +0000 Subject: (viper-frame-value): Prefer buffer-local value, if set, over frame value. --- lisp/emulation/viper-util.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lisp/emulation') diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index e96f671cc53..291c03c4c4e 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) -- cgit v1.2.1