88 |
(eval-when-compile |
(eval-when-compile |
89 |
(require 'cl) |
(require 'cl) |
90 |
(defmacro cond-emacs-xemacs (&rest args) |
(defmacro cond-emacs-xemacs (&rest args) |
91 |
(cond-emacs-xemacs-macfn |
(cond-emacs-xemacs-macfn |
92 |
args "`cond-emacs-xemacs' must return exactly one element")) |
args "`cond-emacs-xemacs' must return exactly one element")) |
93 |
(defun cond-emacs-xemacs-macfn (args &optional msg) |
(defun cond-emacs-xemacs-macfn (args &optional msg) |
94 |
(if (atom args) args |
(if (atom args) args |
1627 |
:active active)) |
:active active)) |
1628 |
(sort (mapcar 'car (elt antlr-options-alists (1- level))) |
(sort (mapcar 'car (elt antlr-options-alists (1- level))) |
1629 |
'string-lessp)))) |
'string-lessp)))) |
1630 |
|
|
1631 |
|
|
1632 |
;;;=========================================================================== |
;;;=========================================================================== |
1633 |
;;; Insert option: determine section-kind |
;;; Insert option: determine section-kind |
1904 |
;; stuff (no =, {, } or /) at point is not followed by ";" |
;; stuff (no =, {, } or /) at point is not followed by ";" |
1905 |
(insert ";") |
(insert ";") |
1906 |
(backward-char))) |
(backward-char))) |
1907 |
|
|
1908 |
(defun antlr-insert-option-space (area old) |
(defun antlr-insert-option-space (area old) |
1909 |
"Find appropriate place to insert option, insert newlines/spaces. |
"Find appropriate place to insert option, insert newlines/spaces. |
1910 |
For AREA and OLD, see `antlr-insert-option-do'." |
For AREA and OLD, see `antlr-insert-option-do'." |
1924 |
(setq orig (point)) |
(setq orig (point)) |
1925 |
(goto-char orig))) |
(goto-char orig))) |
1926 |
(skip-chars-forward " \t") |
(skip-chars-forward " \t") |
1927 |
|
|
1928 |
(if (looking-at "$\\|//") |
(if (looking-at "$\\|//") |
1929 |
;; just comment after point => skip (+ lines w/ same col comment) |
;; just comment after point => skip (+ lines w/ same col comment) |
1930 |
(let ((same (if (> (match-end 0) (match-beginning 0)) |
(let ((same (if (> (match-end 0) (match-beginning 0)) |