summaryrefslogtreecommitdiff
path: root/lisp/tooltip.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-10-01 13:23:42 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-10-01 13:23:42 -0400
commita57fa9642d4953dd6b249f563776e8e9ed60ced5 (patch)
treee0efbcabdb8f42dd534423686cd97f34e3641647 /lisp/tooltip.el
parent34912c0a2be7a48969652b1556d2998240c59a22 (diff)
downloademacs-a57fa9642d4953dd6b249f563776e8e9ed60ced5.tar.gz
* lisp/subr.el (alist-get): New accessor.
* lisp/emacs-lisp/gv.el (alist-get): Provide expander. * lisp/winner.el (winner-remember): * lisp/tempo.el (tempo-use-tag-list): * lisp/progmodes/gud.el (minor-mode-map-alist): * lisp/international/mule-cmds.el (define-char-code-property): * lisp/frameset.el (frameset-filter-params): * lisp/files.el (dir-locals-set-class-variables): * lisp/register.el (get-register, set-register): * lisp/calc/calc-yank.el (calc-set-register): Use it. * lisp/ps-print.el (ps-get, ps-put, ps-del): Mark as obsolete. * lisp/tooltip.el (tooltip-set-param): Mark as obsolete. (tooltip-show): Use alist-get instead. * lisp/ses.el (ses--alist-get): Remove. Use alist-get instead. * admin/unidata/unidata-gen.el (unidata-gen-table-word-list): Use alist-get and cl-incf.
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r--lisp/tooltip.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 9d0954fc5dc..26cce418e45 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -215,11 +215,9 @@ This might return nil if the event did not occur over a buffer."
"Change the value of KEY in alist ALIST to VALUE.
If there's no association for KEY in ALIST, add one, otherwise
change the existing association. Value is the resulting alist."
- (let ((param (assq key alist)))
- (if (consp param)
- (setcdr param value)
- (push (cons key value) alist))
- alist))
+ (declare (obsolete "use (setf (alist-get ..) ..) instead" "25.1"))
+ (setf (alist-get key alist) value)
+ alist)
(declare-function x-show-tip "xfns.c"
(string &optional frame parms timeout dx dy))
@@ -244,10 +242,10 @@ in echo area."
(fg (face-attribute 'tooltip :foreground))
(bg (face-attribute 'tooltip :background)))
(when (stringp fg)
- (setq params (tooltip-set-param params 'foreground-color fg))
- (setq params (tooltip-set-param params 'border-color fg)))
+ (setf (alist-get 'foreground-color params) fg)
+ (setf (alist-get 'border-color params) fg))
(when (stringp bg)
- (setq params (tooltip-set-param params 'background-color bg)))
+ (setf (alist-get 'background-color params) bg))
(x-show-tip (propertize text 'face 'tooltip)
(selected-frame)
params