From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt Curtis Newsgroups: gmane.emacs.bugs 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 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd752a86f356604f6e60f78 X-Trace: ger.gmane.org 1397409556 711 80.91.229.3 (13 Apr 2014 17:19:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Apr 2014 17:19:16 +0000 (UTC) To: 17260@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 13 19:19:09 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WZO3f-0000gO-VU for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Apr 2014 19:19:08 +0200 Original-Received: from localhost ([::1]:38674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZO3f-0006uy-H8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Apr 2014 13:19:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZO3b-0006uf-FG for bug-gnu-emacs@gnu.org; Sun, 13 Apr 2014 13:19:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZO3a-0007x6-E9 for bug-gnu-emacs@gnu.org; Sun, 13 Apr 2014 13:19:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZO3a-0007x2-B5 for bug-gnu-emacs@gnu.org; Sun, 13 Apr 2014 13:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WZO3Z-0000Gn-S0 for bug-gnu-emacs@gnu.org; Sun, 13 Apr 2014 13:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Curtis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Apr 2014 17:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17260 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13974095331019 (code B ref -1); Sun, 13 Apr 2014 17:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Apr 2014 17:18:53 +0000 Original-Received: from localhost ([127.0.0.1]:47298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WZO3P-0000GH-Pa for submit@debbugs.gnu.org; Sun, 13 Apr 2014 13:18:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53507) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WZDDb-0003jg-I5 for submit@debbugs.gnu.org; Sun, 13 Apr 2014 01:44:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZDDV-0004SX-2T for submit@debbugs.gnu.org; Sun, 13 Apr 2014 01:44:34 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:60686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZDDU-0004ST-VY for submit@debbugs.gnu.org; Sun, 13 Apr 2014 01:44:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZDDT-0001Vn-LJ for bug-gnu-emacs@gnu.org; Sun, 13 Apr 2014 01:44:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZDDS-0004SD-G2 for bug-gnu-emacs@gnu.org; Sun, 13 Apr 2014 01:44:31 -0400 Original-Received: from mail-ig0-x229.google.com ([2607:f8b0:4001:c05::229]:44519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZDDS-0004S8-8L for bug-gnu-emacs@gnu.org; Sun, 13 Apr 2014 01:44:30 -0400 Original-Received: by mail-ig0-f169.google.com with SMTP id h18so3452140igc.0 for ; Sat, 12 Apr 2014 22:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=7sK23Fu2lZgpTs6EkRw8jSRYzd6RfWyRQHuqbWAkVhQ=; b=FQXJruNftfP+UgDfbnJ4Kx9tBwtCPa2BXa8+BfNlu2D0Y8q6zOq11xbNRQphzLHKN3 N6eELkBrc+Aa7O7R47GlZt5TAwGEtE9exwpQYvses96Vjn332FqABASr4TOjAXrhqwwG QADML0HZG61WvMAmKnO6qE05DlMuUCixihfQMaGJjSI3BQqNa3tr1ZwpoHnQ2yHFQXrr lBVXa/10NNUCzfseX2dHEf9lKHb/B/3R6yXhhkeEaAf79ZPM0lN8MkgI2WjEprTm3yMl 6SubkuaeSKK0tq+Mfr2Eo87wjglXj7+9/gY9hzvXvn3McfIx2HtpVmu/B0ok5GmI6/5s uf7A== X-Received: by 10.50.22.210 with SMTP id g18mr7656467igf.19.1397367868698; Sat, 12 Apr 2014 22:44:28 -0700 (PDT) Original-Received: by 10.64.21.100 with HTTP; Sat, 12 Apr 2014 22:44:08 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sun, 13 Apr 2014 13:18:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87998 Archived-At: --047d7bd752a86f356604f6e60f78 Content-Type: text/plain; charset=ISO-8859-1 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 --047d7bd752a86f356604f6e60f78 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The function "pulse-momentarily-highlight-one-li= ne" (in pulse.el)
ignores the point argument and uses the cu= rrent 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
loca= tion.

(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 e2a4= 8a4..10ede62 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -227,13 +227,15 @@ (defun pulse-momentary-unhighlight ()
=A0= (defun pulse-momentary-highlight-one-line (point &optional face)
=A0 =A0"Highlight the line around POINT, unhighlighting before ne= xt command.
=A0Optional argument FACE specifies the face to do th= e highlighting."
- =A0(let ((start (point-at-bol))
- =A0 =A0 =A0 (end (save-excursion
- =A0 =A0 =A0 =A0 =A0 =A0 =A0(end-of-line)
- =A0 =A0 =A0 =A0= =A0 =A0 =A0(when (not (eobp))
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(= forward-char 1))
- =A0 =A0 =A0 =A0 =A0 =A0 =A0(point))))
- =A0 =A0(pulse-momentary-highlight-region start end face)))
+ =A0(save-excursion
+ =A0 =A0(goto-char point)
+ = =A0 =A0(let ((start (point-at-bol))
+ =A0 =A0 =A0 =A0 =A0(end (sa= ve-excursion
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (end-of-line)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (when (not (eobp))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (forward-char 1))
+ = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (point))))
+ =A0 =A0 =A0(pulse-mo= mentary-highlight-region start end face))))
=A0
=A0(def= un pulse-momentary-highlight-region (start end &optional face)
=A0 =A0"Highlight between START and END, unhighlighting before ne= xt command.

-----

In GNU = Emacs 24.4.50.1 (x86_64-apple-darwin13.1.0, NS apple-appkit-1265.19)
=A0of 2014-04-13 on gonagall.local
Windowing system distributor `= Apple', version 10.3.1265
Configured using:
=A0`con= figure --prefix=3D/usr/local/Cellar/emacs/HEAD --without-dbus
=A0= --enable-locallisppath=3D/usr/local/share/emacs/site-lisp
=A0--infodir=3D/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-gn= utls
=A0--with-ns --disable-ns-self-contained'

=
Configured features:
ACL GNUTLS LIBXML2 ZLIB

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

--047d7bd752a86f356604f6e60f78--