summaryrefslogtreecommitdiffstats
path: root/emacs.el
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-06-22 21:46:22 +0200
committerGravatar Tom Willemsen2011-06-22 21:46:22 +0200
commitd46b304e0f00bf8fed81f0b605bdbbaa56f6134e (patch)
tree51afd41e56a6e7e019259c4b04a6fbc7dadf6a02 /emacs.el
parent81e47c580661cfac7813b7bd79ef4b0336715c44 (diff)
downloaddotfiles-d46b304e0f00bf8fed81f0b605bdbbaa56f6134e.tar.gz
dotfiles-d46b304e0f00bf8fed81f0b605bdbbaa56f6134e.zip
EMACS: Integers and setq
Added hightlighting for integers in prog-mode, switched from single to multiple setqs again.
Diffstat (limited to 'emacs.el')
-rw-r--r--emacs.el134
1 files changed, 65 insertions, 69 deletions
diff --git a/emacs.el b/emacs.el
index 9361eb3..5b744e3 100644
--- a/emacs.el
+++ b/emacs.el
@@ -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
- 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
-
- frame-title-format
- '(:eval
- (concat "emacs: " (buffer-name)))
-
- backup-directory-alist ; backup file location
- `((".*" . ,temporary-file-directory))
-
- 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")))
-
- org-todo-keywords
+(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) ; 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)
+
+(setq frame-title-format ; I don't like emacs@cloud, must have file
+ '(:eval ; name
+ (concat "emacs: " (buffer-name))))
+
+(setq backup-directory-alist ; backup file location
+ `((".*" . ,temporary-file-directory)))
+
+(setq auto-save-file-name-transforms ; autosave file location
+ `((".*" ,temporary-file-directory t)))
+
+(setq default-frame-alist ; default frame settings
+ (append '((font . "DejaVu Sans Mono-10:antialias=true"))))
+
+(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))
-
- 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))
+ ("CANCELLED" :foreground "orangered" :weight bold)))
+
+(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)