comparison lisp/prim/syntax.el @ 159:3bb7ccffb0c0 r20-3b6

Import from CVS: tag r20-3b6
author cvs
date Mon, 13 Aug 2007 09:41:43 +0200
parents 131b0175ea99
children 28f395d8dc7a
comparison
equal deleted inserted replaced
158:558dfa75ffb3 159:3bb7ccffb0c0
390 (defun symbol-near-point () 390 (defun symbol-near-point ()
391 "Return the first textual item to the nearest point." 391 "Return the first textual item to the nearest point."
392 (interactive) 392 (interactive)
393 ;alg stolen from etag.el 393 ;alg stolen from etag.el
394 (save-excursion 394 (save-excursion
395 (if (not (memq (char-syntax (preceding-char)) '(?w ?_))) 395 (if (not (memq (char-syntax (char-before)) '(?w ?_)))
396 (while (not (looking-at "\\sw\\|\\s_\\|\\'")) 396 (while (not (looking-at "\\sw\\|\\s_\\|\\'"))
397 (forward-char 1))) 397 (forward-char 1)))
398 (while (looking-at "\\sw\\|\\s_") 398 (while (looking-at "\\sw\\|\\s_")
399 (forward-char 1)) 399 (forward-char 1))
400 (if (re-search-backward "\\sw\\|\\s_" nil t) 400 (if (re-search-backward "\\sw\\|\\s_" nil t)