diff options
| author | Stefan Monnier | 2003-07-08 21:25:35 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-07-08 21:25:35 +0000 |
| commit | 53abaf54171e06ccd9afae37a6ad9d4dca4bfcea (patch) | |
| tree | 59117d6e3f9288cb3db3fc3b0fa37f2a38696b3c /src/cmds.c | |
| parent | d775d486e940230aaed8c313a2a16c205b6ac54c (diff) | |
| download | emacs-53abaf54171e06ccd9afae37a6ad9d4dca4bfcea.tar.gz emacs-53abaf54171e06ccd9afae37a6ad9d4dca4bfcea.zip | |
(Qexpand_abbrev): New sym.
(syms_of_cmds): Initialize it.
(internal_self_insert): Use it to call expand-abbrev.
Diffstat (limited to 'src/cmds.c')
| -rw-r--r-- | src/cmds.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cmds.c b/src/cmds.c index 61458691174..4d7228e88ad 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Simple built-in editing commands. | 1 | /* Simple built-in editing commands. |
| 2 | Copyright (C) 1985, 93, 94, 95, 96, 97, 1998, 2001, 02 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 93, 94, 95, 96, 97, 1998, 2001, 02, 03 |
| 3 | Free Software Foundation, Inc. | ||
| 3 | 4 | ||
| 4 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 5 | 6 | ||
| @@ -368,12 +369,13 @@ Whichever character you type to run this command is inserted. */) | |||
| 368 | return 0. A value of 1 indicates this *might* not have been simple. | 369 | return 0. A value of 1 indicates this *might* not have been simple. |
| 369 | A value of 2 means this did things that call for an undo boundary. */ | 370 | A value of 2 means this did things that call for an undo boundary. */ |
| 370 | 371 | ||
| 372 | static Lisp_Object Qexpand_abbrev; | ||
| 373 | |||
| 371 | int | 374 | int |
| 372 | internal_self_insert (c, noautofill) | 375 | internal_self_insert (c, noautofill) |
| 373 | int c; | 376 | int c; |
| 374 | int noautofill; | 377 | int noautofill; |
| 375 | { | 378 | { |
| 376 | extern Lisp_Object Fexpand_abbrev (); | ||
| 377 | int hairy = 0; | 379 | int hairy = 0; |
| 378 | Lisp_Object tem; | 380 | Lisp_Object tem; |
| 379 | register enum syntaxcode synt; | 381 | register enum syntaxcode synt; |
| @@ -477,7 +479,7 @@ internal_self_insert (c, noautofill) | |||
| 477 | int modiff = MODIFF; | 479 | int modiff = MODIFF; |
| 478 | Lisp_Object sym; | 480 | Lisp_Object sym; |
| 479 | 481 | ||
| 480 | sym = Fexpand_abbrev (); | 482 | sym = call0 (Qexpand_abbrev); |
| 481 | 483 | ||
| 482 | /* If we expanded an abbrev which has a hook, | 484 | /* If we expanded an abbrev which has a hook, |
| 483 | and the hook has a non-nil `no-self-insert' property, | 485 | and the hook has a non-nil `no-self-insert' property, |
| @@ -565,6 +567,9 @@ syms_of_cmds () | |||
| 565 | Qoverwrite_mode_binary = intern ("overwrite-mode-binary"); | 567 | Qoverwrite_mode_binary = intern ("overwrite-mode-binary"); |
| 566 | staticpro (&Qoverwrite_mode_binary); | 568 | staticpro (&Qoverwrite_mode_binary); |
| 567 | 569 | ||
| 570 | Qexpand_abbrev = intern ("expand-abbrev"); | ||
| 571 | staticpro (&Qexpand_abbrev); | ||
| 572 | |||
| 568 | DEFVAR_LISP ("self-insert-face", &Vself_insert_face, | 573 | DEFVAR_LISP ("self-insert-face", &Vself_insert_face, |
| 569 | doc: /* If non-nil, set the face of the next self-inserting character to this. | 574 | doc: /* If non-nil, set the face of the next self-inserting character to this. |
| 570 | See also `self-insert-face-command'. */); | 575 | See also `self-insert-face-command'. */); |