EMACS: Integers and setq

Added hightlighting for integers in prog-mode, switched from single to
multiple setqs again.
This commit is contained in:
Tom Willemsen 2011-06-22 21:46:22 +02:00
parent 81e47c5806
commit d46b304e0f

120
emacs.el
View file

@ -150,7 +150,7 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
(defun list-functions ()
(interactive)
(occur
"\(?:\(?:private\|protected\|public\) \)?function \(?:\sw\)+(\sw*)"))
"\\(?:\\(?:private\\|protected\\|public\\) \\)?function \\(?:\\sw\\)+(\\sw*)"))
(defun insert-init-title (title width)
(interactive "stitle: \nnwidth: ")
@ -191,6 +191,12 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
(byte-compile-file fname)))))
(defun on-prog-mode ()
(font-lock-add-keywords
nil
'(("\\b\\(0[xX][0-9a-fA-F]+[lL]?\\|[0-9]+\\.?[0-9]*\\([eE][-+]?[0-9]+\\)?\\([lL]\\|[fF]\\|[dD]\\)?\\)\\b"
0 font-lock-constant-face)
("\\b\\(\\.[0-9]+\\([eE][-+]?[0-9]+\\)?\\([lL]\\|[fF]\\|[dD]\\)?\\)\\b"
0 font-lock-constant-face)))
(set-column-marker)
(rainbow-delimiters-mode))
@ -288,92 +294,82 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SETTINGS ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq-default indent-tabs-mode nil) ; spaces, no tabs
(setq-default indent-tabs-mode nil) ; spaces, no tabs
(setq-default truncate-lines t) ; don't wrap
(setq-default php-warn-if-mumamo-off nil) ; don't warn me about this
(setq
inhibit-startup-message t
require-final-newline t
inhibit-default-init t
scroll-conservatively 101 ; scroll only one line
browse-url-browser-function 'browse-url-generic
browse-url-generic-program "conkeror"
whitespace-style '(face trailing)
uniquify-buffer-name-style 'reverse
org-confirm-babel-evaluate nil
org-tags-exclude-from-inheritance '("crypt")
org-crypt-key "33E8CC1CC4"
org-use-fast-todo-selection t
org-default-notes-file (concat org-directory "/notes.org")
org-ditaa-jar-path "/usr/share/java/ditaa/ditaa-0_9.jar"
jit-lock-defer-time 0.2
htmlize-output-type 'inline-css
ido-save-directory-list-file nil
(setq inhibit-startup-message t) ; Don't show welcome screen
(setq require-final-newline t) ; Always put final newline
(setq inhibit-default-init t) ; Don't load default library
(setq scroll-conservatively 101) ; scroll only one line
(setq browse-url-browser-function 'browse-url-generic)
(setq browse-url-generic-program "$BROWSER")
(setq whitespace-style '(face trailing)) ; For use with markdown mode
(setq uniquify-buffer-name-style 'reverse)
(setq org-confirm-babel-evaluate nil)
(setq org-tags-exclude-from-inheritance '("crypt"))
(setq org-crypt-key "33E8CC1CC4")
(setq org-use-fast-todo-selection t)
(setq org-default-notes-file (concat org-directory "/notes.org"))
(setq org-ditaa-jar-path "/usr/share/java/ditaa/ditaa-0_9.jar")
(setq jit-lock-defer-time 0.2) ; Don't fontlock immediately
(setq htmlize-output-type 'inline-css)
(setq ido-save-directory-list-file nil)
(setq ido-auto-merge-delay-time 2) ; Wait before fixing names
(setq org-outline-path-complete-in-steps t)
frame-title-format
'(:eval
(concat "emacs: " (buffer-name)))
(setq frame-title-format ; I don't like emacs@cloud, must have file
'(:eval ; name
(concat "emacs: " (buffer-name))))
backup-directory-alist ; backup file location
`((".*" . ,temporary-file-directory))
(setq backup-directory-alist ; backup file location
`((".*" . ,temporary-file-directory)))
auto-save-file-name-transforms ; autosave file location
`((".*" ,temporary-file-directory t))
(setq auto-save-file-name-transforms ; autosave file location
`((".*" ,temporary-file-directory t)))
default-frame-alist ; default frame settings
(append '((font . "DejaVu Sans Mono-10:antialias=true")))
(setq default-frame-alist ; default frame settings
(append '((font . "DejaVu Sans Mono-10:antialias=true"))))
org-todo-keywords
(setq org-todo-keywords
'((sequence "TODO(t)"
"IN PROGRESS(p)"
"WAITING(w@/!)"
"|"
"DONE(d!/!)"
"CANCELLED(c@/!)"))
"CANCELLED(c@/!)")))
org-babel-load-languages
'((ditaa . t))
(setq org-babel-load-languages
'((ditaa . t)))
org-refile-targets
(setq org-refile-targets
'((org-agenda-files :maxlevel . 5)
(nil :maxlevel . 5))
org-outline-path-complete-in-steps t
(nil :maxlevel . 5)))
org-todo-keyword-faces
(setq org-todo-keyword-faces
'(("TODO" :foreground "red" :weight bold)
("IN PROGRESS" :foreground "yellow" :weight bold)
("DONE" :foreground "forest green" :weight bold)
("WAITING" :foreground "orange" :weight bold)
("CANCELLED" :foreground "orangered" :weight bold))
("CANCELLED" :foreground "orangered" :weight bold)))
org-publish-project-alist
'(("lxcoding-docs"
:base-directory "~/devel/lxcoding-docs/"
:base-extension "org"
:publishing-directory "~/lxcoding-docs-test/"
:recursive t
:publishing-function org-publish-org-to-html
:headline-levels
:auto-preamble t
:auto-sitemap t
:sitemap-filename "sitemap.org"
:sitemap-title "docs sitemap")))
(if window-system (x-init) (cli-init))
(if window-system
(x-init)
(cli-init))
(fset 'yes-or-no-p 'y-or-n-p) ; switch yes or no to y or n
(tool-bar-mode -1) ; no toolbar
(menu-bar-mode -1) ; no menubar
(scroll-bar-mode -1) ; no scrollbars
(line-number-mode -1) ; don't show line number in splitter
(global-linum-mode t) ; Show line numbers in gutter
(column-number-mode t) ; show column number in splitter
(tool-bar-mode -1) ; no toolbar
(menu-bar-mode -1) ; no menubar
(scroll-bar-mode -1) ; no scrollbars
(line-number-mode -1) ; don't show line number in splitter
(global-linum-mode t) ; Show line numbers in gutter
(column-number-mode t) ; show column number in splitter
(global-font-lock-mode t) ; show syntax highlighting, old
(delete-selection-mode t) ; delete selection upon typing
(show-paren-mode t) ; show the opposite paren
(ido-mode t)
(autopair-global-mode) ; automatically add the other
; delimiter
(show-paren-mode t) ; show the opposite paren
(ido-mode t)
(autopair-global-mode) ; automatically add the other delimiter
(add-to-list 'compilation-finish-functions 'my-comp-finish-function)