comparison lisp/progmodes/c-mode.el @ 10870:b869871813cc

(c-mode, c-fill-paragraph): Remove ^ from paragraph-start & paragraph-separate.
author Boris Goldowsky <boris@gnu.org>
date Wed, 01 Mar 1995 15:47:38 +0000
parents d08b63758c1a
children 7e797580a46d
comparison
equal deleted inserted replaced
10869:b8e678e5c4de 10870:b869871813cc
218 (setq major-mode 'c-mode) 218 (setq major-mode 'c-mode)
219 (setq mode-name "C") 219 (setq mode-name "C")
220 (setq local-abbrev-table c-mode-abbrev-table) 220 (setq local-abbrev-table c-mode-abbrev-table)
221 (set-syntax-table c-mode-syntax-table) 221 (set-syntax-table c-mode-syntax-table)
222 (make-local-variable 'paragraph-start) 222 (make-local-variable 'paragraph-start)
223 (setq paragraph-start (concat "^$\\|" page-delimiter)) 223 (setq paragraph-start (concat "$\\|" page-delimiter))
224 (make-local-variable 'paragraph-separate) 224 (make-local-variable 'paragraph-separate)
225 (setq paragraph-separate paragraph-start) 225 (setq paragraph-separate paragraph-start)
226 (make-local-variable 'paragraph-ignore-fill-prefix) 226 (make-local-variable 'paragraph-ignore-fill-prefix)
227 (setq paragraph-ignore-fill-prefix t) 227 (setq paragraph-ignore-fill-prefix t)
228 (make-local-variable 'fill-paragraph-function) 228 (make-local-variable 'fill-paragraph-function)
306 (paragraph-start 306 (paragraph-start
307 ;; Lines containing just a comment start or just an end 307 ;; Lines containing just a comment start or just an end
308 ;; should not be filled into paragraphs they are next to. 308 ;; should not be filled into paragraphs they are next to.
309 (concat 309 (concat
310 paragraph-start 310 paragraph-start
311 "\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[ \t/*]*$")) 311 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
312 (paragraph-separate 312 (paragraph-separate
313 (concat 313 (concat
314 paragraph-separate 314 paragraph-separate
315 "\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[ \t/*]*$"))) 315 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")))
316 (save-excursion 316 (save-excursion
317 (beginning-of-line) 317 (beginning-of-line)
318 ;; Move up to first line of this comment. 318 ;; Move up to first line of this comment.
319 (while (and (not (bobp)) (looking-at "[ \t]*//")) 319 (while (and (not (bobp)) (looking-at "[ \t]*//"))
320 (forward-line -1)) 320 (forward-line -1))
417 (paragraph-start 417 (paragraph-start
418 ;; Lines containing just a comment start or just an end 418 ;; Lines containing just a comment start or just an end
419 ;; should not be filled into paragraphs they are next to. 419 ;; should not be filled into paragraphs they are next to.
420 (concat 420 (concat
421 paragraph-start 421 paragraph-start
422 "\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[ \t/*]*$")) 422 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
423 (paragraph-separate 423 (paragraph-separate
424 (concat 424 (concat
425 paragraph-separate 425 paragraph-separate
426 "\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[ \t/*]*$")) 426 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
427 (chars-to-delete 0)) 427 (chars-to-delete 0))
428 (save-restriction 428 (save-restriction
429 ;; Don't fill the comment together with the code following it. 429 ;; Don't fill the comment together with the code following it.
430 ;; So temporarily exclude everything before the comment start, 430 ;; So temporarily exclude everything before the comment start,
431 ;; and everything after the line where the comment ends. 431 ;; and everything after the line where the comment ends.