[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2ef3111b136: * lisp/info-xref.el (info-xref-subfile-p): Avoid fal
From: |
Michael Albinus |
Subject: |
master 2ef3111b136: * lisp/info-xref.el (info-xref-subfile-p): Avoid false positives. (Bug#68428) |
Date: |
Mon, 15 Jan 2024 10:55:41 -0500 (EST) |
branch: master
commit 2ef3111b136599ee26ec4316199677107bffedbc
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
* lisp/info-xref.el (info-xref-subfile-p): Avoid false positives.
(Bug#68428)
---
lisp/info-xref.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/info-xref.el b/lisp/info-xref.el
index 7887909037b..95e9a1e55f7 100644
--- a/lisp/info-xref.el
+++ b/lisp/info-xref.el
@@ -79,9 +79,11 @@ If removing the last \"-<NUM>\" from the filename gives a
file
which exists, then consider FILENAME a subfile. This is an
imperfect test, probably ought to open up the purported top file
and see what subfiles it says."
- (and (string-match "\\`\\(\\([^-]*-\\)*[^-]*\\)-[0-9]+\\(.*\\)\\'" filename)
- (file-exists-p (concat (match-string 1 filename)
- (match-string 3 filename)))))
+ (let ((nondir (file-name-nondirectory filename)))
+ (and (string-match "\\`\\(\\([^-]*-\\)*[^-]*\\)-[0-9]+\\(.*\\)\\'" nondir)
+ (file-exists-p (concat (file-name-directory filename)
+ (match-string 1 nondir)
+ (match-string 3 nondir))))))
(defmacro info-xref-with-file (filename &rest body)
;; checkdoc-params: (filename body)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 2ef3111b136: * lisp/info-xref.el (info-xref-subfile-p): Avoid false positives. (Bug#68428),
Michael Albinus <=