diff options
| author | Glenn Morris | 2015-02-23 23:13:49 -0800 |
|---|---|---|
| committer | Glenn Morris | 2015-02-23 23:13:49 -0800 |
| commit | e8a11db943dfc7a469a761f98d606a4072a6ca43 (patch) | |
| tree | df3dbf44246f94e78b0a204c44a4a13d1d75cecf /lisp | |
| parent | eaf9499a7fe485a57ab54c665f0548d4eb1a2e88 (diff) | |
| download | emacs-e8a11db943dfc7a469a761f98d606a4072a6ca43.tar.gz emacs-e8a11db943dfc7a469a761f98d606a4072a6ca43.zip | |
f90.el: add some support for continued strings without leading '&'
* lisp/progmodes/f90.el (f90-beginning-of-subprogram)
(f90-end-of-subprogram, f90-match-end):
Handle continued strings where the continuation does not start
with "&" and happens to match our regexp.
* test/automated/f90.el (f90-test-bug-19809): New test.
Fixes: debbugs:19809
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/f90.el | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7e7bbb7486a..165c1ce96de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2015-02-24 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/f90.el (f90-beginning-of-subprogram) | ||
| 4 | (f90-end-of-subprogram, f90-match-end): | ||
| 5 | Handle continued strings where the continuation does not start | ||
| 6 | with "&" and happens to match our regexp. (Bug#19809) | ||
| 7 | |||
| 1 | 2015-02-24 Bozhidar Batsov <bozhidar@batsov.com> | 8 | 2015-02-24 Bozhidar Batsov <bozhidar@batsov.com> |
| 2 | 9 | ||
| 3 | * comint.el (comint-clear-buffer): New command. | 10 | * comint.el (comint-clear-buffer): New command. |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index b923819ebb3..6264d3b7b82 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -1634,7 +1634,10 @@ Return (TYPE NAME), or nil if not found." | |||
| 1634 | (re-search-backward f90-program-block-re nil 'move)) | 1634 | (re-search-backward f90-program-block-re nil 'move)) |
| 1635 | (beginning-of-line) | 1635 | (beginning-of-line) |
| 1636 | (skip-chars-forward " \t0-9") | 1636 | (skip-chars-forward " \t0-9") |
| 1637 | (cond ((setq matching-beg (f90-looking-at-program-block-start)) | 1637 | ;; Check if in string in case using non-standard feature where |
| 1638 | ;; continued strings do not need "&" at start of continuations. | ||
| 1639 | (cond ((f90-in-string)) | ||
| 1640 | ((setq matching-beg (f90-looking-at-program-block-start)) | ||
| 1638 | (setq count (1- count))) | 1641 | (setq count (1- count))) |
| 1639 | ((f90-looking-at-program-block-end) | 1642 | ((f90-looking-at-program-block-end) |
| 1640 | (setq count (1+ count))))) | 1643 | (setq count (1+ count))))) |
| @@ -1659,7 +1662,8 @@ Return (TYPE NAME), or nil if not found." | |||
| 1659 | (re-search-forward f90-program-block-re nil 'move)) | 1662 | (re-search-forward f90-program-block-re nil 'move)) |
| 1660 | (beginning-of-line) | 1663 | (beginning-of-line) |
| 1661 | (skip-chars-forward " \t0-9") | 1664 | (skip-chars-forward " \t0-9") |
| 1662 | (cond ((f90-looking-at-program-block-start) | 1665 | (cond ((f90-in-string)) |
| 1666 | ((f90-looking-at-program-block-start) | ||
| 1663 | (setq count (1+ count))) | 1667 | (setq count (1+ count))) |
| 1664 | ((setq matching-end (f90-looking-at-program-block-end)) | 1668 | ((setq matching-end (f90-looking-at-program-block-end)) |
| 1665 | (setq count (1- count)))) | 1669 | (setq count (1- count)))) |
| @@ -2199,8 +2203,12 @@ Leave point at the end of line." | |||
| 2199 | (end-point (point)) | 2203 | (end-point (point)) |
| 2200 | (case-fold-search t) | 2204 | (case-fold-search t) |
| 2201 | matching-beg beg-name end-name beg-block end-block end-struct) | 2205 | matching-beg beg-name end-name beg-block end-block end-struct) |
| 2206 | ;; Check if in string in case using non-standard feature where | ||
| 2207 | ;; continued strings do not need "&" at start of continuations. | ||
| 2202 | (when (save-excursion (beginning-of-line) (skip-chars-forward " \t0-9") | 2208 | (when (save-excursion (beginning-of-line) (skip-chars-forward " \t0-9") |
| 2203 | (setq end-struct (f90-looking-at-program-block-end))) | 2209 | (unless (f90-in-string) |
| 2210 | (setq end-struct | ||
| 2211 | (f90-looking-at-program-block-end)))) | ||
| 2204 | (setq end-block (car end-struct) | 2212 | (setq end-block (car end-struct) |
| 2205 | end-name (cadr end-struct)) | 2213 | end-name (cadr end-struct)) |
| 2206 | (save-excursion | 2214 | (save-excursion |