From d0729d25705d49fcc42e3b94806e287053e379c4 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 13:20:08 +0100 Subject: [PATCH] update symbol-overlay Signed-off-by: Andreas Gerler --- .../symbol-overlay-pkg.el | 15 --- .../symbol-overlay-autoloads.el | 92 ++++++++----------- .../symbol-overlay-pkg.el | 11 +++ .../symbol-overlay.el | 32 ++++++- 4 files changed, 76 insertions(+), 74 deletions(-) delete mode 100644 elpa/symbol-overlay-20230602.851/symbol-overlay-pkg.el rename elpa/{symbol-overlay-20230602.851 => symbol-overlay-20240913.1624}/symbol-overlay-autoloads.el (60%) create mode 100644 elpa/symbol-overlay-20240913.1624/symbol-overlay-pkg.el rename elpa/{symbol-overlay-20230602.851 => symbol-overlay-20240913.1624}/symbol-overlay.el (96%) diff --git a/elpa/symbol-overlay-20230602.851/symbol-overlay-pkg.el b/elpa/symbol-overlay-20230602.851/symbol-overlay-pkg.el deleted file mode 100644 index fc642a7d..00000000 --- a/elpa/symbol-overlay-20230602.851/symbol-overlay-pkg.el +++ /dev/null @@ -1,15 +0,0 @@ -(define-package "symbol-overlay" "20230602.851" "Highlight symbols with keymap-enabled overlays" - '((emacs "24.3") - (seq "2.2")) - :commit "7c7d369bb749d96346b40cf714884a39aaa743f4" :authors - '(("wolray" . "wolray@foxmail.com")) - :maintainers - '(("wolray" . "wolray@foxmail.com")) - :maintainer - '("wolray" . "wolray@foxmail.com") - :keywords - '("faces" "matching") - :url "https://github.com/wolray/symbol-overlay/") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/symbol-overlay-20230602.851/symbol-overlay-autoloads.el b/elpa/symbol-overlay-20240913.1624/symbol-overlay-autoloads.el similarity index 60% rename from elpa/symbol-overlay-20230602.851/symbol-overlay-autoloads.el rename to elpa/symbol-overlay-20240913.1624/symbol-overlay-autoloads.el index 2075ebd3..3e05ec73 100644 --- a/elpa/symbol-overlay-20230602.851/symbol-overlay-autoloads.el +++ b/elpa/symbol-overlay-20240913.1624/symbol-overlay-autoloads.el @@ -1,99 +1,83 @@ -;;; symbol-overlay-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; symbol-overlay-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "symbol-overlay" "symbol-overlay.el" (0 0 0 -;;;;;; 0)) ;;; Generated autoloads from symbol-overlay.el (autoload 'symbol-overlay-mode "symbol-overlay" "\ Minor mode for auto-highlighting symbol at point. This is a minor mode. If called interactively, toggle the -`Symbol-Overlay mode' mode. If the prefix argument is positive, -enable the mode, and if it is zero or negative, disable the mode. +`Symbol-Overlay mode' mode. If the prefix argument is positive, enable +the mode, and if it is zero or negative, disable the mode. -If called from Lisp, toggle the mode if ARG is `toggle'. Enable -the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. +If called from Lisp, toggle the mode if ARG is `toggle'. Enable the +mode if ARG is nil, omitted, or is a positive number. Disable the mode +if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, -evaluate `symbol-overlay-mode'. +evaluate the variable `symbol-overlay-mode'. -The mode's hook is called both when the mode is enabled and when -it is disabled. - -\(fn &optional ARG)" t nil) +The mode's hook is called both when the mode is enabled and when it is +disabled. +(fn &optional ARG)" t) (autoload 'symbol-overlay-put "symbol-overlay" "\ -Toggle all overlays of symbol at point." t nil) - +Toggle all overlays of symbol at point." t) (autoload 'symbol-overlay-count "symbol-overlay" "\ -Show count of symbol at point." t nil) - +Show count of symbol at point." t) (autoload 'symbol-overlay-remove-all "symbol-overlay" "\ Remove all highlighted symbols in the buffer. When called interactively, then also reset -`symbol-overlay-keywords-alist'." t nil) - +`symbol-overlay-keywords-alist'." t) (autoload 'symbol-overlay-save-symbol "symbol-overlay" "\ -Copy symbol at point." t nil) - +Copy symbol at point." t) (autoload 'symbol-overlay-toggle-in-scope "symbol-overlay" "\ -Toggle overlays to be showed in buffer or only in scope." t nil) - +Toggle overlays to be showed in buffer or only in scope." t) (autoload 'symbol-overlay-echo-mark "symbol-overlay" "\ -Jump back to the mark." t nil) - +Jump back to the mark." t) (autoload 'symbol-overlay-jump-next "symbol-overlay" "\ -Jump to the next location of symbol at point." t nil) - +Jump to the next location of symbol at point." t) (autoload 'symbol-overlay-jump-prev "symbol-overlay" "\ -Jump to the previous location of symbol at point." t nil) - +Jump to the previous location of symbol at point." t) (autoload 'symbol-overlay-jump-first "symbol-overlay" "\ -Jump to the first location." t nil) - +Jump to the first location." t) (autoload 'symbol-overlay-jump-last "symbol-overlay" "\ -Jump to the last location." t nil) - +Jump to the last location." t) (autoload 'symbol-overlay-jump-to-definition "symbol-overlay" "\ Jump to the definition of symbol at point. The definition syntax should be defined in a function stored in `symbol-overlay-definition-function' that returns the definition's regexp -with the input symbol." t nil) - +with the input symbol." t) (autoload 'symbol-overlay-switch-forward "symbol-overlay" "\ -Switch forward to another symbol." t nil) - +Switch forward to another symbol." t) (autoload 'symbol-overlay-switch-backward "symbol-overlay" "\ -Switch backward to another symbol." t nil) - +Switch backward to another symbol." t) (autoload 'symbol-overlay-isearch-literally "symbol-overlay" "\ -Isearch symbol at point literally." t nil) - +Isearch symbol at point literally." t) (autoload 'symbol-overlay-query-replace "symbol-overlay" "\ -Query replace symbol at point." t nil) - +Query replace symbol at point." t) (autoload 'symbol-overlay-rename "symbol-overlay" "\ -Rename symbol at point on all its occurrences." t nil) - +Rename symbol at point on all its occurrences." t) (register-definition-prefixes "symbol-overlay" '("symbol-overlay-")) - -;;;*** -;;;### (autoloads nil nil ("symbol-overlay-pkg.el") (0 0 0 0)) +;;; End of scraped data + +(provide 'symbol-overlay-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; symbol-overlay-autoloads.el ends here diff --git a/elpa/symbol-overlay-20240913.1624/symbol-overlay-pkg.el b/elpa/symbol-overlay-20240913.1624/symbol-overlay-pkg.el new file mode 100644 index 00000000..40f2b188 --- /dev/null +++ b/elpa/symbol-overlay-20240913.1624/symbol-overlay-pkg.el @@ -0,0 +1,11 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "symbol-overlay" "20240913.1624" + "Highlight symbols with keymap-enabled overlays." + '((emacs "24.3") + (seq "2.2")) + :url "https://github.com/wolray/symbol-overlay" + :commit "6151f4279bd94b5960149596b202cdcb45cacec2" + :revdesc "6151f4279bd9" + :keywords '("faces" "matching") + :authors '(("wolray" . "wolray@foxmail.com")) + :maintainers '(("wolray" . "wolray@foxmail.com"))) diff --git a/elpa/symbol-overlay-20230602.851/symbol-overlay.el b/elpa/symbol-overlay-20240913.1624/symbol-overlay.el similarity index 96% rename from elpa/symbol-overlay-20230602.851/symbol-overlay.el rename to elpa/symbol-overlay-20240913.1624/symbol-overlay.el index 8aab92bc..774aad13 100644 --- a/elpa/symbol-overlay-20230602.851/symbol-overlay.el +++ b/elpa/symbol-overlay-20240913.1624/symbol-overlay.el @@ -3,7 +3,8 @@ ;; Copyright (C) 2017 wolray ;; Author: wolray -;; Version: 4.1 +;; Package-Version: 20240913.1624 +;; Package-Revision: 6151f4279bd9 ;; URL: https://github.com/wolray/symbol-overlay/ ;; Keywords: faces, matching ;; Package-Requires: ((emacs "24.3") (seq "2.2")) @@ -151,6 +152,11 @@ :group 'symbol-overlay :type 'boolean) +(defcustom symbol-overlay-temp-highlight-single nil + "When non-nil, also temporarily highlight symbols that occur only once." + :group 'symbol-overlay + :type 'boolean) + (defcustom symbol-overlay-idle-time 0.5 "Idle time after every command and before the temporary highlighting." :group 'symbol-overlay @@ -176,6 +182,19 @@ definitions to prevent a language's keywords from getting highlighted." :group 'symbol-overlay :type '(repeat (cons (function :tag "Mode") function))) +(defcustom symbol-overlay-priority nil + "Sets the priority of the overlays to a non-default value. +When multiple overlays appear at the same point, the one with the +highest priority receives keystrokes, so with this option you can +prioritise `symbol-overlay' relative to `flymake' or other features." + :group 'symbol-overlay + :type 'integer) + +(defcustom symbol-overlay-jump-hook nil + "Hook to run after jumping to a symbol." + :group 'symbol-overlay + :type 'hook) + ;;; Internal (defvar symbol-overlay-inhibit-map nil @@ -237,7 +256,7 @@ If SYMBOL is non-nil, get the overlays that belong to it. DIR is an integer. If EXCLUDE is non-nil, get all overlays excluding those belong to SYMBOL." (let ((overlays (cond ((= dir 0) (overlays-in (point-min) (point-max))) - ((< dir 0) (overlays-in (point-min) (point))) + ((< dir 0) (nreverse (overlays-in (point-min) (point)))) ((> dir 0) (overlays-in (if (looking-at-p "\\_>") (1- (point)) (point)) (point-max)))))) @@ -328,7 +347,7 @@ This only affects symbols in the current displayed window if (while (re-search-forward re nil t) (symbol-overlay-put-one symbol) (or p (setq p t)))) - (when p + (when (or symbol-overlay-temp-highlight-single p) (symbol-overlay-put-one symbol) (setq symbol-overlay-temp-symbol symbol))))))))) @@ -377,6 +396,8 @@ Otherwise apply `symbol-overlay-default-face'." (overlay-put ov 'symbol symbol)) (overlay-put ov 'face 'symbol-overlay-default-face) (overlay-put ov 'symbol "")) + (when symbol-overlay-priority + (overlay-put ov 'priority symbol-overlay-priority)) (dolist (fun symbol-overlay-overlay-created-functions) (funcall fun ov)))) @@ -613,8 +634,8 @@ When called interactively, then also reset "Put overlays on SYMBOL that is not highlighted in scope. KEYWORD provides the scope information." (when (and (cadr keyword) - (not (seq-find #'(lambda (ov) - (string= (overlay-get ov 'symbol) symbol)) + (not (seq-find (lambda (ov) + (string= (overlay-get ov 'symbol) symbol)) (overlays-at (car (bounds-of-thing-at-point 'symbol)))))) (symbol-overlay-put-all symbol t keyword))) @@ -637,6 +658,7 @@ DIR must be non-zero." (keyword (symbol-overlay-assoc symbol))) (push-mark nil t) (funcall jump-function symbol dir) + (run-hooks 'symbol-overlay-jump-hook) (when keyword (symbol-overlay-maybe-reput symbol keyword) (symbol-overlay-maybe-count keyword))))) -- 2.47.3