(show-paren-mode 1)
;; don't backupf
(setq make-backup-files nil)
+
+ ;;supress the redefined warning at startup
+ (setq ad-redefinition-action 'accept)
#+END_SRC
*** Custom file
#+END_SRC
** Font Setting
-
syntax highlighting
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(global-font-lock-mode 1)
-
#+END_SRC
[[https://github.com/i-tu/Hasklig][Hasklig]] and Source Code Pro, defined fonts family
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(if window-system
(defvar sd/fixed-font-family
(cond ((x-list-fonts "Hasklig") "Hasklig")
- ((x-list-fonts "Source Code Pro") "Source Code Pro:weight:light")
+ ((x-list-fonts "Source Code Pro") "Source Code Pro:weight")
((x-list-fonts "Anonymous Pro") "Anonymous Pro")
((x-list-fonts "M+ 1mn") "M+ 1mn"))
"The fixed width font based on what is installed, `nil' if not defined."))
-
#+END_SRC
Setting the fonts
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(if window-system
(when sd/fixed-font-family
(set-frame-font sd/fixed-font-family)
(set-face-attribute 'default nil :font sd/fixed-font-family :height 130)
(set-face-font 'default sd/fixed-font-family)))
-
#+END_SRC
** Color Theme
Loading theme should be after all required loaded, refere [[https://github.com/jwiegley/use-package][:defer]] in =use-package=
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(setq vc-follow-symlinks t)
(use-package color-theme
:ensure t
:no-require t
:config
- (load-theme 'sanityinc-tomorrow-bright t)))
+ ;; (load-theme 'sanityinc-tomorrow-bright t)
+ (load-theme 'molokai t)
+ ))
;(eval-after-load 'color-theme
; (load-theme 'sanityinc-tomorrow-bright t))
(use-package ido-exit-target
:ensure t
:init
- (mapcar '(lambda (map)
+ (mapcar #'(lambda (map)
(define-key map (kbd "C-j") #'ido-exit-target-other-window)
(define-key map (kbd "C-k") #'ido-exit-target-split-window-below))
(list ido-buffer-completion-map
:ensure t)
(defun sd/term-mode-mapping ()
- (mapcar (lambda (map)
+ (mapcar #'(lambda (map)
(define-key map (kbd "C-o") nil)
(define-key map (kbd "C-g") nil))
(list term-mode-map
;; "C-M-j" is my global binding for avy goto line below
;; disable it in c mode
- (mapcar '(lambda (map)
+ (mapcar #'(lambda (map)
(define-key map (kbd "C-M-j") nil))
(list c-mode-map
c++-mode-map
objc-mode-map))
+
+ ;; objective c
+ (add-to-list 'auto-mode-alist '("\\.mm\\'" . objc-mode))
#+END_SRC
*** irony
(global-semantic-idle-scheduler-mode 1)
(semantic-mode 1)
-
#+END_SRC
*** google C style