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
da5b5435
Commit
da5b5435
authored
Mar 05, 2008
by
Jason Rumney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert last change.
parent
ca8a12a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
38 deletions
+12
-38
src/ChangeLog
src/ChangeLog
+0
-3
src/fileio.c
src/fileio.c
+12
-35
No files found.
src/ChangeLog
View file @
da5b5435
...
...
@@ -2,9 +2,6 @@
* dispnew.c (adjust_glyph_matrix): Initialize window_height.
* fileio.c (Fexpand_file_name): Decode home directory names.
(Fsubstitute_in_file_name): Decode substituted variables.
2008-03-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* xdisp.c (handle_single_display_spec): Undo 2007-10-16 changes.
...
...
src/fileio.c
View file @
da5b5435
...
...
@@ -1408,19 +1408,6 @@ See also the function `substitute-in-file-name'. */)
}
}
/* Environment variables and pwnam entries may need decoding. */
if
(
newdir
)
{
Lisp_Object
orig
,
decoded
;
orig
=
make_unibyte_string
(
newdir
,
strlen
(
newdir
));
decoded
=
DECODE_FILE
(
orig
);
if
(
decoded
!=
orig
)
{
newdir
=
SDATA
(
decoded
);
multibyte
=
1
;
}
}
#ifdef DOS_NT
/* On DOS and Windows, nm is absolute if a drive name was specified;
use the drive's current directory as the prefix if needed. */
...
...
@@ -2162,14 +2149,11 @@ duplicates what `expand-file-name' does. */)
unsigned
char
*
target
=
NULL
;
int
total
=
0
;
int
substituted
=
0
;
int
multibyte
;
unsigned
char
*
xnm
;
Lisp_Object
handler
;
CHECK_STRING
(
filename
);
multibyte
=
STRING_MULTIBYTE
(
filename
);
/* If the file name has special constructs in it,
call the corresponding file handler. */
handler
=
Ffind_file_name_handler
(
filename
,
Qsubstitute_in_file_name
);
...
...
@@ -2191,7 +2175,8 @@ duplicates what `expand-file-name' does. */)
again. Important with filenames like "/home/foo//:/hello///there"
which whould substitute to "/:/hello///there" rather than "/there". */
return
Fsubstitute_in_file_name
(
make_specified_string
(
p
,
-
1
,
endp
-
p
,
multibyte
));
(
make_specified_string
(
p
,
-
1
,
endp
-
p
,
STRING_MULTIBYTE
(
filename
)));
#ifdef VMS
return
filename
;
...
...
@@ -2242,10 +2227,7 @@ duplicates what `expand-file-name' does. */)
o
=
(
unsigned
char
*
)
egetenv
(
target
);
if
(
o
)
{
Lisp_Object
orig
,
decoded
;
orig
=
make_unibyte_string
(
o
,
strlen
(
o
));
decoded
=
DECODE_FILE
(
orig
);
total
+=
SBYTES
(
decoded
);
total
+=
strlen
(
o
);
substituted
=
1
;
}
else
if
(
*
p
==
'}'
)
...
...
@@ -2303,26 +2285,21 @@ duplicates what `expand-file-name' does. */)
*
x
++
=
'$'
;
strcpy
(
x
,
target
);
x
+=
strlen
(
target
);
}
else
else
if
(
STRING_MULTIBYTE
(
filename
))
{
Lisp_Object
orig
,
decoded
;
orig
=
make_unibyte_string
(
o
,
strlen
(
o
));
decoded
=
DECODE_FILE
(
orig
);
strncpy
(
x
,
SDATA
(
decoded
),
SBYTES
(
decoded
));
x
+=
SBYTES
(
decoded
);
/* If environment variable needed decoding, return value
needs to be multibyte. */
if
(
decoded
!=
orig
)
multibyte
=
1
;
/* If the original string is multibyte,
convert what we substitute into multibyte. */
while
(
*
o
)
{
int
c
=
unibyte_char_to_multibyte
(
*
o
++
);
x
+=
CHAR_STRING
(
c
,
x
);
}
}
#if 0
else
{
strcpy
(
x
,
o
);
x
+=
strlen
(
o
);
}
#endif
}
*
x
=
0
;
...
...
@@ -2334,7 +2311,7 @@ duplicates what `expand-file-name' does. */)
need to quote some $ to $$ first. */
xnm
=
p
;
return
make_specified_string
(
xnm
,
-
1
,
x
-
xnm
,
multibyte
);
return
make_specified_string
(
xnm
,
-
1
,
x
-
xnm
,
STRING_MULTIBYTE
(
filename
)
);
badsubst:
error
(
"Bad format environment-variable substitution"
);
...
...
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