[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cperl-after-expr-p
From: |
Juri Linkov |
Subject: |
cperl-after-expr-p |
Date: |
Tue, 26 Sep 2006 01:35:41 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
The shortest test case - put the following lines in the cperl mode:
print <<EOF;
$a
EOF
and type `{' when the cursor is just after `$a'. This signals the error:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
goto-char(nil)
(progn (goto-char (previous-single-property-change ... ...))
(beginning-of-line 0))
(if (get-text-property (point) (quote here-doc-group)) (progn (goto-char ...)
(beginning-of-line 0)))
(while (and (not stop) (> ... lim)) (skip-chars-backward " \n\f" lim)
(setq p (point)) (beginning-of-line) (if (get-text-property ... ...) (progn ...
...)) (if (get-text-property ... ...) (progn ... ...)) (if (looking-at "^[
]*\\(#\\|$\\)") nil (cperl-to-comment-or-eol) (skip-chars-backward " ") (if
... ...) (setq p ...) (if ... ... ... ...)))
(save-excursion (while (and ... ...) (skip-chars-backward " \n\f" lim)
(setq p ...) (beginning-of-line) (if ... ...) (if ... ...) (if ... nil ... ...
... ... ...)) (or (bobp) (eq ... lim) (looking-at "[ ]*__\\(END\\|DATA\\)__")
(progn ...)))
(let ((lim ...) stop p pr) (cperl-update-syntaxification (point) (point))
(save-excursion (while ... ... ... ... ... ... ...) (or ... ... ... ...)))
cperl-after-expr-p(nil "{;)")
cperl-electric-lbrace(nil)
call-interactively(cperl-electric-lbrace)
I believe the following patch fixes this with keeping the function's
intended behavior:
Index: lisp/progmodes/cperl-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/cperl-mode.el,v
retrieving revision 1.78
diff -c -r1.78 cperl-mode.el
*** lisp/progmodes/cperl-mode.el 10 Jun 2006 09:05:31 -0000 1.78
--- lisp/progmodes/cperl-mode.el 25 Sep 2006 22:34:12 -0000
***************
*** 3914,3925 ****
(if (get-text-property (point) 'here-doc-group)
(progn
(goto-char
! (previous-single-property-change (point) 'here-doc-group))
(beginning-of-line 0)))
(if (get-text-property (point) 'in-pod)
(progn
(goto-char
! (previous-single-property-change (point) 'in-pod))
(beginning-of-line 0)))
(if (looking-at "^[ \t]*\\(#\\|$\\)") nil ; Only comment, skip
;; Else: last iteration, or a label
--- 3914,3927 ----
(if (get-text-property (point) 'here-doc-group)
(progn
(goto-char
! (or (previous-single-property-change (point) 'here-doc-group)
! (point)))
(beginning-of-line 0)))
(if (get-text-property (point) 'in-pod)
(progn
(goto-char
! (or (previous-single-property-change (point) 'in-pod)
! (point)))
(beginning-of-line 0)))
(if (looking-at "^[ \t]*\\(#\\|$\\)") nil ; Only comment, skip
;; Else: last iteration, or a label
--
Juri Linkov
http://www.jurta.org/emacs/
- cperl-after-expr-p,
Juri Linkov <=