Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [prog-mode]

Major mode for editing programming language source code. Typically, it is not used directly, instead many programming-related major modes are derived from this mode.

1
vote
0answers
77 views

Emacs really laggy on prog-mode

I noticed Emacs was really laggy on any mode derived from prog-mode two days ago. Before that, everything was fine. I can navigate on a 1000+ lines org-mode file without problem, but I can't even type ...
0
votes
0answers
66 views

Create a minor mode only for prog-mode major modes

I am working on a minor-mode and I'd like it to be active only for major modes derived from prog-mode. So far I know that the macro define-minor-mode takes a argument :global to decide whether or not ...
4
votes
1answer
79 views

Variable assignment for programming modes not working

I want to set the variable truncate-lines to t in order to have truncated lines, but only in programming modes. So, following this thread, I put the following code in my configuration file: (defun my-...
1
vote
0answers
315 views

prog-mode-hook not run for C++ mode

I am trying to turn on linum-mode and fci-mode for C++ editing. Here is my configuration: ;; If non nil line numbers are turned on in all `prog-mode' and `text-mode' ;; derivatives. If set to `...
3
votes
2answers
111 views

How to create a block from lines

In various programming modes, assuming I have a few lines of code like this : foo() bar() And I want to turn it into a block (say, and if of some sort) if (something) { foo() bar() } Is there, ...
1
vote
0answers
28 views

find-file opens file but buries its buffer when ECB is activated

I have a hook in my .emacs file that activates ECB when prog-mode entered: (add-hook 'prog-mode-hook 'ecb-activate) When I open the first file that starts a prog-mode, it seems to cause find-file* ...
4
votes
3answers
568 views

Turn a non prog-mode derived major-mode into a prog-mode derived major-mode

erlang-mode is not a derived prog-mode. Is there any way to make it part of the prog-mode-hook ?
9
votes
4answers
323 views

How do I inherit from prog-mode, whilst still supporting older emacsen?

I'm writing a major mode for a programming language, but I want to support older Emacs versions. prog-mode is relatively new. I want to inherit from prog-mode if it's defined, but still do something ...