-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from DamienCassou/isearch-motion
- Loading branch information
Showing
8 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,4 +170,4 @@ meaningful end of buffer starting from real end (i.e., ~point-max~). | |
|
||
** License | ||
|
||
See [[file:COPYING][COPYING]]. Copyright (c) 2017-2021 [[mailto:[email protected]][Damien Cassou]] and [[mailto:[email protected]][Matus Goljer]]. | ||
See [[file:COPYING][COPYING]]. Copyright (c) 2017-2022 [[mailto:[email protected]][Damien Cassou]] and [[mailto:[email protected]][Matus Goljer]]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
;;; beginend.el --- Redefine M-< and M-> for some modes -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2015-2021 Damien Cassou | ||
;; Copyright (C) 2015-2022 Damien Cassou | ||
|
||
;; Authors: Damien Cassou <[email protected]> | ||
;; Matus Goljer <[email protected]> | ||
;; Version: 2.0.1 | ||
;; Version: 2.3.0 | ||
;; URL: https://github.com/DamienCassou/beginend | ||
;; Package-Requires: ((emacs "25.3")) | ||
;; Created: 01 Jun 2015 | ||
|
@@ -28,7 +28,7 @@ | |
|
||
;; Redefine M-< and M-> for some modes. For example, | ||
;; | ||
;; - in dired mode, M-< (respectively M->) goes to first (respectively last) | ||
;; - in `dired-mode', M-< (respectively M->) goes to first (respectively last) | ||
;; file line | ||
;; | ||
;; - in message mode, | ||
|
@@ -46,10 +46,16 @@ | |
|
||
(require 'cl-lib) ; for (setf (point) …) | ||
|
||
(defgroup beginend nil | ||
"Customization group for beginend." | ||
:group 'editing) | ||
|
||
;;; Helper code | ||
|
||
(defun beginend--defkey (map command-begin command-end) | ||
"Bind \[beginning-of-buffer] and \[end-of-buffer] in MAP to COMMAND-BEGIN and COMMAND-END." | ||
"Bind COMMAND-BEGIN and COMMAND-END in MAP to standard keys. | ||
The keys used to bind the 2 commands are respectively | ||
\\[beginning-of-buffer] and \\[end-of-buffer]." | ||
(define-key map (vector 'remap 'beginning-of-buffer) command-begin) | ||
(define-key map (vector 'remap 'end-of-buffer) command-end)) | ||
|
||
|
@@ -129,6 +135,10 @@ BEGIN-BODY and END-BODY are two `progn' expressions passed to respectively | |
(interactive) | ||
(beginend--double-tap-end | ||
,@(cdr end-body))) | ||
(put ',endfunc-name 'isearch-motion | ||
(get 'end-of-buffer 'isearch-motion)) | ||
(put ',beginfunc-name 'isearch-motion | ||
(get 'beginning-of-buffer 'isearch-motion)) | ||
(defvar ,map-name | ||
(let ((map (make-sparse-keymap))) | ||
(beginend--defkey map #',beginfunc-name #',endfunc-name) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
;;; beginend-dired-test.el --- Tests for dired support in beginend -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2017-2021 Damien Cassou | ||
;; Copyright (C) 2017-2022 Damien Cassou | ||
|
||
;; Author: Damien Cassou <[email protected]> | ||
;; Version: 2.0.1 | ||
;; Version: 2.3.0 | ||
;; URL: https://github.com/DamienCassou/beginend | ||
;; Package-requires: ((emacs "25.3")) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
;;; beginend-marks-test.el --- Tests for mark support in beginend -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2017-2021 Damien Cassou | ||
;; Copyright (C) 2017-2022 Damien Cassou | ||
|
||
;; Author: Damien Cassou <[email protected]> | ||
;; Version: 2.0.1 | ||
;; Version: 2.3.0 | ||
;; URL: https://github.com/DamienCassou/beginend | ||
;; Package-requires: ((emacs "25.3")) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
;;; beginend-narrowing-test.el --- Tests beginend when narrowing is in effect -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2017-2021 Damien Cassou | ||
;; Copyright (C) 2017-2022 Damien Cassou | ||
|
||
;; Author: Damien Cassou <[email protected]> | ||
;; Version: 2.0.1 | ||
;; Version: 2.3.0 | ||
;; URL: https://github.com/DamienCassou/beginend | ||
;; Package-requires: ((emacs "25.3")) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
;;; beginend-org-test.el --- Tests for org support in beginend -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2017-2021 Damien Cassou | ||
;; Copyright (C) 2017-2022 Damien Cassou | ||
|
||
;; Author: Damien Cassou <[email protected]> | ||
;; Version: 2.0.1 | ||
;; Version: 2.3.0 | ||
;; URL: https://github.com/DamienCassou/beginend | ||
;; Package-requires: ((emacs "25.3")) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
;;; beginend-prog-test.el --- Tests for beginend in prog-mode -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2017-2021 Damien Cassou | ||
;; Copyright (C) 2017-2022 Damien Cassou | ||
|
||
;; Author: Damien Cassou <[email protected]> | ||
;; Version: 2.0.1 | ||
;; Version: 2.3.0 | ||
;; URL: https://github.com/DamienCassou/beginend | ||
;; Package-requires: ((emacs "25.1")) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
;;; test-helper.el --- Helper code for beginend tests -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2017-2021 Damien Cassou | ||
;; Copyright (C) 2017-2022 Damien Cassou | ||
|
||
;; Author: Damien Cassou <[email protected]> | ||
|
||
|