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
24193f35
Commit
24193f35
authored
Jun 23, 1997
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(dired-add-entry): New optional arg RELATIVE.
(dired-update-file-line): Pass t for RELATIVE.
parent
846f6dd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
lisp/dired-aux.el
lisp/dired-aux.el
+8
-5
No files found.
lisp/dired-aux.el
View file @
24193f35
...
...
@@ -757,7 +757,7 @@ a prefix arg lets you edit the `ls' switches used for the new listing."
(
delete-region
(
point
)
(
progn
(
forward-line
1
)
(
point
)))
(
if
file
(
progn
(
dired-add-entry
file
)
(
dired-add-entry
file
nil
t
)
;; Replace space by old marker without moving point.
;; Faster than goto+insdel inside a save-excursion?
(
subst-char-in-region
opoint
(
1+
opoint
)
?\040
char
))))
...
...
@@ -790,7 +790,7 @@ a prefix arg lets you edit the `ls' switches used for the new listing."
(
file-name-directory
filename
)
(
file-name-nondirectory
filename
)
(
function
dired-add-entry
)
filename
marker-char
))
(
defun
dired-add-entry
(
filename
&optional
marker-char
)
(
defun
dired-add-entry
(
filename
&optional
marker-char
relative
)
;; Add a new entry for FILENAME, optionally marking it
;; with MARKER-CHAR (a character, else dired-marker-char is used).
;; Note that this adds the entry `out of order' if files sorted by
...
...
@@ -800,12 +800,15 @@ a prefix arg lets you edit the `ls' switches used for the new listing."
;; Hidden subdirs are exposed if a file is added there.
(
setq
filename
(
directory-file-name
filename
))
;; Entry is always for files, even if they happen to also be directories
(
let
((
opoint
(
point
))
(
let
*
((
opoint
(
point
))
(
cur-dir
(
dired-current-directory
))
(
orig-file-name
filename
)
(
directory
(
file-name-directory
filename
))
(
directory
(
if
relative
cur-dir
(
file-name-directory
filename
)
))
reason
)
(
setq
filename
(
file-name-nondirectory
filename
)
(
setq
filename
(
if
relative
(
file-relative-name
filename
directory
)
(
file-name-nondirectory
filename
))
reason
(
catch
'not-found
(
if
(
string=
directory
cur-dir
)
...
...
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