diff options
| author | Juanma Barranquero | 2009-01-24 11:34:57 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2009-01-24 11:34:57 +0000 |
| commit | eec6d5b71003c1a24dcb3b4f0465881a429aeb65 (patch) | |
| tree | 87700128e31578e32a10553c4bf81825c0a2e53c /lisp | |
| parent | 80016d6e511bc886105692e44a8408c044b0c003 (diff) | |
| download | emacs-eec6d5b71003c1a24dcb3b4f0465881a429aeb65.tar.gz emacs-eec6d5b71003c1a24dcb3b4f0465881a429aeb65.zip | |
* 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'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eldoc.el | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f3e42ab05a..44aa9245765 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2009-01-24 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacs-lisp/eldoc.el (eldoc-function-argstring-format): | ||
| 4 | Revert 2007-09-26 change; use `string-match-p' to check for &keywords. | ||
| 5 | (eldoc-get-fnsym-args-string, eldoc-highlight-function-argument): | ||
| 6 | Use `string-match-p'. | ||
| 7 | |||
| 1 | 2009-01-24 Ulf Jasper <ulf.jasper@web.de> | 8 | 2009-01-24 Ulf Jasper <ulf.jasper@web.de> |
| 2 | 9 | ||
| 3 | * net/newst-treeview.el (newsticker--treeview-first-feed): New. | 10 | * 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." | |||
| 300 | ;; Remove any enclosing (), since e-function-argstring adds them. | 300 | ;; Remove any enclosing (), since e-function-argstring adds them. |
| 301 | (string-match "\\`[^ )]* ?" args) | 301 | (string-match "\\`[^ )]* ?" args) |
| 302 | (setq args (substring args (match-end 0))) | 302 | (setq args (substring args (match-end 0))) |
| 303 | (if (string-match ")\\'" args) | 303 | (if (string-match-p ")\\'" args) |
| 304 | (setq args (substring args 0 -1)))) | 304 | (setq args (substring args 0 -1)))) |
| 305 | (t | 305 | (t |
| 306 | (setq args (help-function-arglist sym)))) | 306 | (setq args (help-function-arglist sym)))) |
| @@ -338,7 +338,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'." | |||
| 338 | ;; All the rest arguments are the same. | 338 | ;; All the rest arguments are the same. |
| 339 | (setq index 1)) | 339 | (setq index 1)) |
| 340 | ((string= argument "&optional")) | 340 | ((string= argument "&optional")) |
| 341 | ((string-match "\\.\\.\\.$" argument) | 341 | ((string-match-p "\\.\\.\\.$" argument) |
| 342 | (setq index 0)) | 342 | (setq index 0)) |
| 343 | (t | 343 | (t |
| 344 | (setq index (1- index)))))) | 344 | (setq index (1- index)))))) |
| @@ -491,10 +491,10 @@ ARGLIST is either a string, or a list of strings or symbols." | |||
| 491 | "Apply `eldoc-argument-case' to each word in ARGSTRING. | 491 | "Apply `eldoc-argument-case' to each word in ARGSTRING. |
| 492 | The words \"&rest\", \"&optional\" are returned unchanged." | 492 | The words \"&rest\", \"&optional\" are returned unchanged." |
| 493 | (mapconcat (lambda (s) | 493 | (mapconcat (lambda (s) |
| 494 | (if (member s '("&optional" "&rest")) | 494 | (if (string-match-p "\\`(?&\\(?:optional\\|rest\\))?\\'" s) |
| 495 | s | 495 | s |
| 496 | (funcall eldoc-argument-case s))) | 496 | (funcall eldoc-argument-case s))) |
| 497 | (split-string argstring "[][ ()]+" t) " ")) | 497 | (split-string argstring) " ")) |
| 498 | 498 | ||
| 499 | 499 | ||
| 500 | ;; When point is in a sexp, the function args are not reprinted in the echo | 500 | ;; When point is in a sexp, the function args are not reprinted in the echo |