summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2005-03-04 16:20:30 +0000
committerThien-Thi Nguyen <ttn@gnuvola.org>2005-03-04 16:20:30 +0000
commita4ec2352f411a2d2ffdf524fee1a20d46e035ea5 (patch)
tree8d4e94b30fc315e5c7f32894dce7b17358aafe2d
parentfae518d47d51dcc317724648d1767ff94b12bac7 (diff)
downloademacs-a4ec2352f411a2d2ffdf524fee1a20d46e035ea5.tar.gz
(munge_doc_file_name) [VMS]: Use NO_HYPHENS_IN_FILENAMES, not VMS4_4.
(Fsnarf_documentation): Call munge_doc_file_name.
-rw-r--r--src/ChangeLog2
-rw-r--r--src/doc.c36
2 files changed, 12 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c63cd0d69f8..3492a48c360 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -4,6 +4,8 @@
* s/vms4-4.h, s/vms5-5.h: Undefine NO_HYPHENS_IN_FILENAMES.
* fileio.c (Fexpand_file_name) [VMS]:
Use NO_HYPHENS_IN_FILENAMES, not VMS4_4.
+ * doc.c (munge_doc_file_name) [VMS]: Likewise.
+ (Fsnarf_documentation): Call munge_doc_file_name.
2005-03-03 Thien-Thi Nguyen <ttn@gnu.org>
diff --git a/src/doc.c b/src/doc.c
index 8f888316f7a..6b70c37057a 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -58,7 +58,9 @@ munge_doc_file_name (name)
char *name;
{
#ifdef VMS
-#ifndef VMS4_4
+#ifndef NO_HYPHENS_IN_FILENAMES
+ strcpy (name, sys_translate_unix (name));
+#else /* NO_HYPHENS_IN_FILENAMES */
/* For VMS versions with limited file name syntax,
convert the name to something VMS will allow. */
p = name;
@@ -68,10 +70,7 @@ munge_doc_file_name (name)
*p = '_';
p++;
}
-#endif /* not VMS4_4 */
-#ifdef VMS4_4
- strcpy (name, sys_translate_unix (name));
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
#endif /* VMS */
}
@@ -144,7 +143,7 @@ get_doc_string (filepos, unibyte, definition)
if (!STRINGP (file))
return Qnil;
-
+
/* Put the file name in NAME as a C string.
If it is relative, combine it with Vdoc_directory. */
@@ -314,12 +313,12 @@ string is passed through `substitute-command-keys'.")
Lisp_Object tem, doc;
doc = Qnil;
-
+
if (SYMBOLP (function)
&& (tem = Fget (function, Qfunction_documentation),
!NILP (tem)))
return Fdocumentation_property (function, Qfunction_documentation, raw);
-
+
fun = Findirect_function (function);
if (SUBRP (fun))
{
@@ -412,7 +411,7 @@ aren't strings.")
else if (!STRINGP (tem))
/* Feval protects its argument. */
tem = Feval (tem);
-
+
if (NILP (raw) && STRINGP (tem))
tem = Fsubstitute_command_keys (tem);
return tem;
@@ -497,22 +496,7 @@ when doc strings are referred to later in the dumped Emacs.")
strcpy (name, XSTRING (Vdoc_directory)->data);
#endif /* CANNOT_DUMP */
strcat (name, XSTRING (filename)->data); /*** Add this line ***/
-#ifdef VMS
-#ifndef VMS4_4
- /* For VMS versions with limited file name syntax,
- convert the name to something VMS will allow. */
- p = name;
- while (*p)
- {
- if (*p == '-')
- *p = '_';
- p++;
- }
-#endif /* not VMS4_4 */
-#ifdef VMS4_4
- strcpy (name, sys_translate_unix (name));
-#endif /* VMS4_4 */
-#endif /* VMS */
+ munge_doc_file_name (name);
fd = emacs_open (name, O_RDONLY, 0);
if (fd < 0)
@@ -814,7 +798,7 @@ syms_of_doc ()
{
Qfunction_documentation = intern ("function-documentation");
staticpro (&Qfunction_documentation);
-
+
DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name,
"Name of file containing documentation strings of built-in symbols.");
Vdoc_file_name = Qnil;