Docstring and formatting fixes

This commit is contained in:
Steve Purcell
2017-07-15 12:38:36 +12:00
parent b80cae8988
commit 0c649daca5

View File

@@ -1,4 +1,3 @@
;;; config-general-mode.el --- Config::General config file mode ;;; config-general-mode.el --- Config::General config file mode
;; Copyright (C) 2016-2017, T.v.Dein <tlinden@cpan.org> ;; Copyright (C) 2016-2017, T.v.Dein <tlinden@cpan.org>
@@ -124,7 +123,7 @@
("on" . "off") ("on" . "off")
("yes" . "no") ("yes" . "no")
("enable" . "disable")) ("enable" . "disable"))
"Values which can be toggled with <C-c C-t>. Only pairs are supported." "Values which can be toggled with \\[config-general-toggle-flag]. Only pairs are supported."
:group 'config-general :group 'config-general
:type 'list) :type 'list)
@@ -208,9 +207,9 @@ character."
(defun config-general-do-electric-return () (defun config-general-do-electric-return ()
"Electric return, follows file link or add newline below. "Electric return, follows file link or add newline below.
If (point) is on an include filename, call If (point) is on an include filename, call `find-file-at-point'
`find-file-at-point' with it, otherwise add a new line below, with it, otherwise add a new line below, indent it and
indent it and move (point) there." move (point) there."
(interactive) (interactive)
(if (eq config-general-electric-return t) (if (eq config-general-electric-return t)
(if (eq (get-text-property (point) 'face) 'config-general-file-face) (if (eq (get-text-property (point) 'face) 'config-general-file-face)
@@ -563,50 +562,21 @@ It is based on `conf-mode' with the following features:
- automatic indenting - automatic indenting
- jump to include file with `<ret>' - jump to include file with `<ret>'
To use, save config-general-mode.el to a directory in your
load-path.
Add something like this to your config:
(require 'config-general-mode)
(add-to-list 'auto-mode-alist '(\"\\.conf$\" . config-general-mode))
or load it manually, when needed:
M-x config-general-mode
You can also enable it with a buffer-local variable by adding
this as the first line of a config file:
# -*-config-general-*-
Usage Usage
Edit your config file as usual. Use `<tab>' for completion of Edit your config file as usual. Use `<tab>' for completion of
values and variables. Use `C-c C-t' to toggle flags (like true values and variables. Use \\[config-general-toggle-flag] to
to false). Use `C-c C-=' on a region to automatically align on toggle flags (like true to false). Use
the `=` character. Use `C-c C-/' to breakup a region with long \\[config-general-align-vars] on a region to automatically align
lines into shorter ones using backslash notation. Use on the `=` character. Use \\[sh-backslash-region] to break up a
`<C-return>' to visit an included file or (when not on a link) region with long lines into shorter ones using backslash
insert a new line below the current one, indent and move point notation. Use \\[config-general-do-electric-return] to visit an
there. Use `<C-k>' to delete lines, including continuation lines included file or (when not on a link) insert a new line below the
or whole blocks. Use `C-c C-j' to jump to a block current one, indent and move point there. Use
definition (same as using `imenu' with the mouse). \\[config-general-kill-line-or-block-or-continuation] to delete
lines, including continuation lines or whole blocks. Use
Customize \\[imenu] to jump to a block definition (same as using `imenu'
with the mouse).
You can customize the mode with:
M-x customize-group RET config-general-mode RET
You can also use hooks to config-general mode as a way to modify
or enhance its behavior. The following hooks are available:
config-general-mode-hook
For example:
(add-hook 'config-general-mode-hook 'electric-indent-mode)
\\{config-general-mode-map}" \\{config-general-mode-map}"