all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matt Curtis <matt.r.curtis@gmail.com>
To: 17260@debbugs.gnu.org
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	[thread overview]
Message-ID: <CACSUg9vnBcK6QZ8YqUJST9tW7GHRTeR6w_7zK8w7RSnqStFVRg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2086 bytes --]

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
location.

(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 24.4.50.1 (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
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-gnutls
 --with-ns --disable-ns-self-contained'

Configured features:
ACL GNUTLS LIBXML2 ZLIB

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

[-- Attachment #2: Type: text/html, Size: 2850 bytes --]

             reply	other threads:[~2014-04-13  5:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-13  5:44 Matt Curtis [this message]
2014-12-08 23:57 ` bug#17260: 24.4.50; pulse.el: pulse-momentarily-highlight-one-line ignores point argument Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACSUg9vnBcK6QZ8YqUJST9tW7GHRTeR6w_7zK8w7RSnqStFVRg@mail.gmail.com \
    --to=matt.r.curtis@gmail.com \
    --cc=17260@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.