]> code.delx.au - gnu-emacs-elpa/blob - gnome-minor-mode.el
align: Add option to control max columns
[gnu-emacs-elpa] / gnome-minor-mode.el
1 ;;; gnome-minor-mode.el --- minor mode for editing GNOME-style C source code -*- lexical-binding: t; -*-
2 ;; Copyright (C) 2016 Daiki Ueno <ueno@gnu.org>
3
4 ;; Author: Daiki Ueno <ueno@gnu.org>
5 ;; Keywords: GNOME, C, coding style
6 ;; Version: 0.1
7 ;; Maintainer: Daiki Ueno <ueno@gnu.org>
8
9 ;; This file is not part of GNU Emacs.
10
11 ;; This program is free software: you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation, either version 3 of the
14 ;; License, or (at your option) any later version.
15
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program. If not, see
23 ;; <http://www.gnu.org/licenses/>.
24
25 ;;; Code:
26
27 (autoload 'gnome-align-at-point "gnome-align")
28 (autoload 'gnome-align-region "gnome-align")
29 (autoload 'gnome-align-set-column "gnome-align")
30 (autoload 'gnome-align-guess-columns "gnome-align")
31 (autoload 'gnome-align-compute-optimal-columns "gnome-align")
32 (autoload 'gnome-snippet-insert-package_class "gnome-snippet")
33 (autoload 'gnome-snippet-insert-PACKAGE_CLASS "gnome-snippet")
34 (autoload 'gnome-snippet-insert-PackageClass "gnome-snippet")
35 (autoload 'gnome-snippet-insert-interface-declation "gnome-snippet")
36 (autoload 'gnome-snippet-insert-class-declation "gnome-snippet")
37 (autoload 'gnome-snippet-insert-set_property "gnome-snippet")
38 (autoload 'gnome-snippet-insert-get_property "gnome-snippet")
39 (autoload 'gnome-snippet-insert-dispose "gnome-snippet")
40 (autoload 'gnome-snippet-insert-finalize "gnome-snippet")
41 (autoload 'gnome-snippet-insert-notify "gnome-snippet")
42 (autoload 'gnome-snippet-insert-constructed "gnome-snippet")
43 (autoload 'gnome-snippet-insert "gnome-snippet")
44
45 (defvar gnome-minor-mode-map
46 (let ((keymap (make-sparse-keymap)))
47 (define-key keymap "\C-c\C-ga" 'gnome-align-at-point)
48 (define-key keymap "\C-c\C-gr" 'gnome-align-region)
49 (define-key keymap "\C-c\C-gf" 'gnome-align-set-column)
50 (define-key keymap "\C-c\C-gg" 'gnome-align-guess-columns)
51 (define-key keymap "\C-c\C-g\C-g" 'gnome-align-compute-optimal-columns)
52 (define-key keymap "\C-c\C-gc" 'gnome-snippet-insert-package_class)
53 (define-key keymap "\C-c\C-gC" 'gnome-snippet-insert-PACKAGE_CLASS)
54 (define-key keymap "\C-c\C-g\C-c" 'gnome-snippet-insert-PackageClass)
55 (define-key keymap "\C-c\C-gs" 'gnome-snippet-insert)
56 keymap))
57
58 ;;;###autoload
59 (define-minor-mode gnome-minor-mode
60 "A minor-mode for editing GNOME-style C source code."
61 nil " GNOME" gnome-minor-mode-map)
62
63 (provide 'gnome-c-mode)
64
65 ;;; gnome-c-mode.el ends here