mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2026-05-10 01:18:19 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 424e0667a4 | |||
| f1a5a39b48 | |||
| 84ab4ee26a | |||
| 07b88080b1 | |||
| e7605bbd7c | |||
| dc0aa99459 | |||
| 6339657440 | |||
| 94164f706a | |||
| 52300ff852 |
@@ -113,4 +113,10 @@
|
|||||||
|
|
||||||
(provide 'mc-cycle-cursors)
|
(provide 'mc-cycle-cursors)
|
||||||
|
|
||||||
|
|
||||||
|
;; Local Variables:
|
||||||
|
;; coding: utf-8
|
||||||
|
;; byte-compile-warnings: (not cl-functions)
|
||||||
|
;; End:
|
||||||
|
|
||||||
;;; mc-cycle-cursors.el ends here
|
;;; mc-cycle-cursors.el ends here
|
||||||
|
|||||||
@@ -123,12 +123,6 @@ highlights the entire width of the window."
|
|||||||
er/history)
|
er/history)
|
||||||
"A list of vars that need to be tracked on a per-cursor basis.")
|
"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)
|
(defun mc/store-current-state-in-overlay (o)
|
||||||
"Store relevant info about point and mark in the given overlay."
|
"Store relevant info about point and mark in the given overlay."
|
||||||
(overlay-put o 'point (set-marker (make-marker) (point)))
|
(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 'mark-active mark-active)
|
||||||
(overlay-put o 'yank-undo-function yank-undo-function)
|
(overlay-put o 'yank-undo-function yank-undo-function)
|
||||||
(overlay-put o 'kill-ring-yank-pointer kill-ring-yank-pointer)
|
(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)
|
o)
|
||||||
|
|
||||||
(defun mc/restore-state-from-overlay (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 mark-active (overlay-get o 'mark-active))
|
||||||
(setq yank-undo-function (overlay-get o 'yank-undo-function))
|
(setq yank-undo-function (overlay-get o 'yank-undo-function))
|
||||||
(setq kill-ring-yank-pointer (overlay-get o 'kill-ring-yank-pointer))
|
(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)
|
(defun mc/remove-fake-cursor (o)
|
||||||
"Delete overlay with state, including dependent overlays and markers."
|
"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)
|
(defun mc/dump-list (list-symbol)
|
||||||
"Insert (setq 'LIST-SYMBOL LIST-VALUE) to current buffer."
|
"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"
|
(insert "(setq " (symbol-name list-symbol) "\n"
|
||||||
" '(")
|
" '(")
|
||||||
(newline-and-indent)
|
(newline-and-indent)
|
||||||
@@ -684,4 +680,9 @@ for running commands with multiple cursors.")
|
|||||||
|
|
||||||
(provide 'multiple-cursors-core)
|
(provide 'multiple-cursors-core)
|
||||||
|
|
||||||
|
;; Local Variables:
|
||||||
|
;; coding: utf-8
|
||||||
|
;; byte-compile-warnings: (not cl-functions)
|
||||||
|
;; End:
|
||||||
|
|
||||||
;;; multiple-cursors-core.el ends here
|
;;; multiple-cursors-core.el ends here
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
(define-package "multiple-cursors" "1.1.4"
|
(define-package "multiple-cursors" "1.1.5"
|
||||||
"Multiple cursors for Emacs.")
|
"Multiple cursors for Emacs.")
|
||||||
|
|||||||
+4
-12
@@ -1,20 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
set_default () {
|
ECUKES_EMACS=${ECUKES_EMACS:-$(which emacs)}
|
||||||
eval "
|
|
||||||
if [ -z \$$1 ]; then
|
|
||||||
$1=$2
|
|
||||||
fi
|
|
||||||
"
|
|
||||||
}
|
|
||||||
|
|
||||||
set_default ECUKES_EMACS "$(which emacs)"
|
|
||||||
|
|
||||||
echo "*** Emacs version ***"
|
echo "*** Emacs version ***"
|
||||||
echo "ECUKES_EMACS =" $(which $ECUKES_EMACS)
|
echo "ECUKES_EMACS = $ECUKES_EMACS"
|
||||||
$ECUKES_EMACS --version
|
"$ECUKES_EMACS" --version
|
||||||
echo
|
echo
|
||||||
|
|
||||||
exec ./util/ecukes/ecukes --graphical
|
exec ./util/ecukes/ecukes --graphical
|
||||||
|
|||||||
Reference in New Issue
Block a user