[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 575b8b321b 15/47: Fix a few minor miscompilat
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 575b8b321b 15/47: Fix a few minor miscompilations and warnings |
Date: |
Sun, 25 Jun 2023 15:58:35 -0400 (EDT) |
branch: externals/hyperbole
commit 575b8b321b308fe47e303a85de2add661b1f713a
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Mats Lidell <mats.lidell@lidells.se>
Fix a few minor miscompilations and warnings
* Makefile (LOAD_EL): Escape trailing double quote so it's not confused
with a beginning-of-string.
* hbut.el: Require `house-drv` to fix miscompilation of let-bindings of
`hui--ignore-action-key-depress-prev-point`.
Prefer #' to quote function names.
(hbut:max-len, ibut:label-start, ibut:label-end): Add `defvar`s to fix
some of the many warnings and to make sure they're compiled as dynvars.
(ibut:at-type-p): Remove unused `types` var.
(defib): Remove redundant indent property.
* hibtypes.el (org-link-outside-org-mode): Silence some warnings.
(grep-msg): Avoid NUL bytes in source files (makes Emacs thinks
they're binary).
* set.el: Prefer #' to quote function names.
---
Makefile | 2 +-
hbut.el | 28 ++++++++++++++++++----------
hibtypes.el | 9 ++++++---
set.el | 8 ++++----
4 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index 9f4dad8e4c..fc63415b97 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
# Author: Bob Weiner
#
# Orig-Date: 15-Jun-94 at 03:42:38
-# Last-Mod: 22-Jun-23 at 19:23:14 by Mats Lidell
+# Last-Mod: 24-Jun-23 at 00:30:37 by Mats Lidell
#
# Copyright (C) 1994-2023 Free Software Foundation, Inc.
# See the file HY-COPY for license information.
diff --git a/hbut.el b/hbut.el
index 5f30890b3a..a04cb21f64 100644
--- a/hbut.el
+++ b/hbut.el
@@ -22,6 +22,7 @@
(eval-and-compile (mapc #'require '(cl-lib elisp-mode help-mode hversion
hmoccur hbmap htz hbdata hact
hui-select view)))
+(require 'hmouse-drv) ;For `hui--ignore-action-key-depress-prev-point'.
;;; ************************************************************************
;;; Public declarations
@@ -218,6 +219,8 @@ Return nil if no matching button is found."
(defalias 'ebut:key-src-fmt #'hbut:key-src-fmt)
(defalias 'ebut:key-to-label #'hbut:key-to-label)
+(defvar hbut:max-len)
+
(defun ebut:label-p (&optional as-label start-delim end-delim pos-flag
two-lines-flag)
"Return key for the explicit button label that point is within, else nil.
This is the normalized key form of the explicit button's label.
@@ -694,7 +697,7 @@ Return nil if no matching button is found."
(defun gbut:help (label)
"Display help for Hyperbole global button with LABEL."
(interactive (list (hargs:read-match "Report on global button labeled: "
- (mapcar 'list (gbut:label-list))
+ (mapcar #'list (gbut:label-list))
nil t nil 'hbut)))
(let* ((lbl-key (hbut:label-to-key label))
(but (hbut:get lbl-key nil (gbut:file))))
@@ -1523,7 +1526,7 @@ If a file, always return a full path if optional
FULL-FLAG is non-nil."
(expand-file-name file default-directory)
file)))))
-(defalias 'hbut:summarize 'hbut:report)
+(defalias 'hbut:summarize #'hbut:report)
(defun hbut:to (lbl-key)
"Find the nearest explicit button or labeled/named implicit button.
@@ -1622,8 +1625,12 @@ associated arguments from the button."
(unless (string-match "::" type-name)
(setq ibut-type-symbol (intern-soft (concat "ibtypes::" type-name))))
(when ibut-type-symbol
- (let ((types (htype:category 'ibtypes))
+ (let (;; (types (htype:category 'ibtypes))
;; 'types' is a global var used in (hact) function, don't delete.
+ ;; FIXME: I can't see where `types' is used as a global var
+ ;; "in (hact) function", and the above binding was treated
+ ;; by Emacs as lexically-scoped so it wasn't affecting any
+ ;; other global `types' definition anyway.
(hrule:action 'actype:identity))
(funcall ibut-type-symbol))))))
@@ -1896,6 +1903,9 @@ Store new button attributes in the symbol, 'hbut:current."
[&optional ["&optional" arg &rest arg]]
&optional ["&rest" arg])))
+(defvar ibut:label-start)
+(defvar ibut:label-end)
+
(defun ibut:delete (&optional but-sym)
"Delete Hyperbole implicit button based on optional BUT-SYM.
Default is the symbol hbut:current'.
@@ -2132,10 +2142,10 @@ positions at which the button label delimiter begins
and ends."
(error "(ibut:key): Argument is not a Hyperbole implicit button symbol,
`%s'"
ibut)))
-(defalias 'ibut:to-key-src 'hbut:to-key-src)
-(defalias 'ibut:key-to-label 'hbut:key-to-label)
-(defalias 'ibut:label-to-key 'hbut:label-to-key)
-(defalias 'map-ibut 'ibut:map)
+(defalias 'ibut:to-key-src #'hbut:to-key-src)
+(defalias 'ibut:key-to-label #'hbut:key-to-label)
+(defalias 'ibut:label-to-key #'hbut:label-to-key)
+(defalias 'map-ibut #'ibut:map)
(defun ibut:map (but-func &optional regexp-match include-delims)
"Apply BUT-FUNC to the visible, named implicit buttons.
@@ -2475,7 +2485,7 @@ current."
t))
(t (error "(ibut:rename): Button '%s' not found in visible portion of
buffer." old-lbl))))
-(defalias 'ibut:summarize 'hbut:report)
+(defalias 'ibut:summarize #'hbut:report)
(defun ibut:to (name-key)
"Find the nearest implicit button with NAME-KEY (a name or name key).
@@ -2690,8 +2700,6 @@ type for ibtype is presently undefined."
(htype:create ,type ibtypes ,doc nil ,at-func
'(to-p ,to-func style ,style))))))
-(put 'defib 'lisp-indent-function 'defun)
-
;; Support edebug-defun for interactive debugging of ibtypes
(def-edebug-spec defib
(&define name lambda-list
diff --git a/hibtypes.el b/hibtypes.el
index ecb7dd5605..d10a100e6b 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -349,7 +349,7 @@ in all buffers."
(and buffer-file-name
(boundp 'hyrolo-file-list)
(set:member (current-buffer)
- (mapcar 'get-file-buffer hyrolo-file-list)))))
+ (mapcar #'get-file-buffer hyrolo-file-list)))))
(let ((address (mail-address-at-p)))
(when address
(ibut:label-set address (match-beginning 1) (match-end 1))
@@ -372,11 +372,14 @@ handle any links they recognize first."
;; Prevent infinite recursion, e.g. if called via
;; `org-metareturn-hook' from `org-meta-return' invocation.
(not hibtypes--within-org-link-outside-org-mode))
+ (require 'hsys-org)
+ (declare-function hsys-org-link-at-p "hsys-org" ())
+ (declare-function hsys-org-set-ibut-label "hsys-org" (start-end))
(let* ((hibtypes--within-org-link-outside-org-mode t)
(start-end (hsys-org-link-at-p)))
(when start-end
(hsys-org-set-ibut-label start-end)
- (hact 'org-open-at-point-global)))))
+ (hact #'org-open-at-point-global)))))
;;; ========================================================================
;;; Handles internal references within an annotated bibliography, delimiters=[]
@@ -1003,7 +1006,7 @@ in grep and shell buffers."
;; Grep matches, UNIX C compiler and Introl 68HC11 C
;; compiler errors, allowing for file names with
;; spaces followed by a null character rather than a :
- (looking-at "\\([^\t\n\r\"'`]+\\) ?\\([1-9][0-9]*\\)[ :]")
+ (looking-at "\\([^\t\n\r\"'`]+\\)\0 ?\\([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/set.el b/set.el
index 954cd21774..a7dc4a893c 100644
--- a/set.el
+++ b/set.el
@@ -90,7 +90,7 @@ valid set. With optional ARITY, return only subsets with
ARITY
members."
(cond ((null arity)
(setq arity 0)
- (cons nil (apply 'nconc (mapcar (lambda (_elt) (setq arity (1+ arity))
(set:combinations set arity))
+ (cons nil (apply #'nconc (mapcar (lambda (_elt) (setq arity (1+
arity)) (set:combinations set arity))
set))))
((= arity 1) set)
((<= arity 0) '(nil))
@@ -120,7 +120,7 @@ for comparison."
elements)
(nreverse set)))))
-(defalias 'set:delete 'set:remove)
+(defalias 'set:delete #'set:remove)
(defun set:difference (&rest sets)
"Return difference of any number of SETS.
Difference is the set of elements in the first set that are not in any of the
@@ -132,7 +132,7 @@ other sets. Uses `set:equal-op' for comparison."
(cdr sets))
rtn-set))
-(defalias 'set:size 'length)
+(defalias 'set:size #'length)
(defun set:empty (set)
"Return t if SET is empty."
@@ -170,7 +170,7 @@ Uses `set:equal-op' for comparison."
(setq lst (cdr lst))))
(null lst))))
-(defalias 'set:map 'mapcar)
+(defalias 'set:map #'mapcar)
(defun set:members (list)
"Return set of unique elements of LIST.
- [elpa] externals/hyperbole 3d67247f58 30/47: Remove odd code duplication, (continued)
- [elpa] externals/hyperbole 3d67247f58 30/47: Remove odd code duplication, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 0872ab55c0 36/47: Merge branch 'stefan-scratch-hyperbole-20230621-without-questions-no-fixme' into rsw_stefan-scratch-hyperbole-20230621-without-questions-no-fixme, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole cbb15c43fe 38/47: Merge pull request #347 from rswgnu/stefan-scratch-hyperbole-20230621-without-questions-no-fixme, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole ac036b5f29 41/47: Merge branch 'master' into insert_missing_changelog_entry, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 5bbc6da4e0 42/47: Fix annot-bib ibtype and actype; was not checking for [] delimiters, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole feb6fb1a75 43/47: Merge pull request #350 from rswgnu/rsw, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 66c9368c93 46/47: Merge branch 'master' into verify-expected-url-was-called, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 32f0d10126 47/47: Merge pull request #344 from rswgnu/verify-expected-url-was-called, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 9b067ab55f 16/47: * hyrolo.el: A few cosmetic tweaks, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 5cd4136599 06/47: Get rid of `hyperb:stack-frame`, ELPA Syncer, 2023/06/25
- [elpa] externals/hyperbole 575b8b321b 15/47: Fix a few minor miscompilations and warnings,
ELPA Syncer <=
- [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, 2023/06/25