9 Commits

Author SHA1 Message Date
Magnar Sveen 424e0667a4 1.1.5 2012-12-02 08:29:52 +01:00
Magnar Sveen f1a5a39b48 Merge pull request #46 from tkf/fix-dump-list-take-2
Fix mc/dump-list (take 2): it looses old setting
2012-12-01 22:34:14 -08:00
Takafumi Arakaki 84ab4ee26a Fix mc/dump-list (take 2): it looses old setting
In the old code, heading part of `value` may lost due to in-place
modification by the `sort` function. ``(symbol-value list-symbol)``
must be re-evaluated before passing it to `mapc`.  To do that,
simply replacing `let` to `symbol-macrolet` works.

See also: #40
2012-12-01 22:01:02 +01:00
Magnar Sveen 07b88080b1 Merge pull request #43 from purcell/travis-script
Simplify travis script, and make it work when ECUKES_EMACS has spaces
2012-11-27 11:03:38 -08:00
Magnar Sveen e7605bbd7c Merge pull request #42 from purcell/cleanup
Fix byte-compilation warnings, and avoid unnecessary use of "eval"
2012-11-27 11:03:22 -08:00
Steve Purcell dc0aa99459 Simplify travis run script, and make it work when ECUKES_EMACS has a space in the path
Yes, on OS X, one might have:

ECUKES_EMACS='/Applications/Emacs 23.app/Contents/MacOS/Emacs'
2012-11-27 16:35:43 +00:00
Steve Purcell 6339657440 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'
2012-11-27 14:04:36 +00:00
Magnar Sveen 94164f706a Merge pull request #41 from purcell/patch-1
Prevent byte-compilation warnings 'cl functions
2012-11-26 03:28:46 -08:00
Steve Purcell 52300ff852 Prevent byte-compilation warnings 'cl functions
Prevents the following senseless warnings:

    In mc/first-fake-cursor-after:
    mc-cycle-cursors.el:76:70:Warning: function `remove-if' from cl package called
        at runtime
    mc-cycle-cursors.el:78:64:Warning: function `sort*' from cl package called at
        runtime

    In mc/last-fake-cursor-before:
    mc-cycle-cursors.el:85:71:Warning: function `remove-if' from cl package called
        at runtime
    mc-cycle-cursors.el:87:65:Warning: function `sort*' from cl package called at
        runtime
2012-11-26 11:21:27 +00:00
4 changed files with 21 additions and 22 deletions
+6
View File
@@ -113,4 +113,10 @@
(provide 'mc-cycle-cursors)
;; Local Variables:
;; coding: utf-8
;; byte-compile-warnings: (not cl-functions)
;; End:
;;; mc-cycle-cursors.el ends here
+10 -9
View File
@@ -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."
@@ -509,7 +505,7 @@ for running commands with multiple cursors.")
(defun mc/dump-list (list-symbol)
"Insert (setq 'LIST-SYMBOL LIST-VALUE) to current buffer."
(let ((value (symbol-value list-symbol)))
(symbol-macrolet ((value (symbol-value list-symbol)))
(insert "(setq " (symbol-name list-symbol) "\n"
" '(")
(newline-and-indent)
@@ -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
+1 -1
View File
@@ -1,2 +1,2 @@
(define-package "multiple-cursors" "1.1.4"
(define-package "multiple-cursors" "1.1.5"
"Multiple cursors for Emacs.")
+4 -12
View File
@@ -1,20 +1,12 @@
#!/bin/sh
#!/bin/sh -e
cd "$(dirname "$0")"
set_default () {
eval "
if [ -z \$$1 ]; then
$1=$2
fi
"
}
set_default ECUKES_EMACS "$(which emacs)"
ECUKES_EMACS=${ECUKES_EMACS:-$(which emacs)}
echo "*** Emacs version ***"
echo "ECUKES_EMACS =" $(which $ECUKES_EMACS)
$ECUKES_EMACS --version
echo "ECUKES_EMACS = $ECUKES_EMACS"
"$ECUKES_EMACS" --version
echo
exec ./util/ecukes/ecukes --graphical