comparison src/abbrev.c @ 280:7df0dd720c89 r21-0b38

Import from CVS: tag r21-0b38
author cvs
date Mon, 13 Aug 2007 10:32:22 +0200
parents c5d627a313b1
children 8e84bee8ddd0
comparison
equal deleted inserted replaced
279:c20b2fb5bb0a 280:7df0dd720c89
188 if (!NILP (Vabbrev_start_location)) 188 if (!NILP (Vabbrev_start_location))
189 { 189 {
190 wordstart = get_buffer_pos_char (buf, Vabbrev_start_location, 190 wordstart = get_buffer_pos_char (buf, Vabbrev_start_location,
191 GB_COERCE_RANGE); 191 GB_COERCE_RANGE);
192 Vabbrev_start_location = Qnil; 192 Vabbrev_start_location = Qnil;
193 #if 0
193 /* Previously, abbrev-prefix-mark crockishly inserted a dash to 194 /* Previously, abbrev-prefix-mark crockishly inserted a dash to
194 indicate the abbrev start point. It now uses an extent with 195 indicate the abbrev start point. It now uses an extent with
195 a begin glyph so there's no dash to remove. */ 196 a begin glyph so there's no dash to remove. */
196 #if 0
197 if (wordstart != BUF_ZV (buf) 197 if (wordstart != BUF_ZV (buf)
198 && BUF_FETCH_CHAR (buf, wordstart) == '-') 198 && BUF_FETCH_CHAR (buf, wordstart) == '-')
199 { 199 {
200 buffer_delete_range (buf, wordstart, wordstart + 1, 0); 200 buffer_delete_range (buf, wordstart, wordstart + 1, 0);
201 } 201 }
243 243
244 /* Return non-zero if OBARRAY contains an interned symbol ` '. */ 244 /* Return non-zero if OBARRAY contains an interned symbol ` '. */
245 static int 245 static int
246 obarray_has_blank_p (Lisp_Object obarray) 246 obarray_has_blank_p (Lisp_Object obarray)
247 { 247 {
248 Lisp_Object lookup; 248 return !ZEROP (oblookup (obarray, (Bufbyte *)" ", 1));
249
250 lookup = oblookup (obarray, (Bufbyte *)" ", 1);
251 return SYMBOLP (lookup);
252 } 249 }
253 250
254 /* Analyze case in the buffer substring, and report it. */ 251 /* Analyze case in the buffer substring, and report it. */
255 static void 252 static void
256 abbrev_count_case (struct buffer *buf, Bufpos pos, Charcount length, 253 abbrev_count_case (struct buffer *buf, Bufpos pos, Charcount length,
257 int *lccount, int *uccount) 254 int *lccount, int *uccount)
258 { 255 {
259 Emchar c;
260
261 *lccount = *uccount = 0; 256 *lccount = *uccount = 0;
262 while (length--) 257 while (length--)
263 { 258 {
264 c = BUF_FETCH_CHAR (buf, pos); 259 Emchar c = BUF_FETCH_CHAR (buf, pos);
265 if (UPPERCASEP (buf, c)) 260 if (UPPERCASEP (buf, c))
266 ++*uccount; 261 ++*uccount;
267 else if (LOWERCASEP (buf, c)) 262 else if (LOWERCASEP (buf, c))
268 ++*lccount; 263 ++*lccount;
269 ++pos; 264 ++pos;