From: Glenn Morris Date: Mon, 3 Mar 2008 03:24:32 +0000 (+0000) Subject: (viper-frame-value): Prefer buffer-local value, if set, over frame value. X-Git-Tag: emacs-pretest-23.0.90~7505 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aba08fe5f68c19febc0ffde6b67af5142b269a97;p=emacs.git (viper-frame-value): Prefer buffer-local value, if set, over frame value. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5f0fe54217b..08dcb611ba7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-03-03 Glenn Morris + * 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 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)