Emacs: minor improvements.

master
Pierre Neidhardt 2013-05-25 13:43:22 +02:00
parent 49fcdbae07
commit c1d6086724
4 changed files with 12 additions and 12 deletions

1
.emacs
View File

@ -20,4 +20,3 @@
;; End of file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -22,6 +22,7 @@
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(menu-bar-mode -1)
;; (scroll-bar-mode -1)
(set-scroll-bar-mode 'left)
;; Make questions less annoying.
(defalias 'yes-or-no-p 'y-or-n-p)
@ -46,13 +47,10 @@
;; Line numbers
;; TODO: This mode is really messy. Replace it.
(autoload 'linum-mode "linum" "toggle line numbers on/off" t)
;; (setq linum-format "%-4d ")
(if (display-graphic-p) (setq linum-format "%d") (setq linum-format "%d "))
;; (global-linum-mode 1) ;; TODO: This may generate warnings with emacsclient. Bug?
(if (not (fboundp 'tool-bar-mode)) (setq linum-format "%d "))
(add-hook 'find-file-hook (lambda () (linum-mode 1)))
(define-key my-keys-minor-mode-map (kbd "C-<f5>") 'linum-mode) ;; Toggle line numbers.
;; Indentation
;(setq standard-indent 4)
(setq-default tab-width 4)
@ -142,7 +140,7 @@
(setq show-paren-delay 0)
;; query-replace-regex fix on terminals.
(define-key my-keys-minor-mode-map (kbd "C-M-y") 'query-replace-regexp)
(if (not (fboundp 'tool-bar-mode)) (define-key my-keys-minor-mode-map (kbd "C-M-y") 'query-replace-regexp))
;; Semantic with ghost display (allows M-n and M-p to browse completion).
(semantic-mode 1)

View File

@ -6,10 +6,10 @@
;; on it and call 'customize-face'.
;; General
(set-face-foreground 'default "white" )
(set-face-background 'default "black" )
(set-face-foreground 'default "white" )
(set-face-background 'default "black" )
(set-face-foreground 'link "#0000ff" )
(set-face-foreground 'link "#00ffff" )
(set-face-underline-p 'link t)
(set-face-foreground 'minibuffer-prompt "#00ffff" )
(set-face-background 'region "#262626")
@ -17,10 +17,13 @@
(set-face-foreground 'isearch nil )
(set-face-background 'isearch-lazy-highlight-face "#3a3a3a" )
(if (string-match "^24.*" emacs-version )
(progn
(progn
(set-face-foreground 'error "red")
(set-face-bold-p 'error t)))
;; Font size
(if (fboundp 'tool-bar-mode) (set-face-attribute 'default nil :height 100))
;; Line numbers. Graphic version has a gray bar separating text from line
;; numbers, so we can leave the background black.
(if (display-graphic-p)

View File

@ -6,8 +6,8 @@
# set editor=`echo \$EDITOR`
## If graphical emacs is used, we need to use a non-terminating client.
if [ $EDITOR = "em" ]; then
if [ "$EDITOR" = "em" ]; then
cat <<EOF
set editor="emacsclient -a \"\" -t"
EOF
fi
fi