Edit the structural editing section
This commit is contained in:
parent
9236e96c9f
commit
88d5d2386c
@ -2000,7 +2000,7 @@ square brackets as well as single and double quotes) balanced to leave code (for
|
|||||||
instance Lisp and Python) and text (for instance LaTeX and Org) structure
|
instance Lisp and Python) and text (for instance LaTeX and Org) structure
|
||||||
intact. I use [[https://github.com/Fuco1/smartparens][smartparens]] which offers a normal mode (=smartparens-mode=) and a
|
intact. I use [[https://github.com/Fuco1/smartparens][smartparens]] which offers a normal mode (=smartparens-mode=) and a
|
||||||
a strict mode (=smartparens-strict-mode=). Although both modes insert character
|
a strict mode (=smartparens-strict-mode=). Although both modes insert character
|
||||||
pairs, the normal mode allows to easily delete one of the paired characters
|
pairs, the normal mode allows to delete one of the paired characters easily
|
||||||
while the strict mode does not. Therefore, the strict mode is more for code
|
while the strict mode does not. Therefore, the strict mode is more for code
|
||||||
editing since it never breaks programming language rules and the normal mode is
|
editing since it never breaks programming language rules and the normal mode is
|
||||||
more for text editing where structure is a matter of convention instead of
|
more for text editing where structure is a matter of convention instead of
|
||||||
@ -2020,7 +2020,6 @@ following links show how to put the documentation to practical use:
|
|||||||
2. [[https://lists.gnu.org/archive/html/help-gnu-emacs/2014-07/msg00135.html][How to enable smartparens in the minibuffer after eval-expression]] explains
|
2. [[https://lists.gnu.org/archive/html/help-gnu-emacs/2014-07/msg00135.html][How to enable smartparens in the minibuffer after eval-expression]] explains
|
||||||
how the machinery after the first and after later usages of =eval-expression=
|
how the machinery after the first and after later usages of =eval-expression=
|
||||||
differ and discusses options how to handle those differences.
|
differ and discusses options how to handle those differences.
|
||||||
|
|
||||||
Listing [[lst:configure-smartparens]] aims to configure [[https://github.com/Fuco1/smartparens][smartparens]] for Elisp,
|
Listing [[lst:configure-smartparens]] aims to configure [[https://github.com/Fuco1/smartparens][smartparens]] for Elisp,
|
||||||
LaTeX, Org, and Python.
|
LaTeX, Org, and Python.
|
||||||
|
|
||||||
@ -2062,9 +2061,9 @@ LaTeX, Org, and Python.
|
|||||||
(forward-line -1)
|
(forward-line -1)
|
||||||
(indent-according-to-mode))
|
(indent-according-to-mode))
|
||||||
|
|
||||||
(sp-local-pair 'prog-mode "(" nil :post-handlers '((indent-between-pair "RET")))
|
(dolist (left '("(" "[" "{"))
|
||||||
(sp-local-pair 'prog-mode "[" nil :post-handlers '((indent-between-pair "RET")))
|
(sp-local-pair 'prog-mode left
|
||||||
(sp-local-pair 'prog-mode "{" nil :post-handlers '((indent-between-pair "RET")))
|
nil :post-handlers '((indent-between-pair "RET"))))
|
||||||
|
|
||||||
(show-smartparens-global-mode +1)))
|
(show-smartparens-global-mode +1)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Loading…
Reference in New Issue
Block a user