Skip to content

Commit

Permalink
Merge branch 'master' into fix/meow-pop-to-mark
Browse files Browse the repository at this point in the history
  • Loading branch information
DogLooksGood authored Dec 24, 2024
2 parents cc98f18 + 43bc65a commit 69281f9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
18 changes: 17 additions & 1 deletion meow-command.el
Original file line number Diff line number Diff line change
Expand Up @@ -1562,10 +1562,26 @@ To search backward, use \\[negative-argument]."
Before jump, a mark of current location will be created."
(interactive)
(meow--cancel-selection)
(unless (member last-command '(meow-pop-to-mark meow-unpop-to-mark))
(unless (member last-command '(meow-pop-to-mark meow-unpop-to-mark meow-pop-or-unpop-to-mark))
(setq mark-ring (append mark-ring (list (point-marker)))))
(pop-to-mark-command))

(defun meow-pop-or-unpop-to-mark (arg)
"Call `meow-pop-to-mark' or `meow-unpop-to-mark', depending on ARG.
With a negative prefix ARG, call `meow-unpop-to-mark'. Otherwise, call
`meow-pop-to-mark.'
See also `meow-pop-or-unpop-to-mark-repeat-unpop'."
(interactive "p")
(if (or (and meow-pop-or-unpop-to-mark-repeat-unpop
(eq last-command 'meow-unpop-to-mark))
(< arg 0))
(progn
(setq this-command 'meow-unpop-to-mark)
(meow-unpop-to-mark))
(meow-pop-to-mark)))

(defun meow-pop-to-global-mark ()
"Alternative command to `pop-global-mark'.
Expand Down
9 changes: 9 additions & 0 deletions meow-var.el
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ the `word', `symbol' and `sexp' things, respectively.")
:group 'meow
:type 'boolean)

(defcustom meow-pop-or-unpop-to-mark-repeat-unpop nil
"Non-nil means that calling `meow-pop-or-unpop-to-mark'
after calling it with a negative argument unpops the mark again.
This variable is meant to be similar to `set-mark-command-repeat-pop'."
:group 'meow
:type 'boolean)


(defcustom meow-keypad-describe-delay
0.5
"The delay in seconds before popup keybinding descriptions appear."
Expand Down

0 comments on commit 69281f9

Please sign in to comment.