comparison lisp/progmodes/icon.el @ 30947:3e2633195694

(icon-indent-line) (icon-is-continuation-line): Handle comments specially.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 18 Aug 2000 06:29:14 +0000
parents f3f9df46d008
children d218ef159e45
comparison
equal deleted inserted replaced
30946:0cc084d7b4a7 30947:3e2633195694
293 (pos (- (point-max) (point)))) 293 (pos (- (point-max) (point))))
294 (beginning-of-line) 294 (beginning-of-line)
295 (setq beg (point)) 295 (setq beg (point))
296 (cond ((eq indent nil) 296 (cond ((eq indent nil)
297 (setq indent (current-indentation))) 297 (setq indent (current-indentation)))
298 ((looking-at "[ \t]*#") 298 ((looking-at "^#")
299 (setq indent 0)) 299 (setq indent 0))
300 (t 300 (t
301 (skip-chars-forward " \t") 301 (skip-chars-forward " \t")
302 (if (listp indent) (setq indent (car indent))) 302 (if (listp indent) (setq indent (car indent)))
303 (cond ((and (looking-at "else\\b") 303 (cond ((and (looking-at "else\\b")
430 (if (eq ch-syntax ?w) 430 (if (eq ch-syntax ?w)
431 (assoc (buffer-substring 431 (assoc (buffer-substring
432 (progn (forward-word -1) (point)) 432 (progn (forward-word -1) (point))
433 (progn (forward-word 1) (point))) 433 (progn (forward-word 1) (point)))
434 icon-resword-alist) 434 icon-resword-alist)
435 (not (memq ch '(0 ?\; ?\} ?\{ ?\) ?\] ?\" ?\' ?\n)))))) 435 (not (memq ch '(0 ?\; ?\} ?\{ ?\) ?\] ?\" ?\' ?\# ?\, ?\. ?\n))))))
436 436
437 (defun icon-backward-to-noncomment (lim) 437 (defun icon-backward-to-noncomment (lim)
438 (let (opoint stop) 438 (let (opoint stop)
439 (while (not stop) 439 (while (not stop)
440 (skip-chars-backward " \t\n\f" lim) 440 (skip-chars-backward " \t\n\f" lim)