GNU bug report logs -
#16799
24.3.50; delete-selection-mode and electric-pair-mode interaction
Previous Next
Reported by: Harald Hanche-Olsen <hanche <at> math.ntnu.no>
Date: Tue, 18 Feb 2014 20:48:02 UTC
Severity: normal
Found in version 24.3.50
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 16799 <at> debbugs.gnu.org (full text, mbox):
On Tue, Feb 18, 2014 at 9:47 PM, Harald Hanche-Olsen
<hanche <at> math.ntnu.no> wrote:
> Error in pre-command-hook (delete-selection-pre-hook): (args-out-of-range 0 1)
I think something like this is needed to avoid
electric-pair-syntax-info parsing before the start of the
region/buffer.
=== modified file 'lisp/elec-pair.el'
--- lisp/elec-pair.el 2014-02-03 00:28:57 +0000
+++ lisp/elec-pair.el 2014-02-19 22:18:02 +0000
@@ -215,8 +215,10 @@
`electric-pair-pairs' or `electric-pair-text-pairs' were used to
lookup syntax. STRING-OR-COMMENT-START indicates that point is
inside a comment of string."
- (let* ((pre-string-or-comment (nth 8 (save-excursion
- (syntax-ppss (1- (point))))))
+ (let* ((pre-string-or-comment (if (> (point) (point-min))
+ (nth 8 (save-excursion
+ (syntax-ppss (1- (point)))))
+ t))
(post-string-or-comment (nth 8 (syntax-ppss (point))))
(string-or-comment (and post-string-or-comment
pre-string-or-comment))
This bug report was last modified 11 years and 151 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.