summaryrefslogtreecommitdiff
path: root/lisp/scroll-bar.el
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2016-07-05 08:33:29 +0300
committerDmitry Antipov <dmantipov@yandex.ru>2016-07-06 06:05:15 +0300
commita7e302dc1dc18770aaf9eeedfd638f73b574bc19 (patch)
tree7452f77ec6aa99f6155aafec4366eccaa28e0eb5 /lisp/scroll-bar.el
parentb1a64dba04146b1424eacd3bc363e5f0edeac2b2 (diff)
downloademacs-a7e302dc1dc18770aaf9eeedfd638f73b574bc19.tar.gz
emacs-a7e302dc1dc18770aaf9eeedfd638f73b574bc19.tar.bz2
emacs-a7e302dc1dc18770aaf9eeedfd638f73b574bc19.zip
Prefer 'frame-parameter' where it is expected to be a bit faster
* lisp/international/mule-diag.el (mule-diag): * lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu): * lisp/mouse.el (mouse-drag-line, font-menu-add-default): * lisp/scroll-bar.el (toggle-scroll-bar, toggle-horizontal-scroll-bar): * lisp/faces.el (x-resolve-font-name): Use 'frame-parameter'.
Diffstat (limited to 'lisp/scroll-bar.el')
-rw-r--r--lisp/scroll-bar.el8
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 838f9bf80cd..e5fe31675da 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -183,9 +183,7 @@ when they are turned on; if it is nil, they go on the left."
(interactive "P")
(if (null arg)
(setq arg
- (if (cdr (assq 'vertical-scroll-bars
- (frame-parameters (selected-frame))))
- -1 1))
+ (if (frame-parameter nil 'vertical-scroll-bars) -1 1))
(setq arg (prefix-numeric-value arg)))
(modify-frame-parameters
(selected-frame)
@@ -199,9 +197,7 @@ With ARG, turn vertical scroll bars on if and only if ARG is positive."
(interactive "P")
(if (null arg)
(setq arg
- (if (cdr (assq 'horizontal-scroll-bars
- (frame-parameters (selected-frame))))
- -1 1))
+ (if (frame-parameter nil 'horizontal-scroll-bars) -1 1))
(setq arg (prefix-numeric-value arg)))
(modify-frame-parameters
(selected-frame)