[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 550c650 2/2: Avoid gratuitous delete-dups in face-a
From: |
Ivan Shmakov |
Subject: |
[Emacs-diffs] master 550c650 2/2: Avoid gratuitous delete-dups in face-at-point. |
Date: |
Wed, 27 May 2015 22:15:59 +0000 |
branch: master
commit 550c65011c7394e8ebcf91fc29af2984908279d1
Author: Ivan Shmakov <address@hidden>
Commit: Ivan Shmakov <address@hidden>
Avoid gratuitous delete-dups in face-at-point.
* lisp/faces.el (face-at-point): Do not compute the properly
ordered, duplicate-free list if only a single value is
requested anyway. (Bug#20519)
---
lisp/faces.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/faces.el b/lisp/faces.el
index 9c087c9..f6b1107 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1937,8 +1937,9 @@ Return nil if there is no face."
(dolist (face faceprop)
(if (facep face)
(push face faces))))))
- (setq faces (delete-dups (nreverse faces)))
- (if multiple faces (car faces))))
+ (if multiple
+ (delete-dups (nreverse faces))
+ (car (last faces)))))
(defun foreground-color-at-point ()
"Return the foreground color of the character after point."