[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 6339657 192/434: Fix byte-compilation war
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 6339657 192/434: Fix byte-compilation warnings, and avoid unnecessary use of "eval" |
Date: |
Sat, 7 Aug 2021 09:20:24 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 63396574401f5f4dceeab84a9a6aff9a5b473bb0
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>
Fix byte-compilation warnings, and avoid unnecessary use of "eval"
multiple-cursors-core.el:28:1:Warning: cl package required at runtime
In mc/store-cursor-specific-var:
multiple-cursors-core.el:127:35:Warning: reference to free variable `o'
In mc/restore-cursor-specific-var:
multiple-cursors-core.el:130:44:Warning: reference to free variable `o'
---
multiple-cursors-core.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index 44c2c80..485aa20 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -123,12 +123,6 @@ highlights the entire width of the window."
er/history)
"A list of vars that need to be tracked on a per-cursor basis.")
-(defun mc/store-cursor-specific-var (var)
- (when (boundp var) (overlay-put o var (eval var))))
-
-(defun mc/restore-cursor-specific-var (var)
- (when (boundp var) (set var (overlay-get o var))))
-
(defun mc/store-current-state-in-overlay (o)
"Store relevant info about point and mark in the given overlay."
(overlay-put o 'point (set-marker (make-marker) (point)))
@@ -139,7 +133,8 @@ highlights the entire width of the window."
(overlay-put o 'mark-active mark-active)
(overlay-put o 'yank-undo-function yank-undo-function)
(overlay-put o 'kill-ring-yank-pointer kill-ring-yank-pointer)
- (mapc 'mc/store-cursor-specific-var mc/cursor-specific-vars)
+ (dolist (var mc/cursor-specific-vars)
+ (when (boundp var) (overlay-put o var (symbol-value var))))
o)
(defun mc/restore-state-from-overlay (o)
@@ -152,7 +147,8 @@ highlights the entire width of the window."
(setq mark-active (overlay-get o 'mark-active))
(setq yank-undo-function (overlay-get o 'yank-undo-function))
(setq kill-ring-yank-pointer (overlay-get o 'kill-ring-yank-pointer))
- (mapc 'mc/restore-cursor-specific-var mc/cursor-specific-vars))
+ (dolist (var mc/cursor-specific-vars)
+ (when (boundp var) (set var (overlay-get o var)))))
(defun mc/remove-fake-cursor (o)
"Delete overlay with state, including dependent overlays and markers."
@@ -684,4 +680,9 @@ for running commands with multiple cursors.")
(provide 'multiple-cursors-core)
+;; Local Variables:
+;; coding: utf-8
+;; byte-compile-warnings: (not cl-functions)
+;; End:
+
;;; multiple-cursors-core.el ends here
- [nongnu] elpa/multiple-cursors 9582c72 204/434: Add mc/insert-numbers, (continued)
- [nongnu] elpa/multiple-cursors 9582c72 204/434: Add mc/insert-numbers, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d534132 122/434: Remove todo.org - use issues instead, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f7d393d 128/434: Don't use next-line and previous-line in non-interactive ways., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors fc59b63 131/434: Fix typo, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d98b85b 138/434: Bump to 1.1.2, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6e9ea1a 149/434: Merge pull request #20 from tkf/diff-friendly-save-lists, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6d4979d 144/434: Bump to 1.1.3, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b3ca408 171/434: Have to require 'cl for now, because of count-if., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors a6984a1 203/434: Merge pull request #53 from oneself/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors a37e02b 177/434: Add new mc-commands to default run-once list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6339657 192/434: Fix byte-compilation warnings, and avoid unnecessary use of "eval",
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 641eb68 212/434: Can use mc/reverse-regions w/o region or cursors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0ee76bf 214/434: Add mc/add-cursor-on-click, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 16589a5 224/434: Update README.md, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 5c60757 216/434: export ECUKES_EMACS in run-travis-ci.sh, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6467fe2 277/434: Add mc/mark-all-dwim to autoloads, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors c69be0e 282/434: Travis CI: Update location of cask install, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4da58ea 302/434: Merge pull request #146 from bling/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f0dcd06 323/434: Merge pull request #175 from lexa/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2d6ffce 330/434: Support unmarking with no region. Change mc/mark-lines to preserve point., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 36b7025 348/434: Add alternative to mc/mark-next-like-this, ELPA Syncer, 2021/08/07