summaryrefslogtreecommitdiff
path: root/itches/emacs/language-support.org
blob: 34e6bfa2624913ff69ee4faaddff5ea837e17b27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
* Python
** Fix builtin/keyword fontification for Python 3
E.g. =print= became a builtin, =file= is no longer one.
Cf. [[https://debbugs.gnu.org/43298][bug#43298]].
*** TODO add fontification tests
*** TODO have dedicated font-lock styles for Python 2, 3 and "mixed"
Default to "mixed" (rely on tests to ensure user-visible change).
**** TODO create font-lock styles
**** TODO create variable to choose style
Users could customize it or set it with directory-local variables.
*** TODO add heuristic to pick the "right" style


* Shell scripts
** Fix builtin/keyword fontification
- =continue= and =break= are /builtins/.
** Fontify variables within strings
E.g. ="an ${expression} that should be highlighted"=.
** Do not highlight single-quoted command substitutions
E.g. ='this $(call) should not be highlighted'=.


* TeX
** electric-pair-mode and $inline math$
e-p-m inserts a closing $ after point, but inserts a new pair instead
of overwriting when pressing $ again.
** AUCTeX
*** electric-pair-mode does not work
**** pressing ="= on active region does not surround it with quotes even with electric-pair-mode
TeX-insert-quote erases the region and inserts =``= instead.
**** pressing =$= inserts a single $
*** =catcode`$= starts a math environment
Minimal example:

#+begin_src latex
\documentclass{article}

\usepackage{fancyvrb}
\usepackage{listings}
\usepackage{xcolor}

\lstset{
  fancyvrb=true
}

\begin{document}

\begin{Verbatim}[
  commandchars=\\\{\},
  codes={\catcode`$=3},
  formatcom={\lstset{fancyvrb=false}}
]
Things increased: \textcolor{red}{+32.05%} (189818 $\nearrow$ 250657)
Things decreased: \textcolor{green}{-49.22%} (514 $\searrow$ 261)
\end{Verbatim}

\end{document}
#+end_src

Can workaround it with =\catcode36= instead of =\catcode`$=.
*** saving does not add a final newline
*** TeX-auto-write does not handle absent parent folders
E.g. =.auctex/auto=.
*** faces
It would be nice if AUCTeX defined more faces, inheriting from the
ones it currently uses, so that users could set them independently.
**** description labels
Currently using font-lock-variable-name-face.
**** texttt
Currently using font-lock-type-face.
**** footnote
Currently using font-lock-constant-face.
**** macros
Maybe font-latex-sedate-face should be moved before
font-lock-keyword-face?  Otherwise if the latter has a foreground, the
former has no effect.