[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate ece50f65fe 220/372: - fixed managing return value
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate ece50f65fe 220/372: - fixed managing return value of "(get-text-property changed-face-pos 'face)" |
Date: |
Fri, 4 Feb 2022 16:59:01 -0500 (EST) |
branch: elpa/annotate
commit ece50f65fe74533df98b0ef40290f3de3e7b0bc7
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- fixed managing return value of "(get-text-property changed-face-pos
'face)"
When finding the face of a portion of buffer, to try to get the right
positioning of the annotation, using:
"(get-text-property changed-face-pos 'face)"
the code assumed this function returned a symbol (the face of the
text) or nil: this is incorrect according to the documentation; the
code above can returns a symbol, a plist or even list of symbols!
This patch try to deal with the different types of object the above
code can returns.
---
annotate.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/annotate.el b/annotate.el
index a0ecbf8c7b..5dcac38a76 100644
--- a/annotate.el
+++ b/annotate.el
@@ -1538,7 +1538,17 @@ The searched interval can be customized setting the
variable:
all-faces))
(setf all-faces-height
(mapcar (lambda (face)
- (face-attribute face :height nil
'default))
+ (cond
+ ((facep face)
+ (face-attribute face :height nil
'default))
+ ((and (consp face)
+ (keywordp (cl-first face))) ; a
plist
+ (cl-getf face :height
+ (face-attribute 'default
:height)))
+ ((consp face) ; a list of named face,
first wins
+ (face-attribute (cl-first face)
:height nil 'default))
+ (t
+ (face-attribute 'default :height))))
(cl-remove-if #'null all-faces)))
(setf force-newline-p
(cl-find-if (lambda (a) (/= a
default-face-height))
- [nongnu] elpa/annotate 7cf7f46be0 191/372: - removed duplicated function., (continued)
- [nongnu] elpa/annotate 7cf7f46be0 191/372: - removed duplicated function., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9c2bf1bd36 192/372: - used the correct functions when recurse., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 78fc74289f 194/372: - use iteration instead of recursion in, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2dabb8d886 196/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e1a0917d98 197/372: - fixed 'annotate-previous-annotation-ends' and 'annotate-next-annotation-ends', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e7ca823566 201/372: Merge branch 'master' into org-mode-fix, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2cf1a0b6d2 199/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 818f66f4a3 203/372: Merge pull request #58 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate de116813be 211/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 30f639c524 212/372: - fixed return value of 'maybe-force-newline-policy'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ece50f65fe 220/372: - fixed managing return value of "(get-text-property changed-face-pos 'face)",
ELPA Syncer <=
- [nongnu] elpa/annotate b25fb1ccab 224/372: - Increased version to 0.7.0., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a6097f6326 237/372: - updated NEWS, Changelog and version., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate abe23338cb 235/372: - ensured that the modified status of as buffer is not modified by the local, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8481eaf0c2 245/372: - signalled an error when annotating a region and it overlaps with an existing annotation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate dadc57bb3e 231/372: - reverted the version number to 0.8.0;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a02755056e 244/372: - changed occurrence of 'annotate-load-annotation-data' to 'annotate-load-annotation-data-ignore-errors'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4e23850efa 233/372: - Added file argument 'database-file-path' to 'annotate-switch-db';, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2687e123cd 243/372: - added signalling 'annotate-load-annotation-data' to:, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 13c4fcbc4f 250/372: - made 'annotate-load-annotation-data-ignore-errors' ignore all errors;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4cc32fc2fb 256/372: Merge pull request #78 from cage2/master, ELPA Syncer, 2022/02/04