pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
((fboundp 'cl-return-from)
|
||||
(cl-return-from mc/cycle nil))
|
||||
((fboundp 'return-from)
|
||||
(return-from mc/cycle nil))))
|
||||
(cl-return-from mc/cycle nil))))
|
||||
(setf next-cursor fallback-cursor))
|
||||
(mc/create-fake-cursor-at-point)
|
||||
(mc/pop-state-from-overlay next-cursor)
|
||||
|
||||
@@ -54,8 +54,9 @@ also hum/lines-to-expand below and above) To make use of this
|
||||
mode press \"C-'\" while multiple-cursor-mode is active. You can
|
||||
still edit lines while you are in mc-hide-unmatched-lines
|
||||
mode. To leave this mode press <return> or \"C-g\""
|
||||
nil " hu"
|
||||
hum/hide-unmatched-lines-mode-map
|
||||
:init-value nil
|
||||
:lighter " hu"
|
||||
:keymap hum/hide-unmatched-lines-mode-map
|
||||
(if mc-hide-unmatched-lines-mode
|
||||
;;just in case if mc mode will be disabled while hide-unmatched-lines is active
|
||||
(progn
|
||||
|
||||
@@ -210,9 +210,13 @@ With zero ARG, skip the last one and mark next."
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/mark-previous-like-this (arg)
|
||||
"Find and mark the previous part of the buffer matching the currently active region
|
||||
If no region is active add a cursor on the previous line
|
||||
"Find and mark the previous part of the buffer matching the
|
||||
currently active region.
|
||||
|
||||
If no region is active ,add a cursor on the previous line.
|
||||
|
||||
With negative ARG, delete the last one instead.
|
||||
|
||||
With zero ARG, skip the last one and mark next."
|
||||
(interactive "p")
|
||||
(if (< arg 0)
|
||||
@@ -227,9 +231,14 @@ With zero ARG, skip the last one and mark next."
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/mark-previous-like-this-word (arg)
|
||||
"Find and mark the previous part of the buffer matching the currently active region
|
||||
If no region is active, mark the word at the point and find the previous match
|
||||
"Find and mark the previous part of the buffer matching the
|
||||
currently active region.
|
||||
|
||||
If no region is active, mark the word at the point and find the
|
||||
previous match.
|
||||
|
||||
With negative ARG, delete the last one instead.
|
||||
|
||||
With zero ARG, skip the last one and mark previous."
|
||||
(interactive "p")
|
||||
(if (< arg 0)
|
||||
@@ -244,9 +253,14 @@ With zero ARG, skip the last one and mark previous."
|
||||
(mc/maybe-multiple-cursors-mode))
|
||||
|
||||
(defun mc/mark-previous-like-this-symbol (arg)
|
||||
"Find and mark the previous part of the buffer matching the currently active region
|
||||
If no region is active, mark the symbol at the point and find the previous match
|
||||
"Find and mark the previous part of the buffer matching the
|
||||
currently active region.
|
||||
|
||||
If no region is active, mark the symbol at the point and find the
|
||||
previous match.
|
||||
|
||||
With negative ARG, delete the last one instead.
|
||||
|
||||
With zero ARG, skip the last one and mark previous."
|
||||
(interactive "p")
|
||||
(if (< arg 0)
|
||||
@@ -263,10 +277,15 @@ With zero ARG, skip the last one and mark previous."
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/mark-previous-word-like-this (arg)
|
||||
"Find and mark the previous part of the buffer matching the currently active region
|
||||
The matching region must be a whole word to be a match
|
||||
If no region is active add a cursor on the previous line
|
||||
"Find and mark the previous part of the buffer matching the
|
||||
currently active region.
|
||||
|
||||
The matching region must be a whole word to be a match.
|
||||
|
||||
If no region is active, add a cursor on the previous line.
|
||||
|
||||
With negative ARG, delete the last one instead.
|
||||
|
||||
With zero ARG, skip the last one and mark next."
|
||||
(interactive "p")
|
||||
(let ((mc/enclose-search-term 'words))
|
||||
@@ -274,10 +293,15 @@ With zero ARG, skip the last one and mark next."
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/mark-previous-symbol-like-this (arg)
|
||||
"Find and mark the previous part of the buffer matching the currently active region
|
||||
The matching region must be a whole symbol to be a match
|
||||
If no region is active add a cursor on the previous line
|
||||
"Find and mark the previous part of the buffer matching
|
||||
the currently active region.
|
||||
|
||||
The matching region must be a whole symbol to be a match.
|
||||
|
||||
If no region is active add a cursor on the previous line.
|
||||
|
||||
With negative ARG, delete the last one instead.
|
||||
|
||||
With zero ARG, skip the last one and mark next."
|
||||
(interactive "p")
|
||||
(let ((mc/enclose-search-term 'symbols))
|
||||
@@ -324,13 +348,15 @@ With zero ARG, skip the last one and mark next."
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/skip-to-next-like-this ()
|
||||
"Skip the current one and select the next part of the buffer matching the currently active region."
|
||||
"Skip the current one and select the next part of the buffer
|
||||
matching the currently active region."
|
||||
(interactive)
|
||||
(mc/mark-next-like-this 0))
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/skip-to-previous-like-this ()
|
||||
"Skip the current one and select the prev part of the buffer matching the currently active region."
|
||||
"Skip the current one and select the prev part of the buffer
|
||||
matching the currently active region."
|
||||
(interactive)
|
||||
(mc/mark-previous-like-this 0))
|
||||
|
||||
@@ -393,16 +419,18 @@ With zero ARG, skip the last one and mark next."
|
||||
(progn
|
||||
(mc/remove-fake-cursors)
|
||||
(goto-char beg)
|
||||
(while (search-forward search end t)
|
||||
(push-mark (match-beginning 0))
|
||||
(mc/create-fake-cursor-at-point))
|
||||
(let ((first (mc/furthest-cursor-before-point)))
|
||||
(if (not first)
|
||||
(error "Search failed for %S" search)
|
||||
(mc/pop-state-from-overlay first)))
|
||||
(if (> (mc/num-cursors) 1)
|
||||
(multiple-cursors-mode 1)
|
||||
(mc/disable-multiple-cursors-mode))))))
|
||||
(let ((lastmatch))
|
||||
(while (search-forward search end t)
|
||||
(push-mark (match-beginning 0))
|
||||
(mc/create-fake-cursor-at-point)
|
||||
(setq lastmatch t))
|
||||
(unless lastmatch
|
||||
(error "Search failed for %S" search)))
|
||||
(goto-char (match-end 0))
|
||||
(if (< (mc/num-cursors) 3)
|
||||
(mc/disable-multiple-cursors-mode)
|
||||
(mc/pop-state-from-overlay (mc/furthest-cursor-before-point))
|
||||
(multiple-cursors-mode 1))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/mark-all-in-region-regexp (beg end)
|
||||
@@ -471,7 +499,7 @@ remove the keymap depends on user input and KEEP-PRED:
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/mark-more-like-this-extended ()
|
||||
"Like mark-more-like-this, but then lets you adjust with arrows key.
|
||||
"Like mark-more-like-this, but then lets you adjust with arrow keys.
|
||||
The adjustments work like this:
|
||||
|
||||
<up> Mark previous like this and set direction to 'up
|
||||
@@ -487,13 +515,15 @@ If direction is 'down:
|
||||
<left> Remove the cursor furthest down
|
||||
<right> Skip past the cursor furthest down
|
||||
|
||||
The bindings for these commands can be changed. See `mc/mark-more-like-this-extended-keymap'."
|
||||
The bindings for these commands can be changed.
|
||||
See `mc/mark-more-like-this-extended-keymap'."
|
||||
(interactive)
|
||||
(mc/mmlte--down)
|
||||
(set-temporary-overlay-map mc/mark-more-like-this-extended-keymap t))
|
||||
(set-transient-map mc/mark-more-like-this-extended-keymap t))
|
||||
|
||||
(defvar mc/mark-more-like-this-extended-direction nil
|
||||
"When using mc/mark-more-like-this-extended are we working on the next or previous cursors?")
|
||||
"When using mc/mark-more-like-this-extended
|
||||
are we working on the next or previous cursors?")
|
||||
|
||||
(make-variable-buffer-local 'mc/mark-more-like-this-extended)
|
||||
|
||||
@@ -639,7 +669,7 @@ If the region is inactive or on a single line, it will behave like
|
||||
(last
|
||||
(progn
|
||||
(when (looking-at "<") (forward-char 1))
|
||||
(when (looking-back ">") (forward-char -1))
|
||||
(when (looking-back ">" 100) (forward-char -1))
|
||||
(sgml-get-context)))))
|
||||
|
||||
(defun mc--on-tag-name-p ()
|
||||
|
||||
@@ -52,6 +52,11 @@ rendered or shift text."
|
||||
:type '(boolean)
|
||||
:group 'multiple-cursors)
|
||||
|
||||
(defcustom mc--reset-read-variables '()
|
||||
"A list of cache variable names to reset by multiple-cursors."
|
||||
:type '(list symbol)
|
||||
:group 'multiple-cursors)
|
||||
|
||||
(defface mc/region-face
|
||||
'((t :inherit region))
|
||||
"The face used for fake regions"
|
||||
@@ -117,9 +122,13 @@ rendered or shift text."
|
||||
|
||||
(defun mc/cursor-is-bar ()
|
||||
"Return non-nil if the cursor is a bar."
|
||||
(or (eq cursor-type 'bar)
|
||||
(and (listp cursor-type)
|
||||
(eq (car cursor-type) 'bar))))
|
||||
(let ((cursor-type
|
||||
(if (eq cursor-type t)
|
||||
(frame-parameter nil 'cursor-type)
|
||||
cursor-type)))
|
||||
(or (eq cursor-type 'bar)
|
||||
(and (listp cursor-type)
|
||||
(eq (car cursor-type) 'bar)))))
|
||||
|
||||
(defun mc/line-number-at-pos (&optional pos absolute)
|
||||
"Faster implementation of `line-number-at-pos'."
|
||||
@@ -138,7 +147,7 @@ rendered or shift text."
|
||||
"Create overlay to look like cursor at end of line."
|
||||
(let ((overlay (make-overlay pos pos nil nil nil)))
|
||||
(if (and mc/match-cursor-style (mc/cursor-is-bar))
|
||||
(overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
|
||||
(overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
|
||||
(overlay-put overlay 'after-string (propertize " " 'face 'mc/cursor-face)))
|
||||
overlay))
|
||||
|
||||
@@ -146,7 +155,7 @@ rendered or shift text."
|
||||
"Create overlay to look like cursor inside text."
|
||||
(let ((overlay (make-overlay pos (1+ pos) nil nil nil)))
|
||||
(if (and mc/match-cursor-style (mc/cursor-is-bar))
|
||||
(overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
|
||||
(overlay-put overlay 'before-string (propertize "|" 'face 'mc/cursor-bar-face))
|
||||
(overlay-put overlay 'face 'mc/cursor-face))
|
||||
overlay))
|
||||
|
||||
@@ -192,8 +201,8 @@ highlights the entire width of the window."
|
||||
"Store relevant info about point and mark in the given overlay."
|
||||
(overlay-put o 'point (set-marker (make-marker) (point)))
|
||||
(overlay-put o 'mark (set-marker (make-marker)
|
||||
(let ((mark-even-if-inactive t))
|
||||
(mark))))
|
||||
(let ((mark-even-if-inactive t))
|
||||
(mark))))
|
||||
(dolist (var mc/cursor-specific-vars)
|
||||
(when (boundp var) (overlay-put o var (symbol-value var))))
|
||||
o)
|
||||
@@ -250,8 +259,11 @@ If this value is nil, there is no ceiling."
|
||||
:group 'multiple-cursors)
|
||||
|
||||
(defun mc/create-fake-cursor-at-point (&optional id)
|
||||
"Add a fake cursor and possibly a fake active region overlay based on point and mark.
|
||||
Saves the current state in the overlay to be restored later."
|
||||
"Add a fake cursor and possibly a fake active region overlay
|
||||
based on point and mark.
|
||||
|
||||
Saves the current state in the overlay
|
||||
to be restored later."
|
||||
(unless mc--max-cursors-original
|
||||
(setq mc--max-cursors-original mc/max-cursors))
|
||||
(when mc/max-cursors
|
||||
@@ -271,7 +283,8 @@ Saves the current state in the overlay to be restored later."
|
||||
overlay))
|
||||
|
||||
(defun mc/execute-command (cmd)
|
||||
"Run command, simulating the parts of the command loop that makes sense for fake cursors."
|
||||
"Run command, simulating the parts of the command loop that
|
||||
makes sense for fake cursors."
|
||||
(setq this-command cmd)
|
||||
(run-hooks 'pre-command-hook)
|
||||
(unless (eq this-command 'ignore)
|
||||
@@ -313,26 +326,32 @@ cursor with updated info."
|
||||
;; Intercept some reading commands so you won't have to
|
||||
;; answer them for every single cursor
|
||||
|
||||
(defvar mc--read-char nil)
|
||||
(defvar multiple-cursors-mode nil)
|
||||
(defadvice read-char (around mc-support activate)
|
||||
(if (not multiple-cursors-mode)
|
||||
ad-do-it
|
||||
(unless mc--read-char
|
||||
(setq mc--read-char ad-do-it))
|
||||
(setq ad-return-value mc--read-char)))
|
||||
|
||||
(defvar mc--read-quoted-char nil)
|
||||
(defadvice read-quoted-char (around mc-support activate)
|
||||
(if (not multiple-cursors-mode)
|
||||
ad-do-it
|
||||
(unless mc--read-quoted-char
|
||||
(setq mc--read-quoted-char ad-do-it))
|
||||
(setq ad-return-value mc--read-quoted-char)))
|
||||
|
||||
(defun mc--reset-read-prompts ()
|
||||
(setq mc--read-char nil)
|
||||
(setq mc--read-quoted-char nil))
|
||||
(mapc (lambda (var) (set var nil))
|
||||
mc--reset-read-variables))
|
||||
|
||||
(defmacro mc--cache-input-function (fn-name)
|
||||
"Advise FN-NAME to cache its value in a private variable. Cache
|
||||
is to be used by mc/execute-command-for-all-fake-cursors and
|
||||
caches will be reset by mc--reset-read-prompts."
|
||||
(let ((mc-name (intern (concat "mc--" (symbol-name fn-name)))))
|
||||
`(progn
|
||||
(defvar ,mc-name nil)
|
||||
(defun ,mc-name (orig-fun &rest args)
|
||||
(if (not multiple-cursors-mode)
|
||||
(apply orig-fun args)
|
||||
(unless ,mc-name
|
||||
(setq ,mc-name (apply orig-fun args)))
|
||||
,mc-name))
|
||||
(advice-add ',fn-name :around #',mc-name)
|
||||
(add-to-list 'mc--reset-read-variables ',mc-name))))
|
||||
|
||||
(mc--cache-input-function read-char)
|
||||
(mc--cache-input-function read-quoted-char)
|
||||
(mc--cache-input-function register-read-with-preview) ; used by insert-register
|
||||
(mc--cache-input-function read-char-from-minibuffer) ; used by zap-to-char
|
||||
|
||||
(mc--reset-read-prompts)
|
||||
|
||||
@@ -350,7 +369,8 @@ cursor with updated info."
|
||||
"Variable to keep the state of the real cursor while undoing a fake one")
|
||||
|
||||
(defun activate-cursor-for-undo (id)
|
||||
"Called when undoing to temporarily activate the fake cursor which action is being undone."
|
||||
"Called when undoing to temporarily activate the fake cursor
|
||||
which action is being undone."
|
||||
(let ((cursor (mc/cursor-with-id id)))
|
||||
(when cursor
|
||||
(setq mc--stored-state-for-undo (mc/store-current-state-in-overlay
|
||||
@@ -567,13 +587,16 @@ They are temporarily disabled when multiple-cursors are active.")
|
||||
`(" mc:" (:eval (format ,(propertize "%d" 'face 'font-lock-warning-face)
|
||||
(mc/num-cursors))))
|
||||
"What to display in the mode line while multiple-cursors-mode is active."
|
||||
:type '(sexp)
|
||||
:group 'multiple-cursors)
|
||||
(put 'mc/mode-line 'risky-local-variable t)
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode multiple-cursors-mode
|
||||
"Mode while multiple cursors are active."
|
||||
nil mc/mode-line mc/keymap
|
||||
:init-value nil
|
||||
:lighter mc/mode-line
|
||||
:keymap mc/keymap
|
||||
(if multiple-cursors-mode
|
||||
(progn
|
||||
(mc/temporarily-disable-unsupported-minor-modes)
|
||||
@@ -617,7 +640,7 @@ from being executed if in multiple-cursors-mode."
|
||||
|
||||
;; Make sure pastes from other programs are added to all kill-rings when yanking
|
||||
(defadvice current-kill (before interprogram-paste-for-all-cursors
|
||||
(n &optional do-not-move) activate)
|
||||
(n &optional do-not-move) activate)
|
||||
(let ((interprogram-paste (and (= n 0)
|
||||
interprogram-paste-function
|
||||
(funcall interprogram-paste-function))))
|
||||
@@ -693,8 +716,8 @@ for running commands with multiple cursors."
|
||||
mc/edit-ends-of-lines
|
||||
mc/edit-beginnings-of-lines
|
||||
mc/mark-next-like-this
|
||||
mc/mark-next-like-this-word
|
||||
mc/mark-next-like-this-symbol
|
||||
mc/mark-next-like-this-word
|
||||
mc/mark-next-like-this-symbol
|
||||
mc/mark-next-word-like-this
|
||||
mc/mark-next-symbol-like-this
|
||||
mc/mark-previous-like-this
|
||||
@@ -713,7 +736,7 @@ for running commands with multiple cursors."
|
||||
mc/mark-all-dwim
|
||||
mc/mark-sgml-tag-pair
|
||||
mc/insert-numbers
|
||||
mc/insert-letters
|
||||
mc/insert-letters
|
||||
mc/sort-regions
|
||||
mc/reverse-regions
|
||||
mc/cycle-forward
|
||||
@@ -745,6 +768,8 @@ for running commands with multiple cursors."
|
||||
redo
|
||||
undo-tree-undo
|
||||
undo-tree-redo
|
||||
undo-fu-only-undo
|
||||
undo-fu-only-redo
|
||||
universal-argument
|
||||
universal-argument-more
|
||||
universal-argument-other-key
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(define-package "multiple-cursors" "20211112.2223" "Multiple cursors for Emacs."
|
||||
(define-package "multiple-cursors" "20221126.743" "Multiple cursors for Emacs."
|
||||
'((cl-lib "0.5"))
|
||||
:commit "8a60fc7ef0ae6e5ca089a7c95264cd0ae83e7274" :authors
|
||||
:commit "fe0d5167459b792a699af782685582a195852cb9" :authors
|
||||
'(("Magnar Sveen" . "magnars@gmail.com"))
|
||||
:maintainer
|
||||
'("Magnar Sveen" . "magnars@gmail.com")
|
||||
|
||||
@@ -52,8 +52,9 @@
|
||||
(defun set-rectangular-region-anchor ()
|
||||
"Anchors the rectangular region at point.
|
||||
|
||||
Think of this one as `set-mark' except you're marking a rectangular region. It is
|
||||
an exceedingly quick way of adding multiple cursors to multiple lines."
|
||||
Think of this one as `set-mark' except you're marking a
|
||||
rectangular region. It is an exceedingly quick way of adding
|
||||
multiple cursors to multiple lines."
|
||||
(interactive)
|
||||
(set-marker rrm/anchor (point))
|
||||
(push-mark (point))
|
||||
@@ -111,7 +112,9 @@ an exceedingly quick way of adding multiple cursors to multiple lines."
|
||||
;;;###autoload
|
||||
(define-minor-mode rectangular-region-mode
|
||||
"A mode for creating a rectangular region to edit"
|
||||
nil " rr" rectangular-region-mode-map
|
||||
:init-value nil
|
||||
:lighter " rr"
|
||||
:keymap rectangular-region-mode-map
|
||||
(if rectangular-region-mode
|
||||
(progn
|
||||
(add-hook 'after-change-functions 'rrm/switch-to-multiple-cursors t t)
|
||||
|
||||
Reference in New Issue
Block a user