emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/antlr-mode.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/antlr-mode.el
Date: Fri, 31 Dec 2004 10:02:16 -0500

Index: emacs/lisp/progmodes/antlr-mode.el
diff -c emacs/lisp/progmodes/antlr-mode.el:1.18 
emacs/lisp/progmodes/antlr-mode.el:1.19
*** emacs/lisp/progmodes/antlr-mode.el:1.18     Mon Dec 29 20:03:05 2003
--- emacs/lisp/progmodes/antlr-mode.el  Fri Dec 31 14:50:27 2004
***************
*** 2529,2581 ****
          (set (car settings) (eval (cadr settings)))))
        (setq settings (cddr settings)))))
  
- (defun antlr-c-common-init ()
-   "Like `c-basic-common-init' when using cc-mode before v5.30."
-   ;; X/Emacs 20 only
-   (make-local-variable 'paragraph-start)
-   (make-local-variable 'paragraph-separate)
-   (make-local-variable 'paragraph-ignore-fill-prefix)
-   (make-local-variable 'require-final-newline)
-   (make-local-variable 'parse-sexp-ignore-comments)
-   (make-local-variable 'comment-start)
-   (make-local-variable 'comment-multi-line)
-   (make-local-variable 'outline-regexp)
-   (make-local-variable 'outline-level)
-   (make-local-variable 'adaptive-fill-regexp)
-   (make-local-variable 'adaptive-fill-mode)
-   (make-local-variable 'imenu-generic-expression) ;set in the mode functions
-   (and (boundp 'comment-line-break-function)
-        (make-local-variable 'comment-line-break-function))
-   ;; Emacs 19.30 and beyond only, AFAIK
-   (if (boundp 'fill-paragraph-function)
-       (progn
-       (make-local-variable 'fill-paragraph-function)
-       (setq fill-paragraph-function 'c-fill-paragraph)))
-   ;; now set their values
-   (setq paragraph-start (concat page-delimiter "\\|$")
-       paragraph-separate paragraph-start
-       paragraph-ignore-fill-prefix t
-       parse-sexp-ignore-comments t
-       comment-column 32
-       comment-multi-line nil
-       comment-line-break-function 'c-comment-line-break-function
-       adaptive-fill-regexp nil
-       adaptive-fill-mode nil)
-   (c-set-style (or antlr-indent-style "gnu"))
-   (and (boundp 'c-current-comment-prefix) (boundp 'c-comment-prefix-regexp)
-        (setq c-current-comment-prefix
-            (if (listp c-comment-prefix-regexp)
-                (cdr-safe (or (assoc major-mode c-comment-prefix-regexp)
-                              (assoc 'other c-comment-prefix-regexp)))
-              c-comment-prefix-regexp)))
-   ;; we have to do something special for c-offsets-alist so that the
-   ;; buffer local value has its own alist structure.
-   (setq c-offsets-alist (copy-alist c-offsets-alist))
-   ;; setup the comment indent variable in a Emacs version portable way
-   ;; ignore any byte compiler warnings you might get here
-   (make-local-variable 'comment-indent-function)
-   (setq comment-indent-function 'c-comment-indent))
- 
  (defun antlr-language-option (search)
    "Find language in `antlr-language-alist' for language option.
  If SEARCH is non-nil, find element for language option.  Otherwise, find
--- 2529,2534 ----
***************
*** 2643,2652 ****
           (funcall init-fn)))          ; is a function in v5.29
        (t                              ; cc-mode upto 5.28
         (antlr-c-init-language-vars))) ; do it myself
!   (cond ((fboundp 'c-basic-common-init)       ; cc-mode 5.30+
!        (c-basic-common-init antlr-language (or antlr-indent-style "gnu")))
!       (t
!        (antlr-c-common-init)))
    (make-local-variable 'outline-regexp)
    (make-local-variable 'outline-level)
    (make-local-variable 'require-final-newline)
--- 2596,2602 ----
           (funcall init-fn)))          ; is a function in v5.29
        (t                              ; cc-mode upto 5.28
         (antlr-c-init-language-vars))) ; do it myself
!   (c-basic-common-init antlr-language (or antlr-indent-style "gnu"))
    (make-local-variable 'outline-regexp)
    (make-local-variable 'outline-level)
    (make-local-variable 'require-final-newline)
***************
*** 2654,2660 ****
    (make-local-variable 'indent-region-function)
    (setq outline-regexp "[^#\n\^M]"
        outline-level 'c-outline-level) ; TODO: define own
!   (setq require-final-newline t)
    (setq indent-line-function 'antlr-indent-line
        indent-region-function nil)     ; too lazy
    (setq comment-start "// "
--- 2604,2610 ----
    (make-local-variable 'indent-region-function)
    (setq outline-regexp "[^#\n\^M]"
        outline-level 'c-outline-level) ; TODO: define own
!   (setq require-final-newline mode-require-final-newline)
    (setq indent-line-function 'antlr-indent-line
        indent-region-function nil)     ; too lazy
    (setq comment-start "// "




reply via email to

[Prev in Thread] Current Thread [Next in Thread]