emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/annotate 3341c23e5f 038/372: don't annotate or save empty


From: ELPA Syncer
Subject: [nongnu] elpa/annotate 3341c23e5f 038/372: don't annotate or save empty regions
Date: Fri, 4 Feb 2022 16:58:17 -0500 (EST)

branch: elpa/annotate
commit 3341c23e5febce3c4ae011f67d121062986d0ace
Author: Bastian Bechtold <basti@bastibe.de>
Commit: Bastian Bechtold <basti@bastibe.de>

    don't annotate or save empty regions
    
    unless use-empty-active-region is t.
---
 annotate.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/annotate.el b/annotate.el
index 4db54b97f5..b58aa374a8 100644
--- a/annotate.el
+++ b/annotate.el
@@ -5,7 +5,7 @@
 ;; Maintainer: Bastian Bechtold
 ;; URL: https://github.com/bastibe/annotate.el
 ;; Created: 2015-06-10
-;; Version: 0.3.1
+;; Version: 0.3.2
 
 ;; This file is NOT part of GNU Emacs.
 
@@ -50,7 +50,7 @@
 ;;;###autoload
 (defgroup annotate nil
   "Annotate files without changing them."
-  :version "0.3.1"
+  :version "0.3.2"
   :group 'text)
 
 ;;;###autoload
@@ -426,17 +426,18 @@ annotation, and can be conveniently viewed in diff-mode."
 (defun annotate-bounds ()
   "The bounds of the region or whatever is at point."
   (list (cond
-         ((region-active-p) (region-beginning))
+         ((use-region-p) (region-beginning))
          ((thing-at-point 'symbol) (car (bounds-of-thing-at-point 'symbol)))
          (t (point)))
         (cond
-         ((region-active-p) (region-end))
+         ((use-region-p) (region-end))
          ((thing-at-point 'symbol) (cdr (bounds-of-thing-at-point 'symbol)))
          (t (1+ (point))))))
 
 (defun annotate-describe-annotations ()
   "Return a list of all annotations in the current buffer."
   (let ((overlays (overlays-in 0 (buffer-size))))
+    ;; skip non-annotation overlays
     (setq overlays
           (cl-remove-if
            (lambda (ov)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]