[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole d115b6d357 35/47: Don't remove hyperb:automou
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole d115b6d357 35/47: Don't remove hyperb:automount-prefixes and hyperb:path-being-loaded |
Date: |
Sun, 25 Jun 2023 15:58:37 -0400 (EDT) |
branch: externals/hyperbole
commit d115b6d3574a39d3361457b30826cce1ac05e0d1
Author: Robert Weiner <rsw@gnu.org>
Commit: Robert Weiner <rsw@gnu.org>
Don't remove hyperb:automount-prefixes and hyperb:path-being-loaded
---
hversion.el | 35 ++++++++++++++++++++++++++++++++++-
hyperbole.el | 8 ++++----
2 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/hversion.el b/hversion.el
index 982e11a213..f38cafbf40 100644
--- a/hversion.el
+++ b/hversion.el
@@ -4,7 +4,7 @@
;; Maintainer: Bob Weiner, Mats Lidell
;;
;; Orig-Date: 1-Jan-94
-;; Last-Mod: 25-Jun-23 at 10:11:43 by Mats Lidell
+;; Last-Mod: 25-Jun-23 at 11:59:46 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -37,6 +37,12 @@
Override this if the system-computed default is incorrect for
your specific mouse.")
+(defvar hyperb:automount-prefixes
+ (if (and (boundp 'automount-dir-prefix) (stringp automount-dir-prefix))
+ automount-dir-prefix
+ "^/tmp_mnt/"
+ "Regexp to match any automounter prefix in a pathname."))
+
;;; ************************************************************************
;;; Public declarations
;;; ************************************************************************
@@ -46,6 +52,33 @@ your specific mouse.")
;;; Support functions
;;; ************************************************************************
+(defun hyperb:path-being-loaded ()
+ "Return the full pathname used by the innermost `load' or `require' call.
+Removes any matches for `hyperb:automount-prefixes' before returning
+the pathname."
+ (let* ((frame (hyperb:stack-frame '(load require)))
+ (function (nth 1 frame))
+ file nosuffix)
+ (cond ((eq function 'load)
+ (setq file (nth 2 frame)
+ nosuffix (nth 5 frame)))
+ ((eq function 'require)
+ (setq file (or (nth 3 frame) (symbol-name (nth 2 frame))))))
+ (when (stringp file)
+ (setq nosuffix (or nosuffix
+ (string-match
+ "\\.\\(elc?\\|elc?\\.gz\\|elc?\\.Z\\)$"
+ file))
+ file (substitute-in-file-name file)
+ file (locate-file file load-path
+ (when (null nosuffix) '(".elc" ".el" ".el.gz"
".el.Z"))
+ ;; accept any existing file
+ nil)
+ file (if (and (stringp file)
+ (string-match hyperb:automount-prefixes file))
+ (substring file (1- (match-end 0)))
+ file)))))
+
(defun hyperb:window-sys-term (&optional frame)
"Return first part of the term-type if running under a window system, else
nil.
Where a part in the term-type is delimited by a `-' or an `_'."
diff --git a/hyperbole.el b/hyperbole.el
index a0feda76c4..fb1afed7b7 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -7,7 +7,7 @@
;; Author: Bob Weiner
;; Maintainer: Bob Weiner <rsw@gnu.org>, Mats Lidell <matsl@gnu.org>
;; Created: 06-Oct-92 at 11:52:51
-;; Last-mod: 25-Jun-23 at 10:12:04 by Mats Lidell
+;; Last-mod: 25-Jun-23 at 12:01:04 by Bob Weiner
;; Released: 03-Dec-22
;; Version: 8.0.1pre
;; Keywords: comm, convenience, files, frames, hypermedia, languages,
mail, matching, mouse, multimedia, outlines, tools, wp
@@ -113,9 +113,9 @@
(setq features (delq 'hload-path features)
features (delq 'hversion features)))
- ;; Defines (hyperb:window-system), and hyperb:dir,
- ;; which are used later in this file.
- ;; Also adds Hyperbole to the load-path if need be.
+ ;; Defines hyperb:path-being-loaded, hyperb:stack-frame,
+ ;; (hyperb:window-system) and hyperb:dir, which are used later in
+ ;; this file. Also adds Hyperbole to the load-path if need be.
;;
;; This handles the case when the Hyperbole package directory is not yet in
load-path.
(unless (or (require 'hversion nil t)
- [elpa] externals/hyperbole 575b8b321b 15/47: Fix a few minor miscompilations and warnings, (continued)
- [elpa] externals/hyperbole 575b8b321b 15/47: Fix a few minor miscompilations and warnings, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 84a0209c59 02/47: hui:ebut-link-directly, hui:ibut-link-directly now work from kbd, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 6e73c42284 07/47: Fix compilation of test file, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 32eca132c9 09/47: * hact.el: Fix broken lexical-binding cookie, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 96791538ce 22/47: Revert FIXME, keep for now because of issues with web modes, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 5d5914c197 12/47: * hycontrol.el (hycontrol-windows-mode-map): Don't autoload, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 9fbab74a10 13/47: * hui-select.el: Fix a few warnings and improve some docstrings, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole e9fabc86f6 24/47: Changes applied separately, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 00dcf534ca 32/47: Revert "Try and avoid using `hyperb:stack-frame`", ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole e1bd2e95e5 34/47: Revert Stefan set-buffer and macroexp-file-name (not in Emacs 27.1), ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole d115b6d357 35/47: Don't remove hyperb:automount-prefixes and hyperb:path-being-loaded,
ELPA Syncer <=
- [elpa] externals/hyperbole a06d9a4a8c 33/47: Revert "Get rid of `hyperb:stack-frame`", ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole a69d994d5a 31/47: ibut:operate - Add 2nd edit-flag parameter; non-nil means modifying, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole c085ed7099 39/47: Merge branch 'master' into rsw, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 7bd5a86a4c 40/47: Merge pull request #349 from rswgnu/rsw, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole f0182ad215 44/47: Merge branch 'master' into insert_missing_changelog_entry, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 4842d3fde0 14/47: (man-show): Fix miscompilation, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 3c6dcafe4f 21/47: Revert hunk, will be applied elsewhere, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 1c5327c5fa 26/47: Keep group lines, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole d6415dd593 27/47: Keep orig until explained, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 876ad5cea7 17/47: * hargs.el (hargs:set-string-to-complete): Don't mess with windows, ELPA Syncer, 2023/06/25