aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-24 03:47:07 +0000
committerRichard M. Stallman1994-09-24 03:47:07 +0000
commit7169beb1473e47b1e434901b0983091c8e43a4fe (patch)
tree54d6bb0f141a9e63d1c55e6cf6d59ac5ecfe643e /src
parent8cef1f785360141dbf660e9c8be9d5c1bb36d802 (diff)
downloademacs-7169beb1473e47b1e434901b0983091c8e43a4fe.tar.gz
emacs-7169beb1473e47b1e434901b0983091c8e43a4fe.zip
(Fexpand_abbrev): Instead of Fcapitalize_region,
just upcase the first initial.
Diffstat (limited to 'src')
-rw-r--r--src/abbrev.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/abbrev.c b/src/abbrev.c
index 8338a0da558..148f8172297 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -24,6 +24,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24#include "commands.h" 24#include "commands.h"
25#include "buffer.h" 25#include "buffer.h"
26#include "window.h" 26#include "window.h"
27#include "syntax.h"
27 28
28/* An abbrev table is an obarray. 29/* An abbrev table is an obarray.
29 Each defined abbrev is represented by a symbol in that obarray 30 Each defined abbrev is represented by a symbol in that obarray
@@ -318,16 +319,15 @@ Returns t if expansion took place.")
318 else if (uccount) 319 else if (uccount)
319 { 320 {
320 /* Abbrev included some caps. Cap first initial of expansion */ 321 /* Abbrev included some caps. Cap first initial of expansion */
321 int old_zv = ZV; 322 int pos = wordstart;
322 int old_pt = point;
323 323
324 /* Don't let Fcapitalize_word operate on text after point. */ 324 /* Find the initial. */
325 ZV = point; 325 while (pos < point
326 SET_PT (wordstart); 326 && SYNTAX (*BUF_CHAR_ADDRESS (current_buffer, pos)) != Sword)
327 Fcapitalize_word (make_number (1)); 327 pos++;
328 328
329 SET_PT (old_pt); 329 /* Change just that. */
330 ZV = old_zv; 330 Fupcase_initials_region (make_number (pos), make_number (pos + 1));
331 } 331 }
332 332
333 hook = XSYMBOL (sym)->function; 333 hook = XSYMBOL (sym)->function;