diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 3 | ||||
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 4 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 21 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 3 | ||||
-rw-r--r-- | lisp/help.el | 5 | ||||
-rw-r--r-- | lisp/progmodes/js.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 4 |
7 files changed, 23 insertions, 19 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index ae52e8bebec..68abe67698c 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -299,7 +299,8 @@ FORM is of the form (ARGS . BODY)." ;; Be careful with make-symbol and (back)quote, ;; see bug#12884. (help--docstring-quote - (let ((print-gensym nil) (print-quoted t)) + (let ((print-gensym nil) (print-quoted t) + (print-escape-newlines t)) (format "%S" (cons 'fn (cl--make-usage-args orig-args)))))) header))) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index c625fd345c9..7bc966366bd 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -111,7 +111,7 @@ should insert the feature name." ;; (point-min), which is acceptable in this case. :type 'regexp :group 'xref - :version "25.0") + :version "25.1") (defcustom find-alias-regexp "(defalias +'%s" @@ -120,7 +120,7 @@ Note it must contain a `%s' at the place where `format' should insert the feature name." :type 'regexp :group 'xref - :version "25.0") + :version "25.1") (defvar find-function-regexp-alist '((nil . find-function-regexp) diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 7d5b7dc749d..46373da5eb9 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -265,17 +265,16 @@ a section." (defun lm-header (header) "Return the contents of the header named HEADER." - (save-excursion - (goto-char (point-min)) - (let ((case-fold-search t)) - (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) - ;; RCS ident likes format "$identifier: data$" - (looking-at - (if (save-excursion - (skip-chars-backward "^$" (match-beginning 0)) - (= (point) (match-beginning 0))) - "[^\n]+" "[^$\n]+"))) - (match-string-no-properties 0))))) + (goto-char (point-min)) + (let ((case-fold-search t)) + (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) + ;; RCS ident likes format "$identifier: data$" + (looking-at + (if (save-excursion + (skip-chars-backward "^$" (match-beginning 0)) + (= (point) (match-beginning 0))) + "[^\n]+" "[^$\n]+"))) + (match-string-no-properties 0)))) (defun lm-header-multiline (header) "Return the contents of the header named HEADER, with continuation lines. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c05bb53b0b3..fea184d6242 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1993,7 +1993,8 @@ Downloads and installs required packages as needed." ((derived-mode-p 'tar-mode) (package-tar-file-info)) (t - (package-buffer-info)))) + (save-excursion + (package-buffer-info))))) (name (package-desc-name pkg-desc))) ;; Download and install the dependencies. (let* ((requires (package-desc-reqs pkg-desc)) diff --git a/lisp/help.el b/lisp/help.el index 897cab5e371..b8485667ae0 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1412,7 +1412,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "") "\n\n") (if (stringp arglist) - (if (string-match "\\`[^ ]+\\(\\(?:.\\|\n\\)*\\))\\'" arglist) + (if (string-match "\\`[^ ]+\\(.*\\))\\'" arglist) (concat "(fn" (match-string 1 arglist) ")") (error "Unrecognized usage format")) (help--make-usage-docstring 'fn arglist))))) @@ -1485,7 +1485,8 @@ the same names as used in the original source code, when possible." (define-obsolete-function-alias 'help-make-usage 'help--make-usage "25.1") (defun help--make-usage-docstring (fn arglist) - (help--docstring-quote (format "%S" (help--make-usage fn arglist)))) + (let ((print-escape-newlines t)) + (help--docstring-quote (format "%S" (help--make-usage fn arglist))))) (provide 'help) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 9265e38e4bc..508195996b6 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1745,7 +1745,7 @@ This performs fontification according to `js--class-styles'." "Regular expression matching variable declaration keywords.") (defconst js--indent-operator-re - (concat "[-+*/%<>&^|?:.]\\([^-+*/]\\|$\\)\\|!?=\\|" + (concat "[-+*/%<>&^|?:.]\\([^-+*/.]\\|$\\)\\|!?=\\|" (js--regexp-opt-symbol '("in" "instanceof"))) "Regexp matching operators that affect indentation of continued expressions.") diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 972bf99145e..cd3b04de712 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1858,7 +1858,9 @@ It will be properly highlighted even when the call omits parens.") (string-to-syntax "'")))) ;; Symbols with special characters. ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)\\)" - (3 (string-to-syntax "_"))) + (3 (unless (nth 8 (syntax-ppss (match-beginning 3))) + (goto-char (match-end 0)) + (string-to-syntax "_")))) ;; Part of method name when at the end of it. ("[!?]" (0 (unless (save-excursion |