shin@sgtp.apple.juice (Shinichirou Sugou) (07/13/89)
Dear sirs: Now, c-mode can distinguish scope resolution operator (::) from label (:). I hope that someone make it handle c++ comment format (//). ------------begenning---------------------------- *** c-mode.el Thu Jul 13 18:07:24 1989 --- c-mode.el.org Thu Jul 13 18:02:02 1989 *************** *** 312,318 **** (and (looking-at "[A-Za-z]") (save-excursion (forward-sexp 1) ! (looking-at ":[^:]")))) (setq indent (max 1 (+ indent c-label-offset)))) ((and (looking-at "else\\b") (not (looking-at "else\\s_"))) --- 312,318 ---- (and (looking-at "[A-Za-z]") (save-excursion (forward-sexp 1) ! (looking-at ":")))) (setq indent (max 1 (+ indent c-label-offset)))) ((and (looking-at "else\\b") (not (looking-at "else\\s_"))) *************** *** 429,435 **** (forward-char 1) (let ((colon-line-end 0)) (while (progn (skip-chars-forward " \t\n") ! (looking-at "#\\|/\\*\\|case[ \t\n].*:[^:]\\|[a-zA-Z0-9_$]*:[^:]")) ;; Skip over comments and labels following openbrace. (cond ((= (following-char) ?\#) (forward-line 1)) --- 429,435 ---- (forward-char 1) (let ((colon-line-end 0)) (while (progn (skip-chars-forward " \t\n") ! (looking-at "#\\|/\\*\\|case[ \t\n].*:\\|[a-zA-Z0-9_$]*:")) ;; Skip over comments and labels following openbrace. (cond ((= (following-char) ?\#) (forward-line 1)) *************** *** 640,646 **** (and (looking-at "[A-Za-z]") (save-excursion (forward-sexp 1) ! (looking-at ":[^:]")))) (setq this-indent (max 1 (+ this-indent c-label-offset)))) (if (= (following-char) ?}) (setq this-indent (- this-indent c-indent-level))) --- 640,646 ---- (and (looking-at "[A-Za-z]") (save-excursion (forward-sexp 1) ! (looking-at ":")))) (setq this-indent (max 1 (+ this-indent c-label-offset)))) (if (= (following-char) ?}) (setq this-indent (- this-indent c-indent-level))) -------------------------end--------------------------------- CAUTION: Reply-command supplied by your mail system may NOT generate my address correctly. Please use the following address instead. shin%sgtp.apple.juice%lkbreth.foretune.junet@uunet.uu.net --- Shinichirou Sugou shin%sgtp.apple.juice%lkbreth.foretune.junet@uunet.uu.net