comparison lisp/repeat.el @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents e88404e8f2cf
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
1 ;;; repeat.el --- convenient way to repeat the previous command 1 ;;; repeat.el --- convenient way to repeat the previous command
2 2
3 ;; Copyright (C) 1998 Free Software Foundation, Inc. 3 ;; Copyright (C) 1998, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5 ;; Author: Will Mengarini <seldon@eskimo.com> 5 ;; Author: Will Mengarini <seldon@eskimo.com>
6 ;; Created: Mo 02 Mar 98 6 ;; Created: Mo 02 Mar 98
7 ;; Version: 0.51, We 13 May 98 7 ;; Version: 0.51, We 13 May 98
8 ;; Keywords: convenience, vi, repeat 8 ;; Keywords: convenience, vi, repeat
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details. 20 ;; GNU General Public License for more details.
21 21
22 ;; You should have received a copy of the GNU General Public License 22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the 23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02111-1307, USA. 25 ;; Boston, MA 02110-1301, USA.
26 26
27 ;;; Commentary: 27 ;;; Commentary:
28 28
29 ;; Sometimes the fastest way to get something done is just to lean on a key; 29 ;; Sometimes the fastest way to get something done is just to lean on a key;
30 ;; moving forward through a series of words by leaning on M-f is an example. 30 ;; moving forward through a series of words by leaning on M-f is an example.
282 (vectorp indirect)) 282 (vectorp indirect))
283 ;; Bind real-last-command so that executing the macro 283 ;; Bind real-last-command so that executing the macro
284 ;; does not alter it. 284 ;; does not alter it.
285 (let ((real-last-command real-last-command)) 285 (let ((real-last-command real-last-command))
286 (execute-kbd-macro real-last-command)) 286 (execute-kbd-macro real-last-command))
287 (call-interactively real-last-command))))) 287 (run-hooks 'pre-command-hook)
288 (call-interactively real-last-command)
289 (run-hooks 'post-command-hook)))))
288 (when repeat-repeat-char 290 (when repeat-repeat-char
289 ;; A simple recursion here gets into trouble with max-lisp-eval-depth 291 ;; A simple recursion here gets into trouble with max-lisp-eval-depth
290 ;; on long sequences of repetitions of a command like `forward-word' 292 ;; on long sequences of repetitions of a command like `forward-word'
291 ;; (only 32 repetitions are possible given the default value of 200 for 293 ;; (only 32 repetitions are possible given the default value of 200 for
292 ;; max-lisp-eval-depth), but if I now locally disable the repeat char I 294 ;; max-lisp-eval-depth), but if I now locally disable the repeat char I
342 344
343 ;;;;; ************************* EMACS CONTROL ************************* ;;;;; 345 ;;;;; ************************* EMACS CONTROL ************************* ;;;;;
344 346
345 (provide 'repeat) 347 (provide 'repeat)
346 348
349 ;;; arch-tag: cd569600-a1ad-4fa7-9062-bb91dfeaf1db
347 ;;; repeat.el ends here 350 ;;; repeat.el ends here