(let* ((frame (color-values (face-background 'default)))
(start (color-values (face-background
(get 'pulse-highlight-face
- :startface))))
+ :startface)
+ nil t)))
(frac (list (/ (- (nth 0 frame) (nth 0 start)) pulse-iterations)
(/ (- (nth 1 frame) (nth 1 start)) pulse-iterations)
(/ (- (nth 2 frame) (nth 2 start)) pulse-iterations)))
"Reset the pulse highlighting FACE."
(set-face-background 'pulse-highlight-face
(if face
- (face-background face)
+ (face-background face nil t)
(face-background 'pulse-highlight-start-face)
))
(put 'pulse-highlight-face :startface (or face
(point))))
(pulse-momentary-highlight-region start end face))))
+;;;###autoload
(defun pulse-momentary-highlight-region (start end &optional face)
"Highlight between START and END, unhighlighting before next command.
Optional argument FACE specifies the face to do the highlighting."
(defun xref--maybe-pulse ()
(when xref-pulse-on-jump
- (pulse-momentary-highlight-one-line (point))))
+ (let (beg end)
+ (save-excursion
+ (back-to-indentation)
+ (if (eolp)
+ (setq beg (line-beginning-position)
+ end (1+ (point)))
+ (setq beg (point)
+ end (line-end-position))))
+ (pulse-momentary-highlight-region beg end 'next-error))))
;; etags.el needs this
(defun xref-clear-marker-stack ()