Skip to content
Browse files

More tidying up in README.org

  • Loading branch information...
1 parent f080a57 commit edb5292d9a906f3cbb13884a840968de4b4fd548 @capitaomorte committed
Showing with 30 additions and 27 deletions.
  1. +30 −27 README.org
View
57 README.org
@@ -14,7 +14,7 @@ should work even with extensions that redefine such keys.
* Installation and basic use:
- To try it out, download the [[http://autopair.googlecode.com/git/autopair.el][latest version]] and add to your *.emacs*:
+ To try it out, download the [[http://autopair.googlecode.com/git/autopair.el][latest version]] and add to your =.emacs=:
#+BEGIN_EXAMPLE
(add-to-list 'load-path "/path/to/autopair") ;; comment if autopair.el is in standard load path
@@ -38,14 +38,14 @@ should work even with extensions that redefine such keys.
* Neat tricks
- - *=autopair-autowrap=* tells autopair to automatically wrap the
+ - =autopair-autowrap= tells autopair to automatically wrap the
selection region with the delimiters you're trying to insert.
- - *=autopair-blink=* makes the cursor quickly blink over matching
+ - =autopair-blink= makes the cursor quickly blink over matching
braces and quotes just inserted or skipped over. If you find this
behaviour annoying, set this to nil.
- - *=autopair-skip-whitespace=*, when set to non-nil, tells autopair to
+ - =autopair-skip-whitespace=, when set to non-nil, tells autopair to
skip over whitespace when attempting to skip over a closing
brace. If you set this to 'chomp, the whitespace is not only
jumped over but also deleted.
@@ -66,7 +66,7 @@ should work even with extensions that redefine such keys.
#'(lambda () (autopair-mode)))
#+END_EXAMPLE
- Alternatively, do use `autopair-global-mode` and create _exceptions_
+ Alternatively, do use =autopair-global-mode= and create _exceptions_
using the major mode hooks (watch out for the change in behaviour
emacs 24).
@@ -82,12 +82,12 @@ should work even with extensions that redefine such keys.
* More tricks
- *=autopair-dont-pair=* lets you define special cases of characters you
+ =autopair-dont-pair= lets you define special cases of characters you
don't want paired. Its default value skips pairing single-quote
characters when inside a comment literal, even if the language
syntax tables does pair these characters.
- As a further example, to also prevent the '{' (opening brace)
+ As a further example, to also prevent the ={= (opening brace)
character from being autopaired in C++ comments use this in your
.emacs.
@@ -99,7 +99,7 @@ should work even with extensions that redefine such keys.
#+END_EXAMPLE
- *=autopair-handle-action-fns=* lets you write some emacs-lisp that
+ =autopair-handle-action-fns= lets you write some emacs-lisp that
overrides/extends the actions taken by autopair after it decides
something must be paired, skipped or deleted. To work with triple
quoting in python mode, you can use this for example:
@@ -113,15 +113,16 @@ should work even with extensions that redefine such keys.
#+END_EXAMPLE
where =autopair-python-triple-quote-action= is an example of a
- user-written function (which is bundled in autopair.el).
+ user-written function (which is bundled in =autopair.el=).
- See [[http://code.google.com/p/autopair/issues/detail?id=13][this issue]] for an example of clever use of this variable (thanks [[http://code.google.com/u/alexduller/][alexduller]]).
+ See [[http://code.google.com/p/autopair/issues/detail?id=13][this issue]] for an example of clever use of this variable (thanks
+ [[http://code.google.com/u/alexduller/][alexduller]]).
- *=autopair-extra-pairs=* lets you define extra pairing and skipping
+ =autopair-extra-pairs= lets you define extra pairing and skipping
behaviour for pairs not programmed into the syntax table. Watch out,
this is work-in-progress, a little unstable and does not help
- balancing at all. To have =<= and =>= pair in c++-mode buffers, but
- only in code, use:
+ balancing at all. To have =<= and =>= pair in =c++-mode= buffers,
+ but only in code, use:
#+BEGIN_EXAMPLE
(add-hook 'c++-mode-hook
@@ -131,7 +132,7 @@ should work even with extensions that redefine such keys.
#+END_EXAMPLE
if you program in emacs-lisp you might also like the following to
- pair backtick (*`*) and quote (*'*).
+ pair backtick (=`=) and quote (='=).
#+BEGIN_EXAMPLE
(add-hook 'emacs-lisp-mode-hook
@@ -148,8 +149,8 @@ should work even with extensions that redefine such keys.
but a few extensions use tricks that interfere with autopair's own
tricks, disabling autopair or some of the extension's
functionality. Using the customization techniques described above,
- there are plenty of very good workarounds for `slime-mode`,
- `latex-mode`, `term-mode` and even `viper-mode'.
+ there are plenty of very good workarounds for =slime-mode=,
+ =latex-mode=, =term-mode= and even =viper-mode=.
See [[http://code.google.com/p/autopair/issues/detail?id=20&can=1&q=status:Workaround][the workaround list]].
@@ -168,17 +169,19 @@ should work even with extensions that redefine such keys.
=help-balance= (which, by the way, is the default), braces are not
autopaired/autoskipped in all situations; the decision to autopair
or autoskip a brace is taken according to the following table:
-
- +---------+------------+-----------+-------------------+
- | 1234567 | autopair? | autoskip? | notes |
- +---------+------------+-----------+-------------------+
- | (()) | yyyyyyy | ---yy-- | balanced |
- +---------+------------+-----------+-------------------+
- | (())) | ------y | ---yyy- | too many closings |
- +---------+------------+-----------+-------------------+
- | ((()) | yyyyyyy | ------- | too many openings |
- +---------+------------+-----------+-------------------+
-
+
+#+BEGIN_EXAMPLE
++---------+------------+-----------+-------------------+
+| 1234567 | autopair? | autoskip? | notes |
++---------+------------+-----------+-------------------+
+| (()) | yyyyyyy | ---yy-- | balanced |
++---------+------------+-----------+-------------------+
+| (())) | ------y | ---yyy- | too many closings |
++---------+------------+-----------+-------------------+
+| ((()) | yyyyyyy | ------- | too many openings |
++---------+------------+-----------+-------------------+
+#+END_EXAMPLE
+
The table is read like this: in a buffer with 7 characters laid out
like the first column, an "y" marks points where an opening brace is
autopaired and in which places would a closing brace be

0 comments on commit edb5292

Please sign in to comment.
Something went wrong with that request. Please try again.