diff options
| author | K. Handa <handa@gnu.org> | 2015-09-27 17:06:12 +0900 |
|---|---|---|
| committer | K. Handa <handa@gnu.org> | 2015-09-27 17:06:12 +0900 |
| commit | 52beda922d2cb523a03661bf74b8678c8b45e440 (patch) | |
| tree | 04617b37298746a61d5324a5b35c9b71f439d762 /lisp/progmodes/ruby-mode.el | |
| parent | 94ed5167557112fb00eeca05e62589db744206de (diff) | |
| parent | 1ac5a9c20cb22efb398fa18781c6b932dd4e54df (diff) | |
| download | emacs-52beda922d2cb523a03661bf74b8678c8b45e440.tar.gz | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 5d59a56e858..09338860c75 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -695,7 +695,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." (let ((index-alist '()) (case-fold-search nil) name next pos decl sing) (goto-char beg) - (while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^\(<\n ]+\\)\\|\\(def\\|alias\\)\\s +\\([^\(\n ]+\\)\\)" end t) + (while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^(<\n ]+\\)\\|\\(def\\|alias\\)\\s +\\([^(\n ]+\\)\\)" end t) (setq sing (match-beginning 3)) (setq decl (match-string 5)) (setq next (match-end 0)) @@ -709,7 +709,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." (if prefix (setq name (cond - ((string-match "^self\." name) + ((string-match "^self\\." name) (concat (substring prefix 0 -1) (substring name 4))) (t (concat prefix name))))) (push (cons name pos) index-alist) @@ -1795,7 +1795,7 @@ If the result is do-end block, it will always be multiline." (setq content (if (equal string-quote "\"") (replace-regexp-in-string "\\\\\"" "\"" (replace-regexp-in-string "\\([^\\\\]\\)'" "\\1\\\\'" content)) - (replace-regexp-in-string "\\\\\'" "'" (replace-regexp-in-string "\\([^\\\\]\\)\"" "\\1\\\\\"" content)))) + (replace-regexp-in-string "\\\\'" "'" (replace-regexp-in-string "\\([^\\\\]\\)\"" "\\1\\\\\"" content)))) (let ((orig-point (point))) (delete-region min max) (insert @@ -2007,7 +2007,8 @@ It will be properly highlighted even when the call omits parens.") (t (error (concat "Internal error on `ruby-in-ppss-context-p': " - "context name `" (symbol-name context) "' is unknown")))) + "context name `%s' is unknown") + context))) t))) (defvar ruby-font-lock-syntax-table @@ -2192,7 +2193,7 @@ See `font-lock-syntax-table'.") ;; Constants. ("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)" 1 (unless (eq ?\( (char-after)) font-lock-type-face)) - ("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" + ("\\(^\\s *\\|[[{(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" (2 font-lock-constant-face)) ;; Conversion methods on Kernel. (,(concat ruby-font-lock-keyword-beg-re |
