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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
9888177f
Commit
9888177f
authored
Oct 23, 2005
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(describe-simplify-lib-file-name): New function.
(describe-function-1, describe-variable): Use it.
parent
24c324f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lisp/help-fns.el
lisp/help-fns.el
+15
-0
No files found.
lisp/help-fns.el
View file @
9888177f
...
...
@@ -311,6 +311,19 @@ face (according to `face-differs-from-default-p')."
;; Return value is like the one from help-split-fundoc, but highlighted
(
cons
usage
doc
))
(
defun
describe-simplify-lib-file-name
(
file
)
"Simplify a library name FILE to a relative name, and make it a source file."
(
if
file
;; Try converting the absolute file name to a library name.
(
let
((
libname
(
file-name-nondirectory
file
)))
;; Now convert that back to a file name and see if we get
;; the original one. If so, they are equivalent.
(
if
(
equal
file
(
locate-file
libname
load-path
'
(
""
)))
(
if
(
string-match
"[.]elc?\\'"
libname
)
(
substring
libname
0
-1
)
libname
)
file
))))
;;;###autoload
(
defun
describe-function-1
(
function
)
(
let*
((
def
(
if
(
symbolp
function
)
...
...
@@ -363,6 +376,7 @@ face (according to `face-differs-from-default-p')."
(
help-xref-button
1
'help-function
def
)))))
(
or
file-name
(
setq
file-name
(
symbol-file
function
'defun
)))
(
setq
file-name
(
describe-simplify-lib-file-name
file-name
))
(
when
(
equal
file-name
"loaddefs.el"
)
;; Find the real def site of the preloaded function.
;; This is necessary only for defaliases.
...
...
@@ -531,6 +545,7 @@ it is displayed along with the global value."
;; change the format of the buffer's initial line in case
;; anything expects the current format.)
(
let
((
file-name
(
symbol-file
variable
'defvar
)))
(
setq
file-name
(
describe-simplify-lib-file-name
file-name
))
(
when
(
equal
file-name
"loaddefs.el"
)
;; Find the real def site of the preloaded variable.
(
let
((
location
...
...
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