[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate fbd21602e8 129/372: - refactored 'annotate-actual
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate fbd21602e8 129/372: - refactored 'annotate-actual-file-name' and used where appropriate. |
Date: |
Fri, 4 Feb 2022 16:58:33 -0500 (EST) |
branch: elpa/annotate
commit fbd21602e85051774c82aa05db9b7e6f0221f0c9
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- refactored 'annotate-actual-file-name' and used where appropriate.
---
annotate.el | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/annotate.el b/annotate.el
index 2667edf4dd..c34c364243 100644
--- a/annotate.el
+++ b/annotate.el
@@ -330,6 +330,10 @@ modified (for example a newline is inserted)."
;; jump to first overlay in list
(goto-char (overlay-start (nth 0 overlays))))))
+(defun annotate-actual-file-name ()
+ (substring-no-properties (or (buffer-file-name)
+ "")))
+
(defun annotate-save-annotations ()
"Save all annotations to disk."
(interactive)
@@ -338,7 +342,7 @@ modified (for example a newline is inserted)."
(annotate-ending-of-annotation
a)))
(annotate-describe-annotations)))
(all-annotations (annotate-load-annotation-data))
- (filename (substring-no-properties (or (buffer-file-name)
""))))
+ (filename (annotate-actual-file-name)))
(if (assoc-string filename all-annotations)
(setcdr (assoc-string filename all-annotations)
(list file-annotations
@@ -486,11 +490,10 @@ An example might look like this:
This diff does not contain any changes, but highlights the
annotation, and can be conveniently viewed in diff-mode."
(interactive)
- (let* ((filename (substring-no-properties (or (buffer-file-name) "")))
- (export-buffer (generate-new-buffer (concat
- filename
- ".annotations.diff")))
- (annotations (annotate-describe-annotations))
+ (let* ((filename (annotate-actual-file-name))
+ (export-buffer (generate-new-buffer (concat filename
+ ".annotations.diff")))
+ (annotations (annotate-describe-annotations))
(parent-buffer-mode major-mode))
;; write the diff file description
(with-current-buffer export-buffer
@@ -906,16 +909,12 @@ essentially what you get from:
(and (> (length annotation) 3)
(nth 3 annotation)))
-(defun annotate-actual-file-name ()
- (or (buffer-file-name) ""))
-
(defun annotate-load-annotation-old-format ()
"Load all annotations from disk in old format."
(interactive)
- (let ((annotations (cdr (assoc-string
- (substring-no-properties (or (buffer-file-name) ""))
- (annotate-load-annotation-data))))
- (modified-p (buffer-modified-p)))
+ (let ((annotations (cdr (assoc-string (annotate-actual-file-name)
+ (annotate-load-annotation-data))))
+ (modified-p (buffer-modified-p)))
;; remove empty annotations created by earlier bug:
(setq annotations (cl-remove-if (lambda (ann) (null (nth 2 ann)))
annotations))
@@ -939,7 +938,7 @@ essentially what you get from:
(cl-labels ((old-format-p (annotation)
(not (stringp (cl-first (last annotation))))))
(interactive)
- (let* ((filename (substring-no-properties
(annotate-actual-file-name)))
+ (let* ((filename (annotate-actual-file-name))
(all-annotations-data (annotate-load-annotation-data))
(annotation-dump (assoc-string filename all-annotations-data))
(annotations (annotate-annotations-from-dump
annotation-dump))
- [nongnu] elpa/annotate edaafc69a9 052/372: no more broken annotations with umlauts, (continued)
- [nongnu] elpa/annotate edaafc69a9 052/372: no more broken annotations with umlauts, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c42db2cdf9 034/372: don't mark buffer as modified on load or clear, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 38eb69da8b 107/372: - added a secondary color for highlight and annotation text, the two, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate af6d1bd39a 055/372: tiny bugfix, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e77fc74bd2 036/372: change key binding to be more standard, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b032d2afe0 116/372: - changed function name: 'move-lines' -> 'beginning-of-nth-line'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ce8dfa5ae9 110/372: - added docstrings., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 584f27cd7a 120/372: - fixed region's limit to break an annotation;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d97139b566 121/372: - changed two function names and reworded 'annotate-create-annotation' docstring, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8e8d5d125e 130/372: - fixed macro: "annotate-with-inhibit-modification-hooks"., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate fbd21602e8 129/372: - refactored 'annotate-actual-file-name' and used where appropriate.,
ELPA Syncer <=
- [nongnu] elpa/annotate 7127180360 145/372: - added 'cl-' prefix to 'remove-if';, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e43d2f9e65 069/372: - fixed left margin of annotation, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a51b5239b9 062/372: fixes incorrect annotation display for wide characters, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 0d315a806e 105/372: - fixed first argument of 'lwarn';, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1ed168a79e 131/372: Merge pull request #47 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c8aea8392d 135/372: - rewritten filename juggling to make it works with info file in, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 286646bc0c 137/372: - made recongnizable code that refers to info file annotation. (2/3), ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 13391d9576 157/372: - expanded a comment and a docstring., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 0ae5752526 161/372: Merge pull request #54 from cage2/annotations-on-their-own-line, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c21b95273e 177/372: Merge pull request #57 from cage2/master, ELPA Syncer, 2022/02/04