Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix byte compilation warnings #383

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions mc-mark-more.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

(require 'multiple-cursors-core)
(require 'thingatpt)
(require 'sgml-mode)

(defvar mc/mark-more-like-this-extended-keymap (make-sparse-keymap))
Copy link
Collaborator

@leotaku leotaku Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge fan of moving mc/mark-more-like-this-extended-keymap to the very top of the file. I would keep it grouped with the code that uses it.

Everything else looks very sensible though, thanks for contributing!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it to above the first function which references it 🙂


(defun mc/cursor-end (cursor)
(if (overlay-get cursor 'mark-active)
Expand Down Expand Up @@ -96,8 +99,8 @@ to (point)), or nil."
"How should mc/mark-more-* search for more matches?

Match everything: nil
Match only whole words: 'words
Match only whole symbols: 'symbols
Match only whole words: \\='words
Match only whole symbols: \\='symbols

Use like case-fold-search, don't recommend setting it globally.")

Expand Down Expand Up @@ -502,15 +505,15 @@ remove the keymap depends on user input and KEEP-PRED:
"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
<down> Mark next like this and set direction to 'down
<up> Mark previous like this and set direction to \\='up
<down> Mark next like this and set direction to \\='down

If direction is 'up:
If direction is \\='up:

<left> Skip past the cursor furthest up
<right> Remove the cursor furthest up

If direction is 'down:
If direction is \\='down:

<left> Remove the cursor furthest down
<right> Skip past the cursor furthest down
Expand Down Expand Up @@ -558,8 +561,6 @@ are we working on the next or previous cursors?")
(mc/skip-to-next-like-this))
(mc/mmlte--message))

(defvar mc/mark-more-like-this-extended-keymap (make-sparse-keymap))

(define-key mc/mark-more-like-this-extended-keymap (kbd "<up>") 'mc/mmlte--up)
(define-key mc/mark-more-like-this-extended-keymap (kbd "<down>") 'mc/mmlte--down)
(define-key mc/mark-more-like-this-extended-keymap (kbd "<left>") 'mc/mmlte--left)
Expand Down
2 changes: 1 addition & 1 deletion multiple-cursors-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ values."
(let ((mc-name (intern (concat "mc--" (symbol-name fn-name)))))
`(progn
(defun ,mc-name (orig-fun &rest args)
(if (not multiple-cursors-mode)
(if (not (bound-and-true-p multiple-cursors-mode))
(apply orig-fun args)
(let* ((cache-key (cons ,(symbol-name fn-name) (,args-cache-key-fn args)))
(cached-value (assoc cache-key mc--input-function-cache))
Expand Down
Loading