Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
542e904c
Commit
542e904c
authored
Sep 02, 2004
by
Juri Linkov
Browse files
(function-called-at-point): Try `find-tag-default' when other methods failed.
parent
fc11ddc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
26 deletions
+29
-26
lisp/help.el
lisp/help.el
+29
-26
No files found.
lisp/help.el
View file @
542e904c
...
...
@@ -237,32 +237,35 @@ C-w Display information on absence of warranty for GNU Emacs."
(
defun
function-called-at-point
()
"Return a function around point or else called by the list containing point.
If that doesn't give a function, return nil."
(
with-syntax-table
emacs-lisp-mode-syntax-table
(
or
(
condition-case
()
(
save-excursion
(
or
(
not
(
zerop
(
skip-syntax-backward
"_w"
)))
(
eq
(
char-syntax
(
following-char
))
?w
)
(
eq
(
char-syntax
(
following-char
))
?_
)
(
forward-sexp
-1
))
(
skip-chars-forward
"'"
)
(
let
((
obj
(
read
(
current-buffer
))))
(
and
(
symbolp
obj
)
(
fboundp
obj
)
obj
)))
(
error
nil
))
(
condition-case
()
(
save-excursion
(
save-restriction
(
narrow-to-region
(
max
(
point-min
)
(
-
(
point
)
1000
))
(
point-max
))
;; Move up to surrounding paren, then after the open.
(
backward-up-list
1
)
(
forward-char
1
)
;; If there is space here, this is probably something
;; other than a real Lisp function call, so ignore it.
(
if
(
looking-at
"[ \t]"
)
(
error
"Probably not a Lisp function call"
))
(
let
((
obj
(
read
(
current-buffer
))))
(
and
(
symbolp
obj
)
(
fboundp
obj
)
obj
))))
(
error
nil
)))))
(
or
(
with-syntax-table
emacs-lisp-mode-syntax-table
(
or
(
condition-case
()
(
save-excursion
(
or
(
not
(
zerop
(
skip-syntax-backward
"_w"
)))
(
eq
(
char-syntax
(
following-char
))
?w
)
(
eq
(
char-syntax
(
following-char
))
?_
)
(
forward-sexp
-1
))
(
skip-chars-forward
"'"
)
(
let
((
obj
(
read
(
current-buffer
))))
(
and
(
symbolp
obj
)
(
fboundp
obj
)
obj
)))
(
error
nil
))
(
condition-case
()
(
save-excursion
(
save-restriction
(
narrow-to-region
(
max
(
point-min
)
(
-
(
point
)
1000
))
(
point-max
))
;; Move up to surrounding paren, then after the open.
(
backward-up-list
1
)
(
forward-char
1
)
;; If there is space here, this is probably something
;; other than a real Lisp function call, so ignore it.
(
if
(
looking-at
"[ \t]"
)
(
error
"Probably not a Lisp function call"
))
(
let
((
obj
(
read
(
current-buffer
))))
(
and
(
symbolp
obj
)
(
fboundp
obj
)
obj
))))
(
error
nil
))))
(
let*
((
str
(
find-tag-default
))
(
obj
(
if
str
(
read
str
))))
(
and
(
symbolp
obj
)
(
fboundp
obj
)
obj
))))
;;; `User' help functions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment