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
75fa7206
Commit
75fa7206
authored
Dec 21, 2004
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fread_file_name): Delete duplicates in
file-name-history when history_delete_duplicates is true.
parent
f10fffca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
src/fileio.c
src/fileio.c
+13
-3
No files found.
src/fileio.c
View file @
75fa7206
...
...
@@ -228,6 +228,8 @@ extern int minibuf_level;
extern
int
minibuffer_auto_raise
;
extern
int
history_delete_duplicates
;
/* These variables describe handlers that have "already" had a chance
to handle the current operation.
...
...
@@ -6383,7 +6385,13 @@ and `read-file-name-function'. */)
if
(
replace_in_history
)
/* Replace what Fcompleting_read added to the history
with what we will actually return. */
XSETCAR (Fsymbol_value (Qfile_name_history), double_dollars (val));
{
Lisp_Object
val1
=
double_dollars
(
val
);
tem
=
Fsymbol_value
(
Qfile_name_history
);
if
(
history_delete_duplicates
)
XSETCDR
(
tem
,
Fdelete
(
val1
,
XCDR
(
tem
)));
XSETCAR
(
tem
,
val1
);
}
else
if
(
add_to_history
)
{
/* Add the value to the history--but not if it matches
...
...
@@ -6391,8 +6399,10 @@ and `read-file-name-function'. */)
Lisp_Object
val1
=
double_dollars
(
val
);
tem
=
Fsymbol_value
(
Qfile_name_history
);
if
(
!
CONSP
(
tem
)
||
NILP
(
Fequal
(
XCAR
(
tem
),
val1
)))
Fset (Qfile_name_history,
Fcons (val1, tem));
{
if
(
history_delete_duplicates
)
tem
=
Fdelete
(
val1
,
tem
);
Fset
(
Qfile_name_history
,
Fcons
(
val1
,
tem
));
}
}
return
val
;
...
...
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