From: Juanma Barranquero Date: Sat, 24 Jan 2009 11:34:57 +0000 (+0000) Subject: * emacs-lisp/eldoc.el (eldoc-function-argstring-format): X-Git-Tag: emacs-pretest-23.0.90~240 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eec6d5b71003c1a24dcb3b4f0465881a429aeb65;p=emacs.git * emacs-lisp/eldoc.el (eldoc-function-argstring-format): Revert 2007-09-26 change; use `string-match-p' to check for &keywords. (eldoc-get-fnsym-args-string, eldoc-highlight-function-argument): Use `string-match-p'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f3e42ab05a..44aa9245765 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2009-01-24 Juanma Barranquero + + * emacs-lisp/eldoc.el (eldoc-function-argstring-format): + Revert 2007-09-26 change; use `string-match-p' to check for &keywords. + (eldoc-get-fnsym-args-string, eldoc-highlight-function-argument): + Use `string-match-p'. + 2009-01-24 Ulf Jasper * net/newst-treeview.el (newsticker--treeview-first-feed): New. diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index c988cecd07b..47f4dd470bc 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