[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/hyperbole-lexbind 91e8a73 02/20: Add texinfo pathname sec
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/hyperbole-lexbind 91e8a73 02/20: Add texinfo pathname section references; improve internal image links |
Date: |
Wed, 14 Aug 2019 04:30:20 -0400 (EDT) |
branch: scratch/hyperbole-lexbind
commit 91e8a736a046dc1f6e0aa7d6bf4f94877ac247ca
Author: Bob Weiner <address@hidden>
Commit: Bob Weiner <address@hidden>
Add texinfo pathname section references;improve internal image links
---
hibtypes.el | 2 +-
hpath.el | 26 ++++++++++++++++----------
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/hibtypes.el b/hibtypes.el
index 07965ab..d8eb9e0 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -730,7 +730,7 @@ in grep and shell buffers."
(beginning-of-line)
(if (or
;; Grep matches, UNIX C compiler and Introl 68HC11 C compiler errors
- (looking-at "\\([^ \t\n\r:]+\\): ?\\([1-9][0-9]*\\)[ :]")
+ (looking-at "\\([^ \t\n\r:]+\\)[:\^@] ?\\([1-9][0-9]*\\)[ :]")
;; HP C compiler errors
(looking-at "[a-zA-Z0-9]+: \"\\([^\t\n\r\",]+\\)\", line
\\([0-9]+\\):")
;; BSO/Tasking 68HC08 C compiler errors
diff --git a/hpath.el b/hpath.el
index 9b4f416..83f02c2 100644
--- a/hpath.el
+++ b/hpath.el
@@ -502,7 +502,7 @@ use with string-match.")
(defconst hpath:markup-link-anchor-regexp
(concat "\\`\\(#?[^#]+\\)\\(#\\)\\([^\]\[#^{}<>\"`'\\\n\t\f\r]*\\)")
- "Regexp that matches an markup filename followed by a hash (#) and an
optional in-file anchor name.")
+ "Regexp that matches a markup filename followed by a hash (#) and an
optional in-file anchor name.")
(defconst hpath:outline-section-pattern "^\*+[ \t]+%s\\([ \t[:punct:]]*\\)$"
"Regexp matching an Emacs outline section header and containing a %s for
replacement of a specific section name.")
@@ -518,6 +518,9 @@ These are used to indicate how to display or execute the
pathname.
"\\`/[^/:]+:\\|\\`ftp[:.]\\|\\`www\\.\\|\\`https?:"
"Regexp matching remote pathnames and urls which invoke remote file
handlers.")
+(defconst hpath:texinfo-section-pattern "^@node+[ \t]+%s[ \t]*\\(,\\|$\\)"
+ "Regexp matching a Texinfo section header and containing a %s for
replacement of a specific section name.")
+
;;; ************************************************************************
;;; Public functions
;;; ************************************************************************
@@ -799,7 +802,8 @@ Returns non-nil iff file is displayed within a buffer (not
with an external
program)."
(interactive "FFind file: ")
(let ((case-fold-search t)
- modifier loc default-directory anchor hash path)
+ (default-directory default-directory)
+ modifier loc anchor hash path)
(if (string-match hpath:prefix-regexp filename)
(setq modifier (aref filename 0)
filename (substring filename (match-end 0))))
@@ -892,9 +896,11 @@ program)."
(anchor-name (subst-char-in-string ?- ?\ anchor)))
(goto-char (point-min))
(if (re-search-forward (format
- (if (string-match
hpath:markdown-suffix-regexp buffer-file-name)
- hpath:markdown-section-pattern
- hpath:outline-section-pattern)
+ (cond ((string-match
hpath:markdown-suffix-regexp buffer-file-name)
+ hpath:markdown-section-pattern)
+ ((eq major-mode 'texinfo-mode)
+ hpath:texinfo-section-pattern)
+ (t
hpath:outline-section-pattern))
(regexp-quote anchor-name)) nil t)
(progn (forward-line 0)
(recenter 0))
@@ -1508,15 +1514,15 @@ from path or t."
Return nil if FILENAME is a directory name or an image file that emacs can
display.
See also documentation for the function (hpath:get-external-display-alist) and
the variable
`hpath:internal-display-alist'."
- (cond ((let ((case-fold-search t))
- (hpath:match filename (hpath:get-external-display-alist))))
+ (cond ((and (fboundp 'image-mode)
+ (string-match hpath:native-image-suffixes filename))
+ nil)
((let ((case-fold-search nil))
(hpath:match filename hpath:internal-display-alist)))
+ ((let ((case-fold-search t))
+ (hpath:match filename (hpath:get-external-display-alist))))
((and (stringp filename) (file-directory-p filename))
nil)
- ((and (fboundp 'image-mode)
- (string-match hpath:native-image-suffixes filename))
- nil)
;; 01/21/2019 - RSW commented this next line out since it can
;; trigger external viewers on many file types that Emacs
;; displays natively.
- [elpa] scratch/hyperbole-lexbind updated (98a5ecb -> 6e555e7), Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind a65ee22 03/20: Small coding improvements, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 91e8a73 02/20: Add texinfo pathname section references; improve internal image links,
Stefan Monnier <=
- [elpa] scratch/hyperbole-lexbind e1a95cc 04/20: Improve paragraph filling to match newer Emacs versions, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 60d51ad 12/20: Remove last references to XEmscs and xterm used under Emacs 18, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind af55195 05/20: Make Action Key handle bi-directional jumping for Org mode radio target and internal links, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 36e4724 01/20: 7.0.3a bug fixes; add link-to-ibut, link-to-gbut, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind e647502 18/20: BSD zgrep support for Hyperbole grep command, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 0829631 13/20: Fix small logic errors in new e/g/ilink functions, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind b128464 06/20: Update Changes and add 7.0.3 release message to HY-ANNOUNCE, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 332ef33 19/20: V7.0.3b test release: Basic DEMO updates, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind c547ad4 10/20: Merge branch '7.0.3a' into prepare-pr-for-merging, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 131295e 07/20: Remove conditionals on xemacs, Stefan Monnier, 2019/08/14