From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/hyperbole 9faa8b69ae 1/3: Doc new Assist Mouse Key window drag ibut creation Date: Wed, 24 May 2023 10:08:04 -0400 Message-ID: References: <168485751707.23858.18234383425620519210@vcs2.savannah.gnu.org> <20230523155837.BAAE6C21A64@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17724"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Robert Weiner To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 24 16:09:16 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1pAx-0004Pc-9o for ged-emacs-devel@m.gmane-mx.org; Wed, 24 May 2023 16:09:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1pA7-0005je-CA; Wed, 24 May 2023 10:08:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1pA1-0005jP-2Q for emacs-devel@gnu.org; Wed, 24 May 2023 10:08:17 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1p9y-0000zL-Ll; Wed, 24 May 2023 10:08:16 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5D21B10008C; Wed, 24 May 2023 10:08:12 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AA06B1000E7; Wed, 24 May 2023 10:08:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1684937286; bh=7uOJRE3lXTbW2CZ9Xv0IfZNqRVVmO5C1ZLwkOPXCgZc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=bYQGTH52MkNUFuv17503OTcMl1xCrfGeaiWU8aeiggA7Idad42Sr0Ki0UHYGwn6Tj t2P2FhjTC/IPlWOTOtcnymQXBAVvgppm4hhAZ9mDRDvHGMOlSWyLkFC59ehOc69LrB QmbrTBuyQQJzSbnmaeXbQr+m+avd3w1ieDjHa0bzRSKuK+84aB9yBXiVa5j/7ZpMlm RJBeveLoBebRd1gH87RpCN69o4WtYaG9FfN5xKo+lu4mBZ6UDzjxzlNBkvV7i5HEw0 yUK921mFTR3HTtEyW5fwOUMd0vtQkrm84hW+BfwH39j2yVXfmQNZ4Q9/Rvkdn5KXMN JG/d84q4qMeVw== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8E6B21202AA; Wed, 24 May 2023 10:08:06 -0400 (EDT) In-Reply-To: <20230523155837.BAAE6C21A64@vcs2.savannah.gnu.org> (ELPA Syncer's message of "Tue, 23 May 2023 11:58:37 -0400 (EDT)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306300 Archived-At: > @@ -105,20 +105,20 @@ the pathname." > nosuffix (nth 5 frame))) > ((eq function 'require) > (setq file (or (nth 3 frame) (symbol-name (nth 2 frame)))))) > - (if (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 > - (if (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))))) > + (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) '(".eln" ".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))))) Really? When did you ever bump into a `.eln` file along `load-path`? BTW, among my `scratch/hyperbole` patches, there's the one below, which removes this function, so I wonder in which circumstance you found the need for the above change. Stefan commit e126a76e8fdca5193b2ecd6b6143b573d28c1866 Author: Stefan Monnier Date: Mon Apr 3 13:43:57 2023 -0400 * hversion.el (hyperb:path-being-loaded): Delete function * hload-path.el (hyperb:dir): Don't use it as fallback because it's too hackish and too rarely useful. diff --git a/hload-path.el b/hload-path.el index b71239b7a9..1b5e9dce58 100644 --- a/hload-path.el +++ b/hload-path.el @@ -46,7 +46,6 @@ Use `hyperb:wsl-os-p' to test if running under WSL.") (macroexp-file-name) (and (stringp load-file-name) load-file-name)) (locate-file "hmouse-tag.el" load-path) - (hyperb:path-being-loaded) "")) (error "(Hyperbole): Failed to set hyperb:dir. Try setting it manually")) diff --git a/hversion.el b/hversion.el index 5ae7979204..9803c9cdbe 100644 --- a/hversion.el +++ b/hversion.el @@ -93,33 +93,6 @@ of stack frames (from innermost to outermost)." nil) (when debug-flag (nreverse frame-list))))) -(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) '(".eln" ".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 f270cfc165..7286fa7dce 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -113,9 +113,9 @@ (setq features (delq 'hload-path features) features (delq 'hversion features))) - ;; 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. + ;; Defines 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)