diff -Nru hl-todo-el-3.3.0/debian/changelog hl-todo-el-3.4.2/debian/changelog --- hl-todo-el-3.3.0/debian/changelog 2021-08-23 13:28:07.000000000 +0000 +++ hl-todo-el-3.4.2/debian/changelog 2022-04-02 05:49:13.000000000 +0000 @@ -1,3 +1,11 @@ +hl-todo-el (3.4.2-1) unstable; urgency=medium + + * New upstream version 3.4.2 + * Update patch to fix version number + * d/copyright: Update copyright information + + -- Lev Lamberov Sat, 02 Apr 2022 10:49:13 +0500 + hl-todo-el (3.3.0-1) unstable; urgency=medium * New upstream version 3.3.0 diff -Nru hl-todo-el-3.3.0/debian/copyright hl-todo-el-3.4.2/debian/copyright --- hl-todo-el-3.3.0/debian/copyright 2021-08-23 13:28:07.000000000 +0000 +++ hl-todo-el-3.4.2/debian/copyright 2022-04-02 05:49:13.000000000 +0000 @@ -3,11 +3,11 @@ Source: https://github.com/tarsius/hl-todo Files: * -Copyright: (C) 2013-2021 Jonas Bernoulli +Copyright: (C) 2013-2022 Jonas Bernoulli License: GPL-3+ Files: debian/* -Copyright: (C) 2017-2021 Lev Lamberov +Copyright: (C) 2017-2022 Lev Lamberov License: GPL-3+ License: GPL-3+ diff -Nru hl-todo-el-3.3.0/debian/docs hl-todo-el-3.4.2/debian/docs --- hl-todo-el-3.3.0/debian/docs 2021-08-23 13:28:07.000000000 +0000 +++ hl-todo-el-3.4.2/debian/docs 2022-04-02 05:49:13.000000000 +0000 @@ -1 +1 @@ -*.md +*.org diff -Nru hl-todo-el-3.3.0/debian/patches/0001-fix-version.diff hl-todo-el-3.4.2/debian/patches/0001-fix-version.diff --- hl-todo-el-3.3.0/debian/patches/0001-fix-version.diff 2021-08-23 13:28:07.000000000 +0000 +++ hl-todo-el-3.4.2/debian/patches/0001-fix-version.diff 2022-04-02 05:49:13.000000000 +0000 @@ -10,7 +10,7 @@ ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/tarsius/hl-todo -+;; Version: 3.3.0 ++;; Version: 3.4.2 ;; Keywords: convenience ;; Package-Requires: ((emacs "25")) diff -Nru hl-todo-el-3.3.0/hl-todo.el hl-todo-el-3.4.2/hl-todo.el --- hl-todo-el-3.3.0/hl-todo.el 2021-05-04 14:06:17.000000000 +0000 +++ hl-todo-el-3.4.2/hl-todo.el 2022-03-29 20:17:40.000000000 +0000 @@ -1,6 +1,6 @@ ;;; hl-todo.el --- highlight TODO and similar keywords -*- lexical-binding: t -*- -;; Copyright (C) 2013-2021 Jonas Bernoulli +;; Copyright (C) 2013-2022 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/tarsius/hl-todo @@ -30,7 +30,7 @@ ;; Highlight TODO and similar keywords in comments and strings. ;; You can either explicitly turn on `hl-todo-mode' in certain buffers -;; or use the the global variant `global-hl-todo-mode', which enables +;; 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 @@ -52,7 +52,7 @@ ;;; Code: -(require' cl-lib) +(require 'cl-lib) (eval-when-compile (require 'subr-x)) @@ -130,9 +130,8 @@ face. The syntax class of the characters at either end has to be `w' -\(which means word) in `hl-todo--syntax-table'. That syntax -table derives from `text-mode-syntax-table' but uses `w' as the -class of \"?\". +\(which means word) in `hl-todo--syntax-table' (which derives +from `text-mode-syntax-table'). This package, like most of Emacs, does not use POSIX regexp backtracking. See info node `(elisp)POSIX Regexp' for why that @@ -161,6 +160,12 @@ :group 'hl-todo :type 'boolean) +(defcustom hl-todo-wrap-movement nil + "Whether movement commands wrap around when there are no more matches." + :package-version '(hl-todo . "3.4.0") + :group 'hl-todo + :type 'boolean) + (defcustom hl-todo-highlight-punctuation "" "String of characters to highlight after keywords. @@ -234,10 +239,10 @@ (defun hl-todo--get-face () (let ((keyword (match-string 2))) (hl-todo--combine-face - (cdr (cl-find-if (lambda (elt) - (string-match-p (format "\\`%s\\'" (car elt)) - keyword)) - hl-todo-keyword-faces))))) + (cdr (cl-find-if (lambda (elt) + (string-match-p (format "\\`%s\\'" (car elt)) + keyword)) + hl-todo-keyword-faces))))) (defun hl-todo--combine-face (face) (if (stringp face) @@ -259,11 +264,7 @@ (hl-todo--setup) (font-lock-remove-keywords nil hl-todo--keywords)) (when font-lock-mode - (save-excursion - (goto-char (point-min)) - (while (hl-todo--search) - (save-excursion - (font-lock-fontify-region (match-beginning 0) (match-end 0) nil)))))) + (jit-lock-mode 1))) ;;;###autoload (define-globalized-minor-mode global-hl-todo-mode @@ -290,8 +291,17 @@ (looking-at (hl-todo--regexp))) (goto-char (match-end 0))) (or (hl-todo--search) - (user-error "No more matches")))) - (cl-decf arg)))) + (if hl-todo-wrap-movement + nil + (user-error "No more matches"))))) + (cl-decf arg)) + (when (> arg 0) + (let ((pos (save-excursion + (goto-char (point-min)) + (let ((hl-todo-wrap-movement nil)) + (hl-todo-next arg)) + (point)))) + (goto-char pos))))) ;;;###autoload (defun hl-todo-previous (arg) @@ -307,9 +317,18 @@ (hl-todo--search (concat (hl-todo--regexp) "\\=") nil t) (or (hl-todo--search nil nil t) (progn (goto-char start) - (user-error "No more matches"))))) + (if hl-todo-wrap-movement + nil + (user-error "No more matches")))))) (goto-char (match-end 0)) - (cl-decf arg)))) + (cl-decf arg)) + (when (> arg 0) + (let ((pos (save-excursion + (goto-char (point-max)) + (let ((hl-todo-wrap-movement nil)) + (hl-todo-previous arg)) + (point)))) + (goto-char pos))))) ;;;###autoload (defun hl-todo-occur () @@ -348,11 +367,12 @@ (format "%s %s " comment-start keyword)))) (t (goto-char (line-beginning-position)) - (insert (format "%s %s " - (if (derived-mode-p 'lisp-mode 'emacs-lisp-mode) - (format "%s%s" comment-start comment-start) - comment-start) - keyword)) + (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))))) diff -Nru hl-todo-el-3.3.0/README.md hl-todo-el-3.4.2/README.md --- hl-todo-el-3.3.0/README.md 2021-05-04 14:06:17.000000000 +0000 +++ hl-todo-el-3.4.2/README.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -Highlight TODO and similar keywords in comments and strings ------------------------------------------------------------ - -To highlight keywords turn on `hl-todo-mode` in individual buffers -or use the the global variant `global-hl-todo-mode`. - -You can customize the keywords that are recognized by customizing -`hl-todo-keyword-faces` either through the customization interface -or by setting the variable directly in your init file, for example: - -```emacs-lisp -(setq hl-todo-keyword-faces - '(("TODO" . "#FF0000") - ("FIXME" . "#FF0000") - ("DEBUG" . "#A020F0") - ("GOTCHA" . "#FF4500") - ("STUB" . "#1E90FF"))) -``` - -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.: - -```emacs-lisp -(define-key hl-todo-mode-map (kbd "C-c p") 'hl-todo-previous) -(define-key hl-todo-mode-map (kbd "C-c n") 'hl-todo-next) -(define-key hl-todo-mode-map (kbd "C-c o") 'hl-todo-occur) -(define-key hl-todo-mode-map (kbd "C-c i") 'hl-todo-insert) -``` - -See [this list](https://www.emacswiki.org/emacs/FixmeMode) on the -Emacswiki for other packages that implement the same basic features, -but which might also provide additional features that you might like, -but which I don't deem necessary. - -See [FAQ and Common Issues](https://github.com/tarsius/hl-todo/wiki) -if something isn't working as expected. diff -Nru hl-todo-el-3.3.0/README.org hl-todo-el-3.4.2/README.org --- hl-todo-el-3.3.0/README.org 1970-01-01 00:00:00.000000000 +0000 +++ hl-todo-el-3.4.2/README.org 2022-03-29 20:17:40.000000000 +0000 @@ -0,0 +1,35 @@ +** Highlight TODO and similar keywords in comments and strings + +To highlight keywords turn on ~hl-todo-mode~ in individual buffers +or use the global variant ~global-hl-todo-mode~. + +You can customize the keywords that are recognized by customizing +~hl-todo-keyword-faces~ either through the customization interface +or by setting the variable directly in your init file, for example: + +#+begin_src emacs-lisp + (setq hl-todo-keyword-faces + '(("TODO" . "#FF0000") + ("FIXME" . "#FF0000") + ("DEBUG" . "#A020F0") + ("GOTCHA" . "#FF4500") + ("STUB" . "#1E90FF"))) +#+end_src + +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.: + +#+begin_src emacs-lisp + (define-key hl-todo-mode-map (kbd "C-c p") 'hl-todo-previous) + (define-key hl-todo-mode-map (kbd "C-c n") 'hl-todo-next) + (define-key hl-todo-mode-map (kbd "C-c o") 'hl-todo-occur) + (define-key hl-todo-mode-map (kbd "C-c i") 'hl-todo-insert) +#+end_src + +See [[https://www.emacswiki.org/emacs/FixmeMode][this list]] on the Emacswiki for other packages that implement +the same basic features, but which might also provide additional +features that you might like, but which I don't deem necessary. + +See [[https://github.com/tarsius/hl-todo/wiki][FAQ and Common Issues]] if something isn't working as expected.