Questions tagged [elisp]
Emacs Lisp, a dialect of Lisp embedded in the Emacs editor.
69
questions
1
vote
1
answer
416
views
how to use pre-defined variables or constants in (custom-theme-set-faces) in emacs
I'd like to use pre-defined variable or constant of string type in (custom-theme-set-faces), so it would go like
(setq Blue128 "#000080")
(custom-theme-set-faces
'thename
'(default ((t (
...
2
votes
1
answer
232
views
Emacs config lisp code that changes electric-indent-mode before and after pasting from clipboard
Starting at Emacs 24.4 (I think), c-j and ret have been swapped, so indent is now called after ret. And those indents in text mode are indent-relative, so, when you paste indented code, the code is ...
0
votes
0
answers
768
views
How to config Emacs to fit screen size on startup?
My Emacs often extends outside the visible range of a screen on startup, e.g. on a virtual machine, as shown below. This becomes a problem because the status line is invisible (and it's tedious to ask ...
0
votes
2
answers
187
views
emacs remove spaces to the edge of the page
I often find myself needing to delete a lot of whitespace to the edge of the page when working in emacs.
How can remove it in a quick keystroke? I looked around in the "deleting whitespace" emacs ...
1
vote
0
answers
536
views
yasnippet and evil mode : how to switch to normal mode without exiting the snippet environment
The problem is when I am in a snippet expansion, I hit escape to switch to normal mode, and the snippet is escaped.
How can I make it to behave like this:
one escape only switch to evil normal mode, ...
1
vote
1
answer
115
views
Emacs major mode key map definition fails
So, I've tried to write a simple major mode (report-mode) using as an example. I seem to have everything working except that the keymap doesn't actually seem to map.
If I do C-h f report-mode I ...
1
vote
1
answer
86
views
how to set a kill string length criterion for storing in kill ring
Is there a way to tell emacs ignore kill that are less than 4 characters long?
It is quite annoying to have a lot of single character kills in evil mode.
Thank you!
2
votes
2
answers
874
views
How to enable tab complete only in term-line-mode
I have company-mode installed. When I press tab in term-mode, it always calls company-complete.
I tried to disable company-mode with
(global-company-mode '(not (equal major-mode 'term-mode)))
Also ...
3
votes
0
answers
768
views
how to set outline-minor-mode heading levels in outline-regexp
I am trying to add a custom heading to program mode, and I want it to be on the highest level and move all other levels down, so I can add more structure to my long script. For example, for python ...
1
vote
1
answer
465
views
Adding syntax highlighting for a comment section in Emacs
I have the following
(defun add-c-syntax-highlighting ()
(font-lock-add-keywords nil '(
("\\<\\(\\-+\\)" 1 font-lock-warning-face prepend)
("\\<\\(FIXME\\):" 1 font-lock-warning-...
2
votes
3
answers
1k
views
How to programmatically create a new Emacs frame with a given name?
I need to be able to create frames and to refer to them programmatically.
How can one create a new Emacs frame with a given name, so that he can refer to it later on?
I know how to create new frames,...
4
votes
1
answer
425
views
Emacs - move cursor back after mark-whole-buffer & indent-region
I'm Emacs newbie and for automatic re-formating of my source codes in Emacs I've created simple macro using mark-whole-buffer and indent-region commands, mapped to C-j shortcut:
(fset 'format-...
1
vote
1
answer
186
views
Emacs: dolist doesn't work with dot
I'm new to Emacs. I intend to use sh-mode for a few for file name patterns, so I added the following lines to ~/.emacs.d/init.el:
(dolist (pattern '("\\.zsh$"
"\\.?zshrc$"
...
1
vote
1
answer
1k
views
Emacs: make debug-on-error catch errors
When I open an empty haskell file, which activates haskell-mode, I get the message
user-error: No items suitable for an index found in this buffer
If I do the same thing, but call toggle-debug-on-...
2
votes
1
answer
449
views
Highlighting all compilation errors in emacs
Is there a good way to highlight all compilation errors in emacs, specifically in haskell-mode?
The function next-error (C-x `) highlights only a single error, but it doesn't set match-data to the ...