File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1141,8 +1141,9 @@ There can be any number of :example/:result elements."
1141
1141
:eval (sqrt -1 )))
1142
1142
1143
1143
;;;### autoload
1144
- (defun shortdoc-display-group (group )
1145
- " Pop to a buffer with short documentation summary for functions in GROUP."
1144
+ (defun shortdoc-display-group (group &optional function )
1145
+ " Pop to a buffer with short documentation summary for functions in GROUP.
1146
+ If FUNCTION is non-nil, place point on the entry for FUNCTION (if any)."
1146
1147
(interactive (list (completing-read " Show summary for functions in: "
1147
1148
(mapcar #'car shortdoc--groups))))
1148
1149
(when (stringp group)
@@ -1173,15 +1174,17 @@ There can be any number of :example/:result elements."
1173
1174
(setq prev t )
1174
1175
(shortdoc--display-function data))))
1175
1176
(cdr (assq group shortdoc--groups))))
1176
- (goto-char (point-min )))
1177
+ (goto-char (point-min ))
1178
+ (when function
1179
+ (text-property-search-forward 'shortdoc-function function t )
1180
+ (beginning-of-line )))
1177
1181
1178
1182
(defun shortdoc--display-function (data )
1179
1183
(let ((function (pop data ))
1180
1184
(start-section (point ))
1181
1185
arglist-start)
1182
1186
; ; Function calling convention.
1183
- (insert (propertize " ("
1184
- 'shortdoc-function t ))
1187
+ (insert (propertize " (" 'shortdoc-function function))
1185
1188
(if (plist-get data :no-manual )
1186
1189
(insert-text-button
1187
1190
(symbol-name function)
Original file line number Diff line number Diff line change @@ -752,7 +752,7 @@ FILE is the file where FUNCTION was probably defined."
752
752
(insert-text-button
753
753
(symbol-name group)
754
754
'action (lambda (_ )
755
- (shortdoc-display-group group))
755
+ (shortdoc-display-group group object ))
756
756
'follow-link t
757
757
'help-echo (purecopy " mouse-1, RET: show documentation group" )))
758
758
groups)
You can’t perform that action at this time.
0 commit comments