diff options
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/etags.el | 13 | ||||
| -rw-r--r-- | lisp/progmodes/hideshow.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 11 |
3 files changed, 15 insertions, 10 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index cc5f0fef934..6bb86738df0 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -809,10 +809,11 @@ If no tags table is loaded, do nothing and return nil." | |||
| 809 | beg) | 809 | beg) |
| 810 | (when pattern | 810 | (when pattern |
| 811 | (save-excursion | 811 | (save-excursion |
| 812 | (search-backward pattern) ;FIXME: will fail if we're inside pattern. | 812 | (forward-char (1- (length pattern))) |
| 813 | (setq beg (point)) | 813 | (search-backward pattern) |
| 814 | (forward-char (length pattern)) | 814 | (setq beg (point)) |
| 815 | (list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))) | 815 | (forward-char (length pattern)) |
| 816 | (list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))) | ||
| 816 | 817 | ||
| 817 | (defun find-tag-tag (string) | 818 | (defun find-tag-tag (string) |
| 818 | "Read a tag name, with defaulting and completion." | 819 | "Read a tag name, with defaulting and completion." |
| @@ -1409,7 +1410,9 @@ hits the start of file." | |||
| 1409 | tag tag-info pt) | 1410 | tag tag-info pt) |
| 1410 | (forward-line 1) | 1411 | (forward-line 1) |
| 1411 | (while (not (or (eobp) (looking-at "\f"))) | 1412 | (while (not (or (eobp) (looking-at "\f"))) |
| 1412 | (setq tag-info (save-excursion (funcall snarf-tag-function t)) | 1413 | ;; We used to use explicit tags when available, but the current goto-func |
| 1414 | ;; can only handle implicit tags. | ||
| 1415 | (setq tag-info (save-excursion (funcall snarf-tag-function nil)) | ||
| 1413 | tag (car tag-info) | 1416 | tag (car tag-info) |
| 1414 | pt (with-current-buffer standard-output (point))) | 1417 | pt (with-current-buffer standard-output (point))) |
| 1415 | (princ tag) | 1418 | (princ tag) |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 104a8f96727..26db60ddbc2 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -607,6 +607,7 @@ as cdr." | |||
| 607 | ;; forward comment, and see if we are inside, then extend | 607 | ;; forward comment, and see if we are inside, then extend |
| 608 | ;; forward and backward as long as we have comments | 608 | ;; forward and backward as long as we have comments |
| 609 | (let ((q (point))) | 609 | (let ((q (point))) |
| 610 | (skip-chars-forward "[:blank:]") | ||
| 610 | (when (or (looking-at hs-c-start-regexp) | 611 | (when (or (looking-at hs-c-start-regexp) |
| 611 | (re-search-backward hs-c-start-regexp (point-min) t)) | 612 | (re-search-backward hs-c-start-regexp (point-min) t)) |
| 612 | ;; first get to the beginning of this comment... | 613 | ;; first get to the beginning of this comment... |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index bf264972940..66aa256f947 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -96,7 +96,7 @@ | |||
| 96 | (regexp-opt (append ruby-modifier-beg-keywords ruby-block-op-keywords)) | 96 | (regexp-opt (append ruby-modifier-beg-keywords ruby-block-op-keywords)) |
| 97 | "Regexp to match hanging block modifiers.") | 97 | "Regexp to match hanging block modifiers.") |
| 98 | 98 | ||
| 99 | (defconst ruby-block-end-re "\\<end\\>") | 99 | (defconst ruby-block-end-re "\\_<end\\_>") |
| 100 | 100 | ||
| 101 | (eval-and-compile | 101 | (eval-and-compile |
| 102 | (defconst ruby-here-doc-beg-re | 102 | (defconst ruby-here-doc-beg-re |
| @@ -115,9 +115,9 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 115 | (match-string 6))))) | 115 | (match-string 6))))) |
| 116 | 116 | ||
| 117 | (defconst ruby-delimiter | 117 | (defconst ruby-delimiter |
| 118 | (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\(" | 118 | (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\_<\\(" |
| 119 | ruby-block-beg-re | 119 | ruby-block-beg-re |
| 120 | "\\)\\>\\|" ruby-block-end-re | 120 | "\\)\\_>\\|" ruby-block-end-re |
| 121 | "\\|^=begin\\|" ruby-here-doc-beg-re)) | 121 | "\\|^=begin\\|" ruby-here-doc-beg-re)) |
| 122 | 122 | ||
| 123 | (defconst ruby-negative | 123 | (defconst ruby-negative |
| @@ -166,6 +166,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 166 | (modify-syntax-entry ?$ "." table) | 166 | (modify-syntax-entry ?$ "." table) |
| 167 | (modify-syntax-entry ?? "_" table) | 167 | (modify-syntax-entry ?? "_" table) |
| 168 | (modify-syntax-entry ?_ "_" table) | 168 | (modify-syntax-entry ?_ "_" table) |
| 169 | (modify-syntax-entry ?: "_" table) | ||
| 169 | (modify-syntax-entry ?< "." table) | 170 | (modify-syntax-entry ?< "." table) |
| 170 | (modify-syntax-entry ?> "." table) | 171 | (modify-syntax-entry ?> "." table) |
| 171 | (modify-syntax-entry ?& "." table) | 172 | (modify-syntax-entry ?& "." table) |
| @@ -565,7 +566,7 @@ and `\\' when preceded by `?'." | |||
| 565 | (setq nest (cons (cons nil pnt) nest)) | 566 | (setq nest (cons (cons nil pnt) nest)) |
| 566 | (setq depth (1+ depth)))) | 567 | (setq depth (1+ depth)))) |
| 567 | (goto-char (match-end 0))) | 568 | (goto-char (match-end 0))) |
| 568 | ((looking-at (concat "\\<\\(" ruby-block-beg-re "\\)\\>")) | 569 | ((looking-at (concat "\\_<\\(" ruby-block-beg-re "\\)\\_>")) |
| 569 | (and | 570 | (and |
| 570 | (save-match-data | 571 | (save-match-data |
| 571 | (or (not (looking-at (concat "do" ruby-keyword-end-re))) | 572 | (or (not (looking-at (concat "do" ruby-keyword-end-re))) |
| @@ -864,7 +865,7 @@ move backward." | |||
| 864 | ;; It seems like it should move to the line where indentation should deepen, | 865 | ;; It seems like it should move to the line where indentation should deepen, |
| 865 | ;; but ruby-indent-beg-re only accounts for whitespace before class, module and def, | 866 | ;; but ruby-indent-beg-re only accounts for whitespace before class, module and def, |
| 866 | ;; so this will only match other block beginners at the beginning of the line. | 867 | ;; so this will only match other block beginners at the beginning of the line. |
| 867 | (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\b") nil 'move) | 868 | (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\_>") nil 'move) |
| 868 | (beginning-of-line))) | 869 | (beginning-of-line))) |
| 869 | 870 | ||
| 870 | (defun ruby-move-to-block (n) | 871 | (defun ruby-move-to-block (n) |