branch: externals/tex-parens
commit 73b7fc98ad5a402f5320de3af086e204cb753eb0
Author: Paul Nelson <[email protected]>
Commit: Paul Nelson <[email protected]>

    update readme to indicate how to remap keys
---
 README.org | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 911f64468d..b6a741766c 100644
--- a/README.org
+++ b/README.org
@@ -32,6 +32,28 @@ There is some support in this direction in the built-in 
[[https://www.gnu.org/so
 
 * Configuration
 Download this repository, install using =M-x package-install-file= (or 
package-vc-install, straight, elpaca, ...), and add something like the 
following to your [[https://www.emacswiki.org/emacs/InitFile][init file]], 
adjusting the binds according to preference (and replacing =LaTeX-mode= with 
=latex-mode= or =tex-mode= or =plain-tex-mode=, whichever is appropriate, if 
you don't use AUCTeX):
+#+begin_src elisp
+(use-package tex-parens
+  :bind
+  (:map LaTeX-mode-map
+        ([remap forward-sexp] . tex-parens-forward-sexp)
+        ([remap backward-sexp] . tex-parens-backward-sexp)
+        ([remap forward-list] . tex-parens-forward-list)
+        ([remap backward-list] . tex-parens-backward-list)
+        ([remap backward-up-list] . tex-parens-backward-up-list)
+        ([remap up-list] . tex-parens-up-list)
+        ([remap down-list] . tex-parens-down-list)
+        ([remap delete-pair] . tex-parens-delete-pair)
+        ([remap mark-sexp] . tex-parens-mark-sexp)
+        ([remap kill-sexp] . tex-parens-kill-sexp)
+        ([remap transpose-sexps] . transpose-sexps)
+        ([remap backward-kill-sexp] . tex-parens-backward-kill-sexp)
+        ([remap raise-sexp] . tex-parens-raise-sexp))
+  :hook
+  (LaTeX-mode . tex-parens-setup))
+#+end_src
+With this setup, whatever binds you generally use for the indicated list 
commands will be forwarded to =tex-parens= in =LaTeX-mode=.  If you want to 
specify the keys more directly, use instead something like the following:
+
 #+begin_src elisp
 (use-package tex-parens
   :bind
@@ -53,7 +75,7 @@ Download this repository, install using =M-x 
package-install-file= (or package-v
   (LaTeX-mode . tex-parens-setup))
 #+end_src
 
-The precise use-package declaration that I use (with elpaca) may be found in 
[[https://github.com/ultronozm/emacsd/blob/main/init-latex.el][the LaTeX part 
of my config]].
+The precise use-package declaration that I use may be found in 
[[https://github.com/ultronozm/emacsd/blob/main/init-latex.el][the LaTeX part 
of my config]] (elpaca branch).
 
 Use =M-x customize-group tex-parens= to configure further.  If you tweak the 
customization variables concerning delimiters and modifiers, then you'll need 
to reload your tex file or =M-: (tex-parens-setup)= for the changes to take 
effect.
 

Reply via email to