[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17260: 24.4.50; pulse.el: pulse-momentarily-highlight-one-line ignor

From: Matt Curtis
Subject: bug#17260: 24.4.50; pulse.el: pulse-momentarily-highlight-one-line ignores point argument
Date: Sun, 13 Apr 2014 15:44:08 +1000

The function "pulse-momentarily-highlight-one-line" (in pulse.el)
ignores the point argument and uses the current point instead.

To reproduce this issue, call the function with a location on
a line other than where the point currently is. The line with
point will be pulsed, not the line containing the supplied

(pulse-momentary-highlight-one-line 259)

The following patch fixes the issue with (goto-char point)


diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index e2a48a4..10ede62 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -227,13 +227,15 @@ (defun pulse-momentary-unhighlight ()
 (defun pulse-momentary-highlight-one-line (point &optional face)
   "Highlight the line around POINT, unhighlighting before next command.
 Optional argument FACE specifies the face to do the highlighting."
-  (let ((start (point-at-bol))
-       (end (save-excursion
-              (end-of-line)
-              (when (not (eobp))
-                (forward-char 1))
-              (point))))
-    (pulse-momentary-highlight-region start end face)))
+  (save-excursion
+    (goto-char point)
+    (let ((start (point-at-bol))
+          (end (save-excursion
+                 (end-of-line)
+                 (when (not (eobp))
+                   (forward-char 1))
+                 (point))))
+      (pulse-momentary-highlight-region start end face))))
 (defun pulse-momentary-highlight-region (start end &optional face)
   "Highlight between START and END, unhighlighting before next command.


In GNU Emacs (x86_64-apple-darwin13.1.0, NS apple-appkit-1265.19)
 of 2014-04-13 on gonagall.local
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --prefix=/usr/local/Cellar/emacs/HEAD --without-dbus
 --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-gnutls
 --with-ns --disable-ns-self-contained'

Configured features:

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  locale-coding-system: utf-8-unix

reply via email to

[Prev in Thread] Current Thread [Next in Thread]