1 ;;; gnome-c-style.el --- minor mode for editing GNOME-style C source code -*- lexical-binding: t; -*-
2 ;; Copyright (C) 2016 Daiki Ueno <ueno@gnu.org>
4 ;; Author: Daiki Ueno <ueno@gnu.org>
5 ;; Keywords: GNOME, C, coding style
7 ;; Maintainer: Daiki Ueno <ueno@gnu.org>
9 ;; This file is not part of GNU Emacs.
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.
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.
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/>.
27 (require 'gnome-c-align)
28 (require 'gnome-c-snippet)
30 (defgroup gnome-c-style nil
31 "GNOME-style C source code editing"
35 (defvar gnome-c-style-mode-map
36 (let ((keymap (make-sparse-keymap)))
37 (define-key keymap "\C-c\C-ga" 'gnome-c-align-at-point)
38 (define-key keymap "\C-c\C-gr" 'gnome-c-align-region)
39 (define-key keymap "\C-c\C-gf" 'gnome-c-align-set-column)
40 (define-key keymap "\C-c\C-gg" 'gnome-c-align-guess-columns)
41 (define-key keymap "\C-c\C-g\C-g" 'gnome-c-align-compute-optimal-columns)
42 (define-key keymap "\C-c\C-gc" 'gnome-c-snippet-insert-package_class)
43 (define-key keymap "\C-c\C-gC" 'gnome-c-snippet-insert-PACKAGE_CLASS)
44 (define-key keymap "\C-c\C-g\C-c" 'gnome-c-snippet-insert-PackageClass)
45 (define-key keymap "\C-c\C-gs" 'gnome-c-snippet-insert)
49 (define-minor-mode gnome-c-style-mode
50 "A minor-mode for editing GNOME-style C source code."
51 nil " GNOME" gnome-c-style-map)
53 (provide 'gnome-c-style)
55 ;;; gnome-c-style.el ends here