Commit 550c6501 authored by Ivan Shmakov's avatar Ivan Shmakov
Browse files

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)
parent 21b81bd8
......@@ -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."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment