summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorIvan Shmakov <ivan@siamics.net>2015-05-27 22:15:27 +0000
committerIvan Shmakov <ivan@siamics.net>2015-05-27 22:15:27 +0000
commit550c65011c7394e8ebcf91fc29af2984908279d1 (patch)
tree09fea3decd7e8bf95026af54ce72609b7c49ffce /lisp/faces.el
parent21b81bd8c51cf48e08089087a17f66eb70625748 (diff)
downloademacs-550c65011c7394e8ebcf91fc29af2984908279d1.tar.gz
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)
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 9c087c99d56..f6b11074af0 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."