[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit 02bad3e3b9 240/301: Fix compile warnings
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit 02bad3e3b9 240/301: Fix compile warnings |
Date: |
Mon, 10 Jan 2022 22:59:06 -0500 (EST) |
branch: elpa/iedit
commit 02bad3e3b9e9d0414980b39751c6a80fd81a7192
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Fix compile warnings
iedit-lib.el:971:1:Warning: the following functions are not known to be
defined:
mc/save-excursion, mc/create-fake-cursor-at-point
mc/save-execursion is a macro. It is treated as a function when this file is
compiled. Then it ends up a runtime error message:
Invalid function: mc/save-excursion
---
iedit-lib.el | 52 ++++++++++++++++++++++++++++------------------------
1 file changed, 28 insertions(+), 24 deletions(-)
diff --git a/iedit-lib.el b/iedit-lib.el
index f9b4738642..d8093a17a4 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2017-09-15 00:05:18 Victor Ren>
+;; Time-stamp: <2017-09-16 19:31:32 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous rectangle refactoring
;; Version: 0.9.9
@@ -193,31 +193,35 @@ is not applied to other occurrences when it is true.")
map)
"Default keymap used within occurrence overlays.")
-(when (require 'multiple-cursors-core nil t)
- (defun iedit-switch-to-mc-mode ()
- "Switch to multiple-cursors-mode. So that you can navigate
+(eval-after-load 'multiple-cursors-core
+ '(progn
+ ;; The declarations are to avoid compile errors if mc is unknown by
Emacs.
+ (declare-function mc/create-fake-cursor-at-point "mutiple-cursor-core.el"
nil)
+ (declare-function multiple-cursors-mode "mutiple-cursor-core.el")
+ (defun iedit-switch-to-mc-mode ()
+ "Switch to multiple-cursors-mode. So that you can navigate
out of the occurrence and edit simultaneously with multiple
cursors."
- (interactive "*")
- (iedit-barf-if-buffering)
- (let* ((ov (iedit-find-current-occurrence-overlay))
- (offset (- (point) (overlay-start ov)))
- (master (point)))
- (mc/save-excursion
- (dolist (occurrence iedit-occurrences-overlays)
- (goto-char (+ (overlay-start occurrence) offset))
- (unless (= master (point))
- (mc/create-fake-cursor-at-point))
- ))
- (run-hooks 'iedit-aborting-hook)
- (multiple-cursors-mode 1)
- ))
- ;; `multiple-cursors-mode' runs `post-command-hook' function for all the
- ;; cursors. `post-command-hook' is setup in `iedit-switch-to-mc-mode' So the
- ;; function is executed after `iedit-switch-to-mc-mode'. It is not expected.
- ;; `mc/cmds-to-run-once' is for skipping this.
- (add-to-list 'mc/cmds-to-run-once 'iedit-switch-to-mc-mode)
- (define-key iedit-occurrence-keymap-default (kbd "M-M")
'iedit-switch-to-mc-mode))
+ (interactive "*")
+ (iedit-barf-if-buffering)
+ (let* ((ov (iedit-find-current-occurrence-overlay))
+ (offset (- (point) (overlay-start ov)))
+ (master (point)))
+ (save-excursion
+ (dolist (occurrence iedit-occurrences-overlays)
+ (goto-char (+ (overlay-start occurrence) offset))
+ (unless (= master (point))
+ (mc/create-fake-cursor-at-point))
+ ))
+ (run-hooks 'iedit-aborting-hook)
+ (multiple-cursors-mode 1)
+ ))
+ ;; `multiple-cursors-mode' runs `post-command-hook' function for all the
+ ;; cursors. `post-command-hook' is setup in `iedit-switch-to-mc-mode' So
the
+ ;; function is executed after `iedit-switch-to-mc-mode'. It is not
expected.
+ ;; `mc/cmds-to-run-once' is for skipping this.
+ (add-to-list 'mc/cmds-to-run-once 'iedit-switch-to-mc-mode)
+ (define-key iedit-occurrence-keymap-default (kbd "M-M")
'iedit-switch-to-mc-mode)))
(defvar iedit-occurrence-keymap 'iedit-occurrence-keymap-default
"Keymap used within occurrence overlays.
- [nongnu] elpa/iedit 1eabaa061a 210/301: Merge branch 'master' of github.com:victorhge/iedit, (continued)
- [nongnu] elpa/iedit 1eabaa061a 210/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a6d8568379 161/301: Merge pull request #35 from lewang/ensure-skip-mofication-once, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 54b2495af7 214/301: More default occurrence types, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 5b0b618a20 219/301: Quit iedit-mode in `before-revert-hook', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7a6a0d65ab 252/301: Replace deprecated cl with cl-lib, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c1b672cfc9 270/301: Fix bug #115. Now properly disable iedit-mode during desktop restore., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 76ff4aa6b9 218/301: Merge pull request #64 from justbur/sgml-error, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 2221a517a8 227/301: Fix comments, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 0ef1410ec5 259/301: Add iedit-show/hide-occurrence-lines, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 326b6f7787 263/301: Merge `iedit-number-occurrences' and `iedit-increment-occurrences', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 02bad3e3b9 240/301: Fix compile warnings,
ELPA Syncer <=
- [nongnu] elpa/iedit abb577e447 236/301: Merge pull request #77 from EdwardBetts/spelling, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 39919478f9 230/301: fix C-R-RET key binding problem in term, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 77e1661134 246/301: Readme.org: add melpa/stable version badges, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit f566ade5e4 264/301: Workaround for slow `c-before-change', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 64c3505d04 235/301: correct spelling mistake, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 2f0c484817 283/301: Move iedit-buffering related to `iedit-lib', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7e277119fc 221/301: Fix doc string for markup tag, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 50b7da10ac 251/301: Add option `iedit-auto-buffering`, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 3211c2ee6c 228/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 93b642f0a8 286/301: A few small fixes, ELPA Syncer, 2022/01/10