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
08f99a54
Commit
08f99a54
authored
Mar 11, 2006
by
Bill Wohler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mh-image-load-path-for-library): Merged changes from Reiner. Add
no-error argument. If path t, just return directory.
parent
4a732ae9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
lisp/mh-e/ChangeLog
lisp/mh-e/ChangeLog
+2
-0
lisp/mh-e/mh-compat.el
lisp/mh-e/mh-compat.el
+17
-5
No files found.
lisp/mh-e/ChangeLog
View file @
08f99a54
...
...
@@ -4,6 +4,8 @@
flag
to
replace
-
in
-
string
.
This
was
badly
needed
by
mh
-
quote
-
pick
-
expr
in
order
to
properly
quote
subjects
when
using
/
s
on
XEmacs
(
closes
SF
#
1447598
).
(
mh
-
image
-
load
-
path
-
for
-
library
):
Merged
changes
from
Reiner
.
Add
no
-
error
argument
.
If
path
t
,
just
return
directory
.
*
mh
-
e
.
el
(
mh
-
profile
-
component
):
Drop
`
s
' from mhparam
-components for Mailutils compatibility (closes SF #1446985).
...
...
lisp/mh-e/mh-compat.el
View file @
08f99a54
...
...
@@ -116,7 +116,7 @@ introduced in Emacs 22."
`
(
face-background
,
face
,
frame
,
inherit
)))
(
mh-defun-compat
mh-image-load-path-for-library
image-load-path-for-library
(
library
image
&optional
path
)
image-load-path-for-library
(
library
image
&optional
path
no-error
)
"Return a suitable search path for images relative to LIBRARY.
Images for LIBRARY are searched for in \"../../etc/images\" and
...
...
@@ -124,8 +124,12 @@ Images for LIBRARY are searched for in \"../../etc/images\" and
well as in `image-load-path' and `load-path'.
This function returns the value of `load-path' augmented with the
path to IMAGE. If PATH is given, it is used instead of
`load-path'.
directory containing IMAGE. If PATH is given, it is used instead
of `load-path'. If PATH is t, just return the directory that
contains IMAGE.
If NO-ERROR is non-nil, return nil if a suitable path can't be
found rather than signaling an error.
Here is an example that uses a common idiom to provide
compatibility with versions of Emacs that lack the variable
...
...
@@ -179,11 +183,19 @@ This function is used by Emacs versions that don't have
(
setq
img
(
directory-file-name
parent
)
dir
(
expand-file-name
"../"
dir
)))
(
setq
image-directory
dir
)))))
(
no-error
;; In this case we will return nil.
(
message
"Could not find image %s for library %s"
image
library
))
(
t
(
error
"Could not find image %s for library %s"
image
library
)))
;; Return augmented `image-load-path' or `load-path'.
(
cond
((
and
path
(
symbolp
path
))
;; Return the directory, nil if no-error was non-nil and a
;; suitable path could not be found, or an augmented
;; `image-load-path' or `load-path'.
(
cond
((
or
(
null
image-directory
)
(
eq
path
t
))
image-directory
)
((
and
path
(
symbolp
path
))
(
nconc
(
list
image-directory
)
(
delete
image-directory
(
if
(
boundp
path
)
...
...
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