summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eldoc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r--lisp/emacs-lisp/eldoc.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index c988cecd07..47f4dd470b 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -300,7 +300,7 @@ highlights argument number INDEX."
;; Remove any enclosing (), since e-function-argstring adds them.
(string-match "\\`[^ )]* ?" args)
(setq args (substring args (match-end 0)))
- (if (string-match ")\\'" args)
+ (if (string-match-p ")\\'" args)
(setq args (substring args 0 -1))))
(t
(setq args (help-function-arglist sym))))
@@ -338,7 +338,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
;; All the rest arguments are the same.
(setq index 1))
((string= argument "&optional"))
- ((string-match "\\.\\.\\.$" argument)
+ ((string-match-p "\\.\\.\\.$" argument)
(setq index 0))
(t
(setq index (1- index))))))
@@ -491,10 +491,10 @@ ARGLIST is either a string, or a list of strings or symbols."
"Apply `eldoc-argument-case' to each word in ARGSTRING.
The words \"&rest\", \"&optional\" are returned unchanged."
(mapconcat (lambda (s)
- (if (member s '("&optional" "&rest"))
+ (if (string-match-p "\\`(?&\\(?:optional\\|rest\\))?\\'" s)
s
(funcall eldoc-argument-case s)))
- (split-string argstring "[][ ()]+" t) " "))
+ (split-string argstring) " "))
;; When point is in a sexp, the function args are not reprinted in the echo