From: Stefan Monnier Date: Wed, 15 May 2013 00:52:07 +0000 (-0400) Subject: * lisp/progmodes/f90.el (f90-blocks-re): Include the terminating \> in the X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~229^2~81 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ac2eb344ff68720495d655bccd4c19ac92b04d9;p=emacs.git * lisp/progmodes/f90.el (f90-blocks-re): Include the terminating \> in the surrounding group. * src/regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart. Fixes: debbugs:14402 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b2c28d97a1..a93b2868933 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-05-15 Stefan Monnier + + * progmodes/f90.el (f90-blocks-re): Include the terminating \> in the + surrounding group (bug#14402). + 2013-05-14 Juri Linkov * subr.el (find-tag-default-as-regexp): Return nil if `tag' is nil. @@ -10,8 +15,8 @@ 2013-05-14 Jean-Philippe Gravel - * progmodes/gdb-mi.el (gdb-running, gdb-starting): Remove - signals for which replies are never received. + * progmodes/gdb-mi.el (gdb-running, gdb-starting): + Remove signals for which replies are never received. 2013-05-14 Jean-Philippe Gravel @@ -120,8 +125,8 @@ * progmodes/octave.el (octave-indent-comment): Improve. (octave-eldoc-message-style, octave-eldoc-cache): New variables. - (octave-eldoc-function-signatures, octave-eldoc-function): New - functions. + (octave-eldoc-function-signatures, octave-eldoc-function): + New functions. (octave-mode, inferior-octave-mode): Add eldoc support. 2013-05-11 Richard Stallman @@ -166,8 +171,8 @@ 2013-05-10 Leo Liu - * progmodes/octave.el (inferior-octave-completion-table): No - longer a function and all uses changed. Use cache to speed up + * progmodes/octave.el (inferior-octave-completion-table): + No longer a function and all uses changed. Use cache to speed up completion due to bug#11906. (octave-beginning-of-defun): Re-write to be more general. @@ -357,7 +362,7 @@ * progmodes/octave.el (octave-syntax-propertize-function): Change \'s syntax to escape when inside double-quoted strings. (Bug#14332) (octave-font-lock-keywords): Use octave-operator-regexp. - (octave-completion-at-point): Renamed from + (octave-completion-at-point): Rename from octave-completion-at-point-function. (inferior-octave-directory-tracker): Robustify. (octave-text-functions): Remove and fix its uses. No such things diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index a8f53d397d6..d7d0c109452 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -249,8 +249,8 @@ "Qualification of END statements according to the matching block start. For example, change the END that closes an IF block to END IF. If the block has a label, add it as well (unless `f90-smart-end-names' -says not to). Allowed values are 'blink, 'no-blink, and nil. If nil, -nothing is done. The other two settings have the same effect, but 'blink +says not to). Allowed values are `blink', `no-blink', and nil. If nil, +nothing is done. The other two settings have the same effect, but `blink' additionally blinks the cursor to the start of the block." :type '(choice (const blink) (const no-blink) (const nil)) :safe (lambda (value) (memq value '(blink no-blink nil))) @@ -842,14 +842,14 @@ Can be overridden by the value of `font-lock-maximum-decoration'.") ;; Regexps for finding program structures. (defconst f90-blocks-re - (concat "\\(block[ \t]*data\\|" + (concat "\\(\\(?:block[ \t]*data\\|" (regexp-opt '("do" "if" "interface" "function" "module" "program" "select" "subroutine" "type" "where" "forall" ;; F2003. "enum" "associate" ;; F2008. "submodule" "block" "critical")) - "\\)\\_>") + "\\)\\_>\\)") "Regexp potentially indicating a \"block\" of F90 code.") (defconst f90-program-block-re @@ -1138,8 +1138,8 @@ Variables controlling indentation style and extra features: Automatic insertion of \& at beginning of continuation lines (default t). `f90-smart-end' From an END statement, check and fill the end using matching block start. - Allowed values are 'blink, 'no-blink, and nil, which determine - whether to blink the matching beginning (default 'blink). + Allowed values are `blink', `no-blink', and nil, which determine + whether to blink the matching beginning (default `blink'). `f90-auto-keyword-case' Automatic change of case of keywords (default nil). The possibilities are `downcase-word', `upcase-word', `capitalize-word'. diff --git a/src/ChangeLog b/src/ChangeLog index d7778e3a524..0b4ccb0708a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,12 @@ +2013-05-15 Stefan Monnier + + * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart. + 2013-05-14 Eli Zaretskii * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT - unless we know that the window w is a leaf window. Another - attempt at solving bug#14062. + unless we know that the window w is a leaf window. + Another attempt at solving bug#14062. 2013-05-14 Jan Djärv diff --git a/src/regex.c b/src/regex.c index 83d80b5aaa9..04429386f84 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2622,7 +2622,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct goto normal_char; handle_plus: case '*': - /* If there is no previous pattern... */ + /* If there is no previous pattern... */ if (!laststart) { if (syntax & RE_CONTEXT_INVALID_OPS) @@ -2730,7 +2730,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct } } else /* not greedy */ - { /* I wish the greedy and non-greedy cases could be merged. */ + { /* I wish the greedy and non-greedy cases could be merged. */ GET_BUFFER_SPACE (7); /* We might use less. */ if (many_times_ok) @@ -3034,7 +3034,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* Allocate space for COUNT + RANGE_TABLE. Needs two bytes for flags, two for COUNT, and three bytes for - each character. */ + each character. */ GET_BUFFER_SPACE (4 + used * 3); /* Indicate the existence of range table. */ @@ -3461,6 +3461,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* There is no way to specify the before_dot and after_dot operators. rms says this is ok. --karl */ case '=': + laststart = b; BUF_PUSH (at_dot); break; @@ -3509,12 +3510,14 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct case '<': if (syntax & RE_NO_GNU_OPS) goto normal_char; + laststart = b; BUF_PUSH (wordbeg); break; case '>': if (syntax & RE_NO_GNU_OPS) goto normal_char; + laststart = b; BUF_PUSH (wordend); break;