Questions tagged [syntax]

is for grammar, structure, and order of language elements. Emacs provides many facilities for correcting syntax errors, building complex syntactic structures from simpler ones, and applying rules of composition with syntactical correctness.

Filter by
Sorted by
Tagged with
35
votes
7answers
9k views

How to treat underscore as part of the word?

I use Emacs + evil mode. When I position the cursor on e (in normal state) in a chunk of text such as abc_def_ghi, ciw (change inner word) changes only the def part of the string, while Vim would ...
12
votes
3answers
1k views

Treat symbols as words in prog modes

There are a number of commands in Emacs which apply to "words." Examples include forward-word, kill-word, upcase-word, mark-word, transpose-words, etc. The definition of "word" seems to vary a bit ...
9
votes
2answers
127 views

Does word syntax take script into account?

I call count-words-region (M-x =) on US/RU/IPA string: HelloПривheləʊ The following message is printed: Region has 1 line, 4 words, and 14 characters. All symbols have w syntax, but differ in ...
10
votes
2answers
171 views

Is there a standard/recommended syntax for defining a keyboard binding?

I have seen all of the following for defining a keyboard binding. All of these work (at least on MS Windows). I don't know if there is another way to do the same thing. I am wondering if there is a ...
4
votes
1answer
172 views

Is the sharp dollar (#$) sign the same as load-file-name in Emacs?

I see Emacs use #$ in autoload files, but I don't known if there are any difference between #$ and load-file-name. When I use them in a file, they looks like the same and when I print them by M-: they ...
4
votes
1answer
523 views

Change syntax highlighting when doing ps-print-buffer-with-faces

Hopefully a simple question. I code in c++ in emacs with a dark background and the syntax highlighting is perfect for viewing that way, however when I print on white paper, some of the colours like ...
3
votes
1answer
194 views

modify syntax table for strings in perl modes

My company uses a version of Perl where you can define by binary number using something like my $var = 'b010110110; etc. Problem is both perl-mode and cperl-mode interpret ' as the start of the string ...
3
votes
1answer
3k views

How to customize the line character length in elpy?

I am using elpy for my Python development, but I would like to set the per-line character limit to 120 instead of the default 80 used by PEP8. Any suggestions on how I can do this? Even better, it ...