[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate db9e064342 132/372: - added features: annotate in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate db9e064342 132/372: - added features: annotate info documents. |
Date: |
Fri, 4 Feb 2022 16:58:34 -0500 (EST) |
branch: elpa/annotate
commit db9e0643425eb433c0b0613d1efbdbba7fb53114
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- added features: annotate info documents.
---
annotate.el | 45 +++++++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 18 deletions(-)
diff --git a/annotate.el b/annotate.el
index c4d770034d..4a8af5659a 100644
--- a/annotate.el
+++ b/annotate.el
@@ -228,23 +228,29 @@ it is called any time the buffer content is changed (so,
for
example, text is added or deleted). In particular, it will
rearrange the overlays bounds when an annotated text is
modified (for example a newline is inserted)."
- (annotate-with-inhibit-modification-hooks
- (save-excursion
- (let* ((bol (annotate-beginning-of-line-pos))
- (eol (annotate-end-of-line-pos))
- (ov (cl-remove-if-not 'annotationp
- (overlays-in bol eol))))
- (dolist (overlay ov)
- (annotate--remove-annotation-property (overlay-start overlay)
- (overlay-end overlay))
- ;; move the overlay if we are breaking it
- (when (<= (overlay-start overlay)
- a
- (overlay-end overlay))
- (move-overlay overlay (overlay-start overlay) a)
- ;; delete overlay if there is no more annotated text
- (when (annotate-annotated-text-empty-p overlay)
- (delete-overlay overlay))))))))
+ (when (buffer-file-name)
+ (annotate-with-inhibit-modification-hooks
+ (save-excursion
+ (let* ((bol (annotate-beginning-of-line-pos))
+ (eol (annotate-end-of-line-pos))
+ (ov (cl-remove-if-not 'annotationp
+ (overlays-in bol eol))))
+ (dolist (overlay ov)
+ (annotate--remove-annotation-property (overlay-start overlay)
+ (overlay-end overlay))
+ ;; move the overlay if we are breaking it
+ (when (<= (overlay-start overlay)
+ a
+ (overlay-end overlay))
+ (move-overlay overlay (overlay-start overlay) a)
+ ;; delete overlay if there is no more annotated text
+ (when (annotate-annotated-text-empty-p overlay)
+ (delete-overlay overlay)))))))))
+
+(defun annotate-info-select-fn ()
+ (annotate-clear-annotations)
+ (annotate-load-annotations)
+ (font-lock-fontify-buffer nil))
(defun annotate-initialize ()
"Load annotations and set up save and display hooks."
@@ -252,6 +258,7 @@ modified (for example a newline is inserted)."
(add-hook 'after-save-hook 'annotate-save-annotations t t)
(add-hook 'window-configuration-change-hook 'font-lock-fontify-buffer t t)
(add-hook 'before-change-functions 'annotate-before-change-fn t t)
+ (add-hook 'Info-selection-hook 'annotate-info-select-fn t t)
(font-lock-add-keywords
nil
'((annotate--font-lock-matcher (2 (annotate--annotation-builder))
@@ -263,6 +270,7 @@ modified (for example a newline is inserted)."
(remove-hook 'after-save-hook 'annotate-save-annotations t)
(remove-hook 'window-configuration-change-hook 'font-lock-fontify-buffer t)
(remove-hook 'before-change-functions 'annotate-before-change-fn t)
+ (remove-hook 'Info-selection-hook 'annotate-info-select-fn t)
(font-lock-remove-keywords
nil
'((annotate--font-lock-matcher (2 (annotate--annotation-builder))
@@ -333,7 +341,8 @@ modified (for example a newline is inserted)."
(goto-char (overlay-start (nth 0 overlays))))))
(defun annotate-actual-file-name ()
- (substring-no-properties (or (buffer-file-name)
+ (substring-no-properties (or Info-current-file
+ (buffer-file-name)
"")))
(defun annotate-save-annotations ()
- [nongnu] elpa/annotate d07e406251 097/372: - changed prefix for annotation in summary window., (continued)
- [nongnu] elpa/annotate d07e406251 097/372: - changed prefix for annotation in summary window., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cf76d79c00 074/372: - fixed docstring., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3341c23e5f 038/372: don't annotate or save empty regions, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 242104e55a 108/372: - changed functions name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 55e318b172 124/372: - fixed reference to a non-existent variable in the procedure that, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 08f520f09a 119/372: - try to elaborate more a function goal., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 354653496d 115/372: - added a bit of (very simple) heuristic to place annotation in the, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a1be01d886 134/372: - try to guess the actual file name of an info document when showing, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 16e0346481 128/372: - prevent showing of summary window if metadata contains no annotations at all., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6ceeb44774 133/372: - removed check for buffer file name in funcion called just before a, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate db9e064342 132/372: - added features: annotate info documents.,
ELPA Syncer <=
- [nongnu] elpa/annotate 4bcecdc875 156/372: - replaced 'splitted-annotation' with 'multiline-annotation'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4fde80fe79 168/372: - updated software version number in the comment on top of the source code;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 696f4ee0cd 167/372: Merge pull request #55 from cage2/update-doc, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a59cc2c6b2 172/372: - when 'delete' button from a summary window is activated redraw and, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 412053cefc 173/372: - [bugfix] When a window is resized ensure that the sizes are, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 41e85c8435 176/372: - increased version number;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cc4292cce4 181/372: - moved the test for 'limit' up in the lambda of the filtering, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f4cc83ec84 189/372: Merge branch 'master' into org-mode-fix, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate bcffdb9f24 202/372: - added some missing docstrings., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 99c45f553e 225/372: Merge pull request #67 from cage2/new-stable-version, ELPA Syncer, 2022/02/04