summaryrefslogtreecommitdiff
path: root/itches/emacs/language-support.org
blob: 8ec766eec2d68572f8ccfbe417a083cbe3167b10 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
* Python
** Fix builtin/keyword fontification for Python 3
E.g. =print= became a builtin.
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
** Fontify f-strings
E.g. =f'an {expression} that should be highlighted'=.


* 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'=.
** Fix indentation on continuation lines
#+begin_src shell
# cf
# - electric-indent-post-self-insert-function
# - indent-according-to-mode
# - indent-line-function => smie-indent-line
# - smie-indent-functions
# - smie-indent-exps
# => calls smie-backward-sexp, which does not skip over ${foo}
foobar \
    indentis4
foo_bar \
    indentisstill4
${foo}bar \
      indentisfoobar
#+end_src


* Makefile
** Recognize [[http://austingroupbugs.net/view.php?id=330][POSIX "immediate-expansion"]] operator ~::=~


* Assembly
** =C-o= inserts a tab despite =indent-tabs-mode= being nil
This seems to come from the mode setting =fill-prefix=.  The mode also
does not adhere to the "~RET~ = smart newline, ~C-j~ = dumb linefeed"
convention for no good reason AFAICT.


* 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.