From 463f69d18739cb58bf68554651b051494f939bb0 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 26 Apr 2026 19:55:20 +0200 Subject: [PATCH] update hl-todo --- elpa/hl-todo-20260101.1834/README-elpa | 18 ++++ .../hl-todo-autoloads.el | 40 ++++----- .../hl-todo-pkg.el | 6 +- .../hl-todo.el | 83 ++++++++++--------- 4 files changed, 84 insertions(+), 63 deletions(-) create mode 100644 elpa/hl-todo-20260101.1834/README-elpa rename elpa/{hl-todo-20250923.937 => hl-todo-20260101.1834}/hl-todo-autoloads.el (81%) rename elpa/{hl-todo-20250923.937 => hl-todo-20260101.1834}/hl-todo-pkg.el (74%) rename elpa/{hl-todo-20250923.937 => hl-todo-20260101.1834}/hl-todo.el (90%) diff --git a/elpa/hl-todo-20260101.1834/README-elpa b/elpa/hl-todo-20260101.1834/README-elpa new file mode 100644 index 00000000..5465c8fc --- /dev/null +++ b/elpa/hl-todo-20260101.1834/README-elpa @@ -0,0 +1,18 @@ +Highlight TODO and similar keywords in comments and strings. + +You can either explicitly turn on `hl-todo-mode' in certain buffers +or use the global variant `global-hl-todo-mode', which enables +the local mode based on each buffer's major-mode and the options +`hl-todo-include-modes' and `hl-todo-exclude-modes'. By default +`hl-todo-mode' is enabled for all buffers whose major-mode derive +from either `prog-mode' or `text-mode', except `org-mode'. + +This package also provides commands for moving to the next or +previous keyword, to invoke `occur' with a regexp that matches all +known keywords, and to insert a keyword. If you want to use these +commands, then you should bind them in `hl-todo-mode-map', e.g.: + + (keymap-set hl-todo-mode-map "C-c p" #'hl-todo-previous) + (keymap-set hl-todo-mode-map "C-c n" #'hl-todo-next) + (keymap-set hl-todo-mode-map "C-c o" #'hl-todo-occur) + (keymap-set hl-todo-mode-map "C-c i" #'hl-todo-insert) diff --git a/elpa/hl-todo-20250923.937/hl-todo-autoloads.el b/elpa/hl-todo-20260101.1834/hl-todo-autoloads.el similarity index 81% rename from elpa/hl-todo-20250923.937/hl-todo-autoloads.el rename to elpa/hl-todo-20260101.1834/hl-todo-autoloads.el index 9400ad02..1eb12cbe 100644 --- a/elpa/hl-todo-20250923.937/hl-todo-autoloads.el +++ b/elpa/hl-todo-20260101.1834/hl-todo-autoloads.el @@ -11,8 +11,8 @@ ;;; Generated autoloads from hl-todo.el -(autoload 'hl-todo-mode "hl-todo" "\ -Highlight TODO and similar keywords in comments and strings. +(autoload 'hl-todo-mode "hl-todo" +"Highlight TODO and similar keywords in comments and strings. This is a minor mode. If called interactively, toggle the `Hl-Todo mode' mode. If the prefix argument is positive, enable the mode, and if @@ -32,16 +32,16 @@ disabled. (fn &optional ARG)" t) (put 'global-hl-todo-mode 'globalized-minor-mode t) -(defvar global-hl-todo-mode nil "\ -Non-nil if Global Hl-Todo mode is enabled. +(defvar global-hl-todo-mode nil +"Non-nil if Global Hl-Todo mode is enabled. See the `global-hl-todo-mode' command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node `Easy Customization') or call the function `global-hl-todo-mode'.") (custom-autoload 'global-hl-todo-mode "hl-todo" nil) -(autoload 'global-hl-todo-mode "hl-todo" "\ -Toggle Hl-Todo mode in many buffers. +(autoload 'global-hl-todo-mode "hl-todo" +"Toggle Hl-Todo mode in many buffers. Specifically, Hl-Todo mode is enabled in all buffers where `hl-todo--turn-on-mode-if-desired' would do it. @@ -55,26 +55,26 @@ Disable the mode if ARG is a negative number. See `hl-todo-mode' for more information on Hl-Todo mode. (fn &optional ARG)" t) -(autoload 'hl-todo-next "hl-todo" "\ -Jump to the next TODO or similar keyword. +(autoload 'hl-todo-next "hl-todo" +"Jump to the next TODO or similar keyword. The prefix argument ARG specifies how many keywords to move. A negative argument means move backward that many keywords. (fn ARG)" t) -(autoload 'hl-todo-previous "hl-todo" "\ -Jump to the previous TODO or similar keyword. +(autoload 'hl-todo-previous "hl-todo" +"Jump to the previous TODO or similar keyword. The prefix argument ARG specifies how many keywords to move. A negative argument means move forward that many keywords. (fn ARG)" t) -(autoload 'hl-todo-occur "hl-todo" "\ -Use `occur' to find all TODO or similar keywords. +(autoload 'hl-todo-occur "hl-todo" +"Use `occur' to find all TODO or similar keywords. This actually finds a superset of the highlighted keywords, because it uses a regexp instead of a more sophisticated matcher. It also finds occurrences that are not within a string or comment." t) -(autoload 'hl-todo-rgrep "hl-todo" "\ -Use `rgrep' to find all TODO or similar keywords. +(autoload 'hl-todo-rgrep "hl-todo" +"Use `rgrep' to find all TODO or similar keywords. This actually finds a superset of the highlighted keywords, because it uses a regexp instead of a more sophisticated matcher. It also finds occurrences that are not within a @@ -85,15 +85,15 @@ constructed shell command line before it is executed. Also see option `hl-todo-keyword-faces'. (fn REGEXP &optional FILES DIR CONFIRM)" t) -(autoload 'hl-todo-flymake "hl-todo" "\ -Flymake backend for `hl-todo-mode'. +(autoload 'hl-todo-flymake "hl-todo" +"Flymake backend for `hl-todo-mode'. Diagnostics are reported to REPORT-FN. Use `add-hook' to register this function in `flymake-diagnostic-functions' before enabling `flymake-mode'. (fn REPORT-FN &rest PLIST)") -(autoload 'hl-todo-insert "hl-todo" "\ -Read a TODO or similar keyword and insert it at point. +(autoload 'hl-todo-insert "hl-todo" +"Read a TODO or similar keyword and insert it at point. If point is not inside a string or comment, then insert a new comment. If point is at the end of the line, then insert the @@ -106,8 +106,8 @@ If `hl-todo-require-punctuation' is non-nil and then append that character to the inserted string. (fn KEYWORD)" t) -(autoload 'hl-todo-search-and-highlight "hl-todo" "\ -Highlight TODO and similar keywords starting at point. +(autoload 'hl-todo-search-and-highlight "hl-todo" +"Highlight TODO and similar keywords starting at point. Intended to be added to `magit-revision-wash-message-hook' and `magit-log-wash-summary-hook', but might be useful elsewhere too.") (register-definition-prefixes "hl-todo" '("hl-todo-")) diff --git a/elpa/hl-todo-20250923.937/hl-todo-pkg.el b/elpa/hl-todo-20260101.1834/hl-todo-pkg.el similarity index 74% rename from elpa/hl-todo-20250923.937/hl-todo-pkg.el rename to elpa/hl-todo-20260101.1834/hl-todo-pkg.el index fa8607a1..ed0d24c8 100644 --- a/elpa/hl-todo-20250923.937/hl-todo-pkg.el +++ b/elpa/hl-todo-20260101.1834/hl-todo-pkg.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "hl-todo" "20250923.937" +(define-package "hl-todo" "20260101.1834" "Highlight TODO and similar keywords." '((emacs "26.1") (compat "30.1")) :url "https://github.com/tarsius/hl-todo" - :commit "0df1c09b643c36ed8ab911b4b1865e0360a2dfc3" - :revdesc "0df1c09b643c" + :commit "9540fc414014822dde00f0188b74e17ac99e916d" + :revdesc "9540fc414014" :keywords '("convenience") :authors '(("Jonas Bernoulli" . "emacs.hl-todo@jonas.bernoulli.dev")) :maintainers '(("Jonas Bernoulli" . "emacs.hl-todo@jonas.bernoulli.dev"))) diff --git a/elpa/hl-todo-20250923.937/hl-todo.el b/elpa/hl-todo-20260101.1834/hl-todo.el similarity index 90% rename from elpa/hl-todo-20250923.937/hl-todo.el rename to elpa/hl-todo-20260101.1834/hl-todo.el index d2d5a401..129a9b7d 100644 --- a/elpa/hl-todo-20250923.937/hl-todo.el +++ b/elpa/hl-todo-20260101.1834/hl-todo.el @@ -1,14 +1,16 @@ ;;; hl-todo.el --- Highlight TODO and similar keywords -*- lexical-binding:t -*- -;; Copyright (C) 2013-2025 Jonas Bernoulli +;; Copyright (C) 2013-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/tarsius/hl-todo ;; Keywords: convenience -;; Package-Version: 20250923.937 -;; Package-Revision: 0df1c09b643c -;; Package-Requires: ((emacs "26.1") (compat "30.1")) +;; Package-Version: 20260101.1834 +;; Package-Revision: 9540fc414014 +;; Package-Requires: ( +;; (emacs "26.1") +;; (compat "30.1")) ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -428,16 +430,16 @@ argument does not matter; with any prefix you can edit the constructed shell command line before it is executed. Also see option `hl-todo-keyword-faces'." (interactive - (progn - (require 'grep) - (grep-compute-defaults) - (unless grep-find-template - (error "grep.el: No `grep-find-template' available")) - (let ((regexp (with-temp-buffer (hl-todo--regexp t)))) - (list regexp - (grep-read-files regexp) - (read-directory-name "Base directory: " nil default-directory t) - current-prefix-arg)))) + (progn + (require 'grep) + (grep-compute-defaults) + (unless grep-find-template + (error "grep.el: No `grep-find-template' available")) + (let ((regexp (with-temp-buffer (hl-todo--regexp t)))) + (list regexp + (grep-read-files regexp) + (read-directory-name "Base directory: " nil default-directory t) + current-prefix-arg)))) (rgrep regexp files dir confirm)) ;;;###autoload @@ -504,37 +506,37 @@ If `hl-todo-require-punctuation' is non-nil and `hl-todo-highlight-punctuation' contains a single character, then append that character to the inserted string." (interactive - (list (completing-read - "Insert keyword: " - (mapcan (pcase-lambda (`(,keyword . ,face)) - (and (equal (regexp-quote keyword) keyword) - (list (propertize keyword 'face - (hl-todo--combine-face face))))) - hl-todo-keyword-faces)))) + (list (completing-read + "Insert keyword: " + (mapcan (pcase-lambda (`(,keyword . ,face)) + (and (equal (regexp-quote keyword) keyword) + (list (propertize keyword 'face + (hl-todo--combine-face face))))) + hl-todo-keyword-faces)))) (let ((keyword (if (and hl-todo-require-punctuation (length= hl-todo-highlight-punctuation 1)) (concat keyword hl-todo-highlight-punctuation) keyword))) (cond - ((hl-todo--inside-comment-or-string-p) - (insert (concat (and (not (memq (char-before) '(?\s ?\t))) " ") - keyword - (and (not (memq (char-after) '(?\s ?\t ?\n))) " ")))) - ((and (eolp) - (not (looking-back "^[\s\t]*" (line-beginning-position) t))) - (insert (concat (and (not (memq (char-before) '(?\s ?\t))) " ") - (format "%s %s " comment-start keyword)))) - (t - (goto-char (line-beginning-position)) - (insert (cond ((derived-mode-p 'lisp-mode 'emacs-lisp-mode) - (format "%s%s %s" comment-start comment-start keyword)) - ((string-suffix-p " " comment-start) - (format "%s%s" comment-start keyword)) - (t - (format "%s %s" comment-start keyword)))) - (unless (looking-at "[\s\t]*$") - (save-excursion (insert "\n"))) - (indent-region (line-beginning-position) (line-end-position)))))) + ((hl-todo--inside-comment-or-string-p) + (insert (concat (and (not (memq (char-before) '(?\s ?\t))) " ") + keyword + (and (not (memq (char-after) '(?\s ?\t ?\n))) " ")))) + ((and (eolp) + (not (looking-back "^[\s\t]*" (line-beginning-position) t))) + (insert (concat (and (not (memq (char-before) '(?\s ?\t))) " ") + (format "%s %s " comment-start keyword)))) + (t + (goto-char (line-beginning-position)) + (insert (cond ((derived-mode-p 'lisp-mode 'emacs-lisp-mode) + (format "%s%s %s" comment-start comment-start keyword)) + ((string-suffix-p " " comment-start) + (format "%s%s" comment-start keyword)) + (t + (format "%s %s" comment-start keyword)))) + (unless (looking-at "[\s\t]*$") + (save-excursion (insert "\n"))) + (indent-region (line-beginning-position) (line-end-position)))))) ;;;###autoload (defun hl-todo-search-and-highlight () @@ -552,5 +554,6 @@ Intended to be added to `magit-revision-wash-message-hook' and (provide 'hl-todo) ;; Local Variables: ;; indent-tabs-mode: nil +;; lisp-indent-local-overrides: ((cond . 0) (interactive . 0)) ;; End: ;;; hl-todo.el ends here -- 2.47.3