File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -1274,20 +1274,22 @@ current `tags-file-name'."
1274
1274
nil )))
1275
1275
1276
1276
(defun php-show-arglist ()
1277
+ " Show function arguments at cursor position."
1277
1278
(interactive )
1278
1279
(let* ((tagname (php-get-pattern))
1279
1280
(buf (find-tag-noselect tagname nil nil ))
1280
1281
arglist)
1281
1282
(with-current-buffer buf
1282
- (goto-char (point-min ))
1283
- (when (re-search-forward
1284
- (format " function\\ s-+%s \\ s-*(\\ ([^{]*\\ )) " tagname)
1285
- nil t )
1286
- (setq arglist (buffer-substring-no-properties
1287
- (match-beginning 1 ) (match-end 1 )))))
1283
+ (save-excursion
1284
+ (goto-char (point-min ))
1285
+ (when (re-search-forward
1286
+ (format " function\\ s-+%s \\ s-*(\\ ([^{]*\\ )) " tagname)
1287
+ nil t )
1288
+ (setq arglist (buffer-substring-no-properties
1289
+ (match-beginning 1 ) (match-end 1 ))))))
1288
1290
(if arglist
1289
1291
(message " Arglist for %s : %s " tagname arglist)
1290
- (message " Unknown function: %s " tagname))))
1292
+ (message " Unknown function: %s " tagname))))
1291
1293
1292
1294
(defcustom php-search-documentation-browser-function nil
1293
1295
" Function to display PHP documentation in a WWW browser.
You can’t perform that action at this time.
0 commit comments