Mercurial > emacs
comparison lisp/smerge-mode.el @ 94846:1a6e4ea4e517
(smerge-command-prefix): Fix custom type.
author | Reiner Steib <Reiner.Steib@gmx.de> |
---|---|
date | Sat, 10 May 2008 13:09:04 +0000 |
parents | ee5932bf781d |
children | cf96e7b08046 |
comparison
equal
deleted
inserted
replaced
94845:1aa1de92b8a1 | 94846:1a6e4ea4e517 |
---|---|
6 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> | 6 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
7 ;; Keywords: tools revision-control merge diff3 cvs conflict | 7 ;; Keywords: tools revision-control merge diff3 cvs conflict |
8 | 8 |
9 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
10 | 10 |
11 ;; GNU Emacs is free software: you can redistribute it and/or modify | 11 ;; GNU Emacs is free software; you can redistribute it and/or modify |
12 ;; it under the terms of the GNU General Public License as published by | 12 ;; it under the terms of the GNU General Public License as published by |
13 ;; the Free Software Foundation, either version 3 of the License, or | 13 ;; the Free Software Foundation; either version 3, or (at your option) |
14 ;; (at your option) any later version. | 14 ;; any later version. |
15 | 15 |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | 16 ;; GNU Emacs is distributed in the hope that it will be useful, |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 ;; GNU General Public License for more details. | 19 ;; GNU General Public License for more details. |
20 | 20 |
21 ;; You should have received a copy of the GNU General Public License | 21 ;; You should have received a copy of the GNU General Public License |
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
24 ;; Boston, MA 02110-1301, USA. | |
23 | 25 |
24 ;;; Commentary: | 26 ;;; Commentary: |
25 | 27 |
26 ;; Provides a lightweight alternative to emerge/ediff. | 28 ;; Provides a lightweight alternative to emerge/ediff. |
27 ;; To use it, simply add to your .emacs the following lines: | 29 ;; To use it, simply add to your .emacs the following lines: |
156 "The base keymap for `smerge-mode'.") | 158 "The base keymap for `smerge-mode'.") |
157 | 159 |
158 (defcustom smerge-command-prefix "\C-c^" | 160 (defcustom smerge-command-prefix "\C-c^" |
159 "Prefix for `smerge-mode' commands." | 161 "Prefix for `smerge-mode' commands." |
160 :group 'smerge | 162 :group 'smerge |
161 :type '(choice (string "\e") (string "\C-c^") (string "") string)) | 163 :type '(choice (const :tag "ESC" "\e") |
164 (const :tag "C-c ^" "\C-c^" ) | |
165 (const :tag "none" "") | |
166 string)) | |
162 | 167 |
163 (easy-mmode-defmap smerge-mode-map | 168 (easy-mmode-defmap smerge-mode-map |
164 `((,smerge-command-prefix . ,smerge-basic-map)) | 169 `((,smerge-command-prefix . ,smerge-basic-map)) |
165 "Keymap for `smerge-mode'.") | 170 "Keymap for `smerge-mode'.") |
166 | 171 |
1223 (defun smerge-start-session () | 1228 (defun smerge-start-session () |
1224 "Turn on `smerge-mode' and move point to first conflict marker. | 1229 "Turn on `smerge-mode' and move point to first conflict marker. |
1225 If no conflict maker is found, turn off `smerge-mode'." | 1230 If no conflict maker is found, turn off `smerge-mode'." |
1226 (smerge-mode 1) | 1231 (smerge-mode 1) |
1227 (condition-case nil | 1232 (condition-case nil |
1228 (unless (looking-at smerge-begin-re) | 1233 (smerge-next) |
1229 (smerge-next)) | |
1230 (error (smerge-auto-leave)))) | 1234 (error (smerge-auto-leave)))) |
1231 | 1235 |
1232 (provide 'smerge-mode) | 1236 (provide 'smerge-mode) |
1233 | 1237 |
1234 ;; arch-tag: 605c8d1e-e43d-4943-a6f3-1bcc4333e690 | 1238 ;; arch-tag: 605c8d1e-e43d-4943-a6f3-1bcc4333e690 |