[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/blist 4a5eb414f7 27/31: Fix errors and byte-compile
From: |
ELPA Syncer |
Subject: |
[elpa] externals/blist 4a5eb414f7 27/31: Fix errors and byte-compile |
Date: |
Tue, 28 Dec 2021 16:57:41 -0500 (EST) |
branch: externals/blist
commit 4a5eb414f7faa4b31acd79bd47d8d8478dd7c656
Author: JSDurand <mmemmew@gmail.com>
Commit: JSDurand <mmemmew@gmail.com>
Fix errors and byte-compile
* ChangeLog: Add an entry about fixing errors.
* blist.el
(blist-add-default-filter-automatically, blist-rename-history)
(blist, blist-mode, blist-select, blist-show-annotation)
(blist-import-new-list, blist-load, blist-toggle-group): Fix errors
discovered by flymake.
* blist.elc: byte-compile the file.
---
ChangeLog | 4 ++++
blist.el | 63 +++++++++++++++++++++++++++++++-------------------------------
blist.elc | Bin 0 -> 46200 bytes
3 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5b2f168782..fdd5c18da0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-12-21 李俊緯 <mmemmew@gmail.com>
+
+ Fix errors discovered by flymake.
+
2021-12-20 李俊緯 <mmemmew@gmail.com>
* blist.el: Fix bugs caused by using invisible texts.
diff --git a/blist.el b/blist.el
index 6ee99caf5b..13e7d3fe5b 100644
--- a/blist.el
+++ b/blist.el
@@ -65,8 +65,10 @@
;;;; Filter groups
(defcustom blist-add-default-filter-automatically t
- "If non-nil, and if `blist-default-p' is not used in
-`blist-filter-groups', then a default filter will be added."
+ "The default filter for blist.
+If non-nil, and if `blist-default-p' is not an element of the
+variable `blist-filter-groups', then a default filter will be
+added."
:group 'blist
:type 'boolean)
@@ -241,8 +243,7 @@ See `ilist-string' for how the sorter should behave.")
;;;; Rename history
(defvar blist-rename-history nil
- "The variable that stores the strings that the user has inputted \
-to rename bookmarks.")
+ "The variable that stores the input history of `blist-rename'.")
;;;; Deleted entries
@@ -330,7 +331,7 @@ of the required type."
;; an alias for discoverability
-(defalias #'blist #'blist-list-bookmarks)
+(fset 'blist #'blist-list-bookmarks)
;; REVIEW: Is it a good idea to preserve the hidden status of groups?
;; REVIEW: Use the header?
@@ -442,8 +443,7 @@ used as a `revert-buffer-function'."
;;; Major mode
(define-derived-mode blist-mode ilist-mode "BList"
- "Major mode for interacting with the bookmarks displayed by \
-`blist-list-bookmarks'."
+ "Major mode used in the display of `blist-list-bookmarks'."
:group 'blist
(setq-local revert-buffer-function #'blist-list-bookmarks))
@@ -666,10 +666,10 @@ bookmark line, then open the bookmark on that line.
Otherwise signal an error.
-If called with \\[universal-argument], read a list for how to
-select multiple bookmarks. Otherwise, the variable
-`blist-select-manner' controls how multiple bookmarks are
-selected."
+If ARG is non-nil, i.e. if called with \\[universal-argument] in
+interactive uses, read a list for how to select multiple
+bookmarks. Otherwise, the variable `blist-select-manner'
+controls how multiple bookmarks are selected."
(interactive "P")
(blist-assert-mode)
(let* ((marked-items (ilist-map-lines #'ilist-get-index
@@ -862,7 +862,8 @@ So empty annotations are ignored.
If there are marked bookmarks, show the annotations of the marked
bookmarks; otherwise show the annotations of the bookmark at
-point. If called with \\[universal-argument] and if there is no
+point. If ARG is non-nil, i.e. if called with
+\\[universal-argument] in interactive calls, and if there is no
bookmark at point, use `completing-read' to choose one."
(interactive "P")
(blist-assert-mode)
@@ -1112,9 +1113,9 @@ progress."
(progress-reporter-update
reporter (floor count new-len))))
;; rename the new bookmark if needed
- (let ((temp-name (bookmark-name-from-full-record new-record))
- (new-name temp-name)
- (suffix-count 2))
+ (let* ((temp-name (bookmark-name-from-full-record new-record))
+ (new-name temp-name)
+ (suffix-count 2))
(while (gethash new-name table)
(setq new-name (format "%s<%d>" temp-name suffix-count))
(setq suffix-count (1+ suffix-count)))
@@ -1176,7 +1177,7 @@ get unique numeric suffixes \"<2>\", \"<3>\", etc."
(insert-file-contents file)
(goto-char (point-min))
(setq bookmark-list (bookmark-alist-from-buffer))
- (cond ((not (listp blist))
+ (cond ((not (listp bookmark-list))
(user-error "Invalid bookmark list in %s" file)))
(cond
(overwrite
@@ -1233,21 +1234,21 @@ get unique numeric suffixes \"<2>\", \"<3>\", etc."
(remove-from-invisibility-spec group-symbol))
;; not hidden
((goto-char (ilist-point-at-eol))
- (let* ((start (line-beginning-position))
- (end (min (1+ (line-end-position)) (point-max)))
- (text (buffer-substring start end)))
- (delete-region start end)
- (insert
- (propertize
- (format "[ %s ... ]\n" group-header)
- 'ilist-group-header group-header
- 'blist-hidden t))
- ;; Emacs has a bug that if an invisible character right next
- ;; to the visible part has a display property, then it will
- ;; turn out to be visible. So we insert an invisible
- ;; character to avoid this phenomenon.
- (insert (propertize (string #x20) 'invisible t))
- (goto-char start))
+ (with-silent-modifications
+ (let* ((start (line-beginning-position))
+ (end (min (1+ (line-end-position)) (point-max))))
+ (delete-region start end)
+ (insert
+ (propertize
+ (format "[ %s ... ]\n" group-header)
+ 'ilist-group-header group-header
+ 'blist-hidden t))
+ ;; Emacs has a bug that if an invisible character right next
+ ;; to the visible part has a display property, then it will
+ ;; turn out to be visible. So we insert an invisible
+ ;; character to avoid this phenomenon.
+ (insert (propertize (string #x20) 'invisible t))
+ (goto-char start)))
(add-to-invisibility-spec group-symbol)))))
;;;; Generic return
diff --git a/blist.elc b/blist.elc
new file mode 100644
index 0000000000..8d7e887bdc
Binary files /dev/null and b/blist.elc differ
- [elpa] branch externals/blist created (now e7d56657eb), ELPA Syncer, 2021/12/28
- [elpa] externals/blist 97a8b93b12 01/31: initial working version, ELPA Syncer, 2021/12/28
- [elpa] externals/blist 896e5568f8 04/31: More features, ELPA Syncer, 2021/12/28
- [elpa] externals/blist a4c0a7626f 07/31: fix defcustom problem, ELPA Syncer, 2021/12/28
- [elpa] externals/blist fa54e09b57 03/31: More features, ELPA Syncer, 2021/12/28
- [elpa] externals/blist a24f9d6d35 06/31: fix `blist-select', ELPA Syncer, 2021/12/28
- [elpa] externals/blist a0b9bc4eb5 18/31: * blist.el (blist-relocate): Fix a bug caused by a typo., ELPA Syncer, 2021/12/28
- [elpa] externals/blist 950a214456 28/31: New option: blist-use-header-p, ELPA Syncer, 2021/12/28
- [elpa] externals/blist 4a5eb414f7 27/31: Fix errors and byte-compile,
ELPA Syncer <=
- [elpa] externals/blist db67745821 13/31: Fix some README issues, ELPA Syncer, 2021/12/28
- [elpa] externals/blist c868a2d8b3 24/31: * blist.el (blist-all-bookmarks): refactor, ELPA Syncer, 2021/12/28
- [elpa] externals/blist eddd17ce4d 14/31: try to fix image, ELPA Syncer, 2021/12/28
- [elpa] externals/blist 4a4d94c09d 20/31: blist.el: QoL refinements, ELPA Syncer, 2021/12/28
- [elpa] externals/blist c2f4bc47d4 25/31: fix previous bugs caused by invisibility, ELPA Syncer, 2021/12/28
- [elpa] externals/blist f1b556af33 12/31: Add README, ELPA Syncer, 2021/12/28
- [elpa] externals/blist 48510bdefa 05/31: preserve the original point in building the list, ELPA Syncer, 2021/12/28
- [elpa] externals/blist 41735b2a03 08/31: Make `blist-list-bookmarks' interactive, ELPA Syncer, 2021/12/28
- [elpa] externals/blist 1bac76696c 09/31: fix a wrong function call, ELPA Syncer, 2021/12/28
- [elpa] externals/blist c5145aea0e 02/31: Fix documentations., ELPA Syncer, 2021/12/28