GNU bug report logs - #13529
24.3.50; wrong-type-argument with show-paren-mode

Previous Next

Package: emacs;

Reported by: Aaron Ecay <aaronecay <at> gmail.com>

Date: Wed, 23 Jan 2013 00:04:02 UTC

Severity: normal

Merged with 13548

Found in version 24.3.50

Done: Bastien <bzg <at> altern.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13529 in the body.
You can then email your comments to 13529 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13529; Package emacs. (Wed, 23 Jan 2013 00:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aaron Ecay <aaronecay <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 23 Jan 2013 00:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Aaron Ecay <aaronecay <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; wrong-type-argument with show-paren-mode
Date: Tue, 22 Jan 2013 18:59:00 -0500

The following is with emacs trunk built from git commit 36964d8b4 (Tue
Jan 22 15:48:00 2013 +0400)

1) emacs -Q
2) M-x set-variable debug-on-error t
3) M-x find-library paren
4) M-x eval-buffer
--- steps 3 and 4 are to get a better backtrace of byte-compiled functions
5) C-x b *scratch*
6) M-x show-paren-mode (mode is now enabled)
7) type ) – i.e. a closing parenthesis
8) Receive the following backtrace

Debugger entered--Lisp error: (wrong-type-argument overlayp nil)
  delete-overlay(nil)
  (if (integerp pos) nil (delete-overlay show-paren-overlay))
  (if (not pos) (progn (and show-paren-overlay (overlay-buffer show-paren-overlay) (delete-overlay show-paren-overlay)) (and show-paren-overlay-1 (overlay-buffer show-paren-overlay-1) (delete-overlay show-paren-overlay-1))) (if mismatch (progn (if show-paren-ring-bell-on-mismatch (beep)) (setq face (quote show-paren-mismatch))) (setq face (quote show-paren-match))) (if (and (not show-paren-highlight-openparen) (= dir 1) (integerp pos)) (if (and show-paren-overlay-1 (overlay-buffer show-paren-overlay-1)) (progn (delete-overlay show-paren-overlay-1))) (let ((from (if (= dir 1) (point) (- (point) 1))) (to (if (= dir 1) (+ (point) 1) (point)))) (if show-paren-overlay-1 (move-overlay show-paren-overlay-1 from to (current-buffer)) (setq show-paren-overlay-1 (make-overlay from to nil t))) (overlay-put show-paren-overlay-1 (quote priority) show-paren-priority) (overlay-put show-paren-overlay-1 (quote face) face))) (if (integerp pos) nil (delete-overlay show-paren-overlay)) (let ((to (if (or (eq show-paren-style (quote expression)) (and (eq show-paren-style ...) (not ...))) (point) pos)) (from (if (or (eq show-paren-style (quote expression)) (and (eq show-paren-style ...) (not ...))) pos (save-excursion (goto-char pos) (- (point) dir))))) (if show-paren-overlay (move-overlay show-paren-overlay from to (current-buffer)) (setq show-paren-overlay (make-overlay from to nil t)))) (overlay-put show-paren-overlay (quote priority) show-paren-priority) (overlay-put show-paren-overlay (quote face) face))
  (let* ((oldpos (point)) (dir (cond ((eq (syntax-class (syntax-after ...)) 5) -1) ((eq (syntax-class (syntax-after ...)) 4) 1))) (unescaped (if dir (progn (= (if (= dir -1) 1 0) (logand 1 (- ... ...)))))) pos mismatch face) (if unescaped (progn (save-excursion (save-restriction (if blink-matching-paren-distance (progn (narrow-to-region ... ...))) (condition-case nil (setq pos (scan-sexps ... dir)) (error (setq pos t mismatch t))) (if (integerp pos) (progn (if ... nil ...))) (if (integerp pos) (progn (let ... ...))))))) (if (not pos) (progn (and show-paren-overlay (overlay-buffer show-paren-overlay) (delete-overlay show-paren-overlay)) (and show-paren-overlay-1 (overlay-buffer show-paren-overlay-1) (delete-overlay show-paren-overlay-1))) (if mismatch (progn (if show-paren-ring-bell-on-mismatch (beep)) (setq face (quote show-paren-mismatch))) (setq face (quote show-paren-match))) (if (and (not show-paren-highlight-openparen) (= dir 1) (integerp pos)) (if (and show-paren-overlay-1 (overlay-buffer show-paren-overlay-1)) (progn (delete-overlay show-paren-overlay-1))) (let ((from (if (= dir 1) (point) (- ... 1))) (to (if (= dir 1) (+ ... 1) (point)))) (if show-paren-overlay-1 (move-overlay show-paren-overlay-1 from to (current-buffer)) (setq show-paren-overlay-1 (make-overlay from to nil t))) (overlay-put show-paren-overlay-1 (quote priority) show-paren-priority) (overlay-put show-paren-overlay-1 (quote face) face))) (if (integerp pos) nil (delete-overlay show-paren-overlay)) (let ((to (if (or (eq show-paren-style ...) (and ... ...)) (point) pos)) (from (if (or (eq show-paren-style ...) (and ... ...)) pos (save-excursion (goto-char pos) (- ... dir))))) (if show-paren-overlay (move-overlay show-paren-overlay from to (current-buffer)) (setq show-paren-overlay (make-overlay from to nil t)))) (overlay-put show-paren-overlay (quote priority) show-paren-priority) (overlay-put show-paren-overlay (quote face) face)))
  (if show-paren-mode (let* ((oldpos (point)) (dir (cond ((eq (syntax-class ...) 5) -1) ((eq (syntax-class ...) 4) 1))) (unescaped (if dir (progn (= (if ... 1 0) (logand 1 ...))))) pos mismatch face) (if unescaped (progn (save-excursion (save-restriction (if blink-matching-paren-distance (progn ...)) (condition-case nil (setq pos ...) (error ...)) (if (integerp pos) (progn ...)) (if (integerp pos) (progn ...)))))) (if (not pos) (progn (and show-paren-overlay (overlay-buffer show-paren-overlay) (delete-overlay show-paren-overlay)) (and show-paren-overlay-1 (overlay-buffer show-paren-overlay-1) (delete-overlay show-paren-overlay-1))) (if mismatch (progn (if show-paren-ring-bell-on-mismatch (beep)) (setq face (quote show-paren-mismatch))) (setq face (quote show-paren-match))) (if (and (not show-paren-highlight-openparen) (= dir 1) (integerp pos)) (if (and show-paren-overlay-1 (overlay-buffer show-paren-overlay-1)) (progn (delete-overlay show-paren-overlay-1))) (let ((from (if ... ... ...)) (to (if ... ... ...))) (if show-paren-overlay-1 (move-overlay show-paren-overlay-1 from to (current-buffer)) (setq show-paren-overlay-1 (make-overlay from to nil t))) (overlay-put show-paren-overlay-1 (quote priority) show-paren-priority) (overlay-put show-paren-overlay-1 (quote face) face))) (if (integerp pos) nil (delete-overlay show-paren-overlay)) (let ((to (if (or ... ...) (point) pos)) (from (if (or ... ...) pos (save-excursion ... ...)))) (if show-paren-overlay (move-overlay show-paren-overlay from to (current-buffer)) (setq show-paren-overlay (make-overlay from to nil t)))) (overlay-put show-paren-overlay (quote priority) show-paren-priority) (overlay-put show-paren-overlay (quote face) face))) (and show-paren-overlay (delete-overlay show-paren-overlay)) (and show-paren-overlay-1 (delete-overlay show-paren-overlay-1)))
  show-paren-function()
  apply(show-paren-function nil)
  byte-code("r\301^H\302H^H\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 0 0 125000 t show-paren-function nil idle 0])



In GNU Emacs 24.3.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
 of 2013-01-22 on haize
Windowing system distributor `The X.Org Foundation', version 11.0.11301000
Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
 --libexecdir=/usr/lib --mandir=/usr/share/man --without-sound
 --with-xft --with-x-toolkit=gtk'

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

-- 
Aaron Ecay




Reply sent to Bastien <bzg <at> altern.org>:
You have taken responsibility. (Wed, 23 Jan 2013 10:21:02 GMT) Full text and rfc822 format available.

Notification sent to Aaron Ecay <aaronecay <at> gmail.com>:
bug acknowledged by developer. (Wed, 23 Jan 2013 10:21:03 GMT) Full text and rfc822 format available.

Message #10 received at 13529-done <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> altern.org>
To: Aaron Ecay <aaronecay <at> gmail.com>
Cc: 13529-done <at> debbugs.gnu.org
Subject: Re: bug#13529: 24.3.50; wrong-type-argument with show-paren-mode
Date: Wed, 23 Jan 2013 11:19:12 +0100
Hi Aaron,

Aaron Ecay <aaronecay <at> gmail.com> writes:

> The following is with emacs trunk built from git commit 36964d8b4 (Tue
> Jan 22 15:48:00 2013 +0400)

This has been fixed in revno 111588:
http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/111588?start_revid=111588

Thanks,

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13529; Package emacs. (Thu, 24 Jan 2013 19:47:02 GMT) Full text and rfc822 format available.

Message #13 received at 13529-done <at> debbugs.gnu.org (full text, mbox):

From: Aaron Ecay <aaronecay <at> gmail.com>
To: Bastien <bzg <at> altern.org>
Cc: 13529-done <at> debbugs.gnu.org
Subject: Re: bug#13529: 24.3.50; wrong-type-argument with show-paren-mode
Date: Thu, 24 Jan 2013 14:45:51 -0500
Bastien,

Thanks for the fix.  The git checkout I was working from was just a few
commits behind it.

I am however still getting a different error with your patch.  It looks
like the new (if (integerp ...) ...) excluded a couple of overlay-put
calls it should have included.  See if this patch looks good to you
(applied on top of yours).

diff --git i/lisp/paren.el w/lisp/paren.el
index bf2238d..a9d3be6 100644
--- i/lisp/paren.el
+++ w/lisp/paren.el
@@ -259,11 +259,10 @@ matching parenthesis is highlighted in `show-paren-style' after
 			    (- (point) dir)))))
 	      (if show-paren-overlay
 		  (move-overlay show-paren-overlay from to (current-buffer))
-		(setq show-paren-overlay (make-overlay from to nil t)))))
-	  ;;
-	  ;; Always set the overlay face, since it varies.
-	  (overlay-put show-paren-overlay 'priority show-paren-priority)
-	  (overlay-put show-paren-overlay 'face face)))
+		(setq show-paren-overlay (make-overlay from to nil t))))
+            ;; Always set the overlay face, since it varies.
+            (overlay-put show-paren-overlay 'priority show-paren-priority)
+            (overlay-put show-paren-overlay 'face face))))
     ;; show-paren-mode is nil in this buffer.
     (and show-paren-overlay
 	 (delete-overlay show-paren-overlay))

-- 
Aaron Ecay




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13529; Package emacs. (Thu, 24 Jan 2013 21:20:01 GMT) Full text and rfc822 format available.

Message #16 received at 13529-done <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> altern.org>
To: Aaron Ecay <aaronecay <at> gmail.com>
Cc: 13529-done <at> debbugs.gnu.org
Subject: Re: bug#13529: 24.3.50; wrong-type-argument with show-paren-mode
Date: Thu, 24 Jan 2013 22:19:35 +0100
Hi Aaron,

Aaron Ecay <aaronecay <at> gmail.com> writes:

> Thanks for the fix.  The git checkout I was working from was just a few
> commits behind it.
>
> I am however still getting a different error with your patch.  It looks
> like the new (if (integerp ...) ...) excluded a couple of overlay-put
> calls it should have included.  See if this patch looks good to you
> (applied on top of yours).

That's right.  I applied your patch, thanks a lot!

-- 
 Bastien




Merged 13529 13548. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 25 Jan 2013 17:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Feb 2013 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.