Permalink
Browse files

Use whitespace-cleanup instead.

Enable autopair only for c mode and lisp mode.
  • Loading branch information...
1 parent 992d338 commit 30fee337fb1e58d39f65930981e1ba5ece05194c @winfred-lu committed Feb 21, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 winfred-misc.el
View
@@ -1,14 +1,16 @@
;; Remove unnecessary trailing whitespace
-(add-hook 'before-save-hook (lambda () (whitespace-cleanup)))
+(add-hook 'before-save-hook (lambda () (delete-trailing-whitespace)))
;; y-or-n
(defalias 'yes-or-no-p 'y-or-n-p)
;; auto pair
(require 'autopair)
-(autopair-global-mode)
+;(autopair-global-mode)
+(add-hook 'c-mode-common-hook #'(lambda () (autopair-mode)))
(add-hook 'emacs-lisp-mode-hook
#'(lambda ()
+ (autopair-mode)
(push '(?` . ?')
(getf autopair-extra-pairs :comment))
(push '(?` . ?')
@@ -23,4 +25,4 @@
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
;; stop y-and-n before editing symlinks
-(setq vc-follow-symlinks nil)
+(setq vc-follow-symlinks nil)

0 comments on commit 30fee33

Please sign in to comment.