[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] dynamic-modules fa450f8 07/22: doc.c: use DOC format sanit
From: |
Noah Friedman |
Subject: |
[Emacs-diffs] dynamic-modules fa450f8 07/22: doc.c: use DOC format sanity checks instead of bytecompiled checks on module doc files. |
Date: |
Mon, 8 May 2017 19:46:13 -0400 (EDT) |
branch: dynamic-modules
commit fa450f82b985092c9b434b319e535b1e1b16a145
Author: Aurélien Aptel <address@hidden>
Commit: Ted Zlatanov <address@hidden>
doc.c: use DOC format sanity checks instead of bytecompiled checks on
module doc files.
---
src/doc.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/doc.c b/src/doc.c
index f4aa0c5..bc74553 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -56,6 +56,15 @@ read_bytecode_char (bool unreadflag)
return *read_bytecode_pointer++;
}
+/* A module doc file must have a doc extension */
+static bool
+doc_is_from_module_p (const char* path)
+{
+ int len = strlen (path);
+ return len > 4 && (strcmp (path + len - 4, ".doc") == 0
+ || (strcmp (path + len - 4, ".DOC") == 0));
+}
+
/* Extract a doc string from a file. FILEPOS says where to get it.
If it is an integer, use that position in the standard DOC file.
If it is (FILE . INTEGER), use FILE as the file name
@@ -211,7 +220,7 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool
definition)
SAFE_FREE ();
/* Sanity checking. */
- if (CONSP (filepos))
+ if (CONSP (filepos) && !doc_is_from_module_p (name))
{
int test = 1;
/* A dynamic docstring should be either at the very beginning of a "#@
- [Emacs-diffs] branch dynamic-modules created (now 9313182), Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules 14ea9e0 03/22: intern literal strings as regular string., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules 2010646 04/22: add sample module `fmod'., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules fa450f8 07/22: doc.c: use DOC format sanity checks instead of bytecompiled checks on module doc files.,
Noah Friedman <=
- [Emacs-diffs] dynamic-modules 5c710fb 01/22: add libltdl configure option/dependency., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules cc5fe95 09/22: move fmod module in modules/fmod/., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules eae5da9 20/22: yaml module: add `yaml-parse-string'., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules 01e2303 17/22: update modules examples with `provide' call., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules d2271bc 06/22: alloc.c: protect doc field from GC., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules 1be03fd 08/22: doc.c: don't prefix doc path by ../etc/ for modules, Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules c0eb5a6 05/22: change Subr doc field from char* to Lisp_Object., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules db69d49 12/22: new module: elisp, Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules 334564f 15/22: fix docstring., Noah Friedman, 2017/05/08
- [Emacs-diffs] dynamic-modules 18920eb 19/22: new yaml parsing module using libyaml, Noah Friedman, 2017/05/08