How to force a syntax-highlighting refresh in emacs?
Yes. The emacs command is M-x font-lock-fontify-buffer if I recall it right. You can bind it to a key sequence if it’s not already bound in your mode.
Yes. The emacs command is M-x font-lock-fontify-buffer if I recall it right. You can bind it to a key sequence if it’s not already bound in your mode.
Add the following to your .emacs: (add-to-list ‘default-frame-alist ‘(foreground-color . “#E0DFDB”)) (add-to-list ‘default-frame-alist ‘(background-color . “#102372”)) You might want to look at http://www.emacswiki.org/emacs/FrameParameters and the links therein.
It is possible to work around :escape command limitations using registers and :bindkey command. Just put this in .screenrc: # reset escape key to the default escape ^Aa # auxiliary register register S ^A # Alt + x produces ^A and acts as an escape key bindkey “^[x” process S ## Alt + space produces … Read more
Here’s a function that will change a pair of vertical windows to a pair of horizontal windows: (defun 2-windows-vertical-to-horizontal () (let ((buffers (mapcar ‘window-buffer (window-list)))) (when (= 2 (length buffers)) (delete-other-windows) (set-window-buffer (split-window-horizontally) (cadr buffers))))) To do this automatically on startup, add this function to emacs-startup-hook: (add-hook ’emacs-startup-hook ‘2-windows-vertical-to-horizontal)
Start with Emacs Lisp (given that you seem to have already started customizing your emacs) – it seems to be more immediately useful for you. Do keep in mind that there is quite a bit of difference between Emacs Lisp (there is a lot of buffer management stuff, especially in the code you’re likely to … Read more
You can use AnsiTerm which does support colors or you can enable AnsiColor for the normal shell: (autoload ‘ansi-color-for-comint-mode-on “ansi-color” nil t) (add-hook ‘shell-mode-hook ‘ansi-color-for-comint-mode-on)
As of Emacs 22.1 (at least), ‘save-buffers-kill-emacs (the default binding for C-x C-c) prompts you for each unsaved buffer that has a file. Type a d when prompted to save and see the diff. From the help documentation: Save some modified file-visiting buffers. Asks user about each one. You can answer `y’ to save, `n’ … Read more
This is actually C-x Forward (right cursor arrow) and C-x Back (left cursor arrow)
You’ll need to provide more information to be sure. Try setting (setq debug-on-error t) which will give you a stack trace showing what function is complaining about the string being nil. My guess is that buffer-file-name is returning nil, and that’s where the problem lies (not all buffers have file names). Check out the debugging … Read more
Not minutes after asking the question I figured it out by copy+pasting code. However I have no clue how it works. (global-set-key (kbd “M-<up>”) (lambda () (interactive) (move-line -1)))