;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile
(let ((load-path
(if (and (boundp 'byte-compile-dest-file)
(run-hooks 'c-initialization-hook)
;; Fix obsolete variables.
(if (boundp 'c-comment-continuation-stars)
- (setq c-block-comment-prefix c-comment-continuation-stars))
+ (setq c-block-comment-prefix
+ (symbol-value 'c-comment-continuation-stars)))
(add-hook 'change-major-mode-hook 'c-leave-cc-mode-mode)
(setq c-initialization-ok t))
;; Will try initialization hooks again if they failed.
'c-indent-new-comment-line
c-mode-base-map global-map)
(substitute-key-definition 'indent-for-tab-command
- 'c-indent-command
+ ;; XXX Is this the right thing to do
+ ;; here?
+ 'c-indent-line-or-region
c-mode-base-map global-map)
(when (fboundp 'comment-indent-new-line)
;; indent-new-comment-line has changed name to
(c-set-style c-file-style))
(and c-file-offsets
- (mapcar
+ (mapc
(lambda (langentry)
(let ((langelem (car langentry))
(offset (cdr langentry)))
(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands"
(cons "AWK" (c-lang-const c-mode-menu awk)))
+;; (require 'cc-awk) brings these in.
+(defvar awk-mode-syntax-table)
+(declare-function c-awk-unstick-NL-prop "cc-awk" ())
+
(defun awk-mode ()
"Major mode for editing AWK code.
To submit a problem report, enter `\\[c-submit-bug-report]' from an
adaptive-fill-mode
adaptive-fill-regexp)
nil)))
- (mapcar (lambda (var) (unless (boundp var)
- (setq vars (delq var vars))))
- '(signal-error-on-buffer-boundary
- filladapt-mode
- defun-prompt-regexp
- font-lock-mode
- font-lock-maximum-decoration
- parse-sexp-lookup-properties
- lookup-syntax-properties))
+ (mapc (lambda (var) (unless (boundp var)
+ (setq vars (delq var vars))))
+ '(signal-error-on-buffer-boundary
+ filladapt-mode
+ defun-prompt-regexp
+ font-lock-mode
+ font-lock-maximum-decoration
+ parse-sexp-lookup-properties
+ lookup-syntax-properties))
vars)
(lambda ()
(run-hooks 'c-prepare-bug-report-hooks)
\f
(cc-provide 'cc-mode)
-;;; arch-tag: 7825e5c4-fd09-439f-a04d-4c13208ba3d7
+;; arch-tag: 7825e5c4-fd09-439f-a04d-4c13208ba3d7
;;; cc-mode.el ends here