Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
129 lines (99 sloc) 4.48 KB




Debug configuration

;; mark the start time
(defconst emacs-start-time (current-time))

DONE Personal information

  • State "DONE" from "" [2016-06-05 Sun 00:44]

    (setq user-full-name "Lu Jianmei" user-mail-address "" )

DONE Changing key-mapping for osx

  • State "DONE" from "DONE" [2016-06-05 Sun 00:44]

Following is for changing the default key mapping on macbook pro. Which means i change the (command key) for (meta key), (option key) key for (control key). Also change the mouse wheel direction to suit macbook pro. 下面部分是基于macbook系统的键盘调整修改配置。

(defconst *is-a-mac* (eq system-type 'darwin))

(when *is-a-mac*
  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'control)
  (setq default-input-method "MacOSX")
  ;; Make mouse wheel / trackpad scrolling less jerky
  (setq mouse-wheel-scroll-amount '(1
                                    ((shift) . 5)
  (dolist (multiple '("" "double-" "triple-"))
    (dolist (direction '("right" "left"))
      (global-set-key (read-kbd-macro (concat "<" multiple "wheel-" direction ">")) 'ignore)))
  (global-set-key (kbd "M-`") 'ns-next-frame)
  (global-set-key (kbd "M-h") 'ns-do-hide-emacs)
  (global-set-key (kbd "M-˙") 'ns-do-hide-others)
  (global-set-key (kbd "M-ˍ") 'ns-do-hide-others) ;; what describe-key reports for cmd-option-h

Emacs initialization

TODO Add my customized configurations

(setq package-enable-at-startup nil)

;; Override the pakages default load path, to store some independent configuration
(add-to-list 'load-path "~/.emacs.d/lisp"
   (message "loading path ~/.emacs.d/lisp")
  (eval-when-compile (require 'cl))
  (defun sanityinc/add-subdirs-to-load-path (parent-dir)
    "Adds every non-hidden subdir of PARENT-DIR to `load-path'."
    (let* ((default-directory parent-dir))
        (setq load-path
                (lambda (dir) (file-directory-p dir))
                (directory-files (expand-file-name parent-dir) t "^[^\\.]"))

   (expand-file-name "site-lisp/" user-emacs-directory))

(unless (package-installed-p 'use-package)
  (package-install 'use-package))
(setq use-package-verbose t)
(setq use-package-always-ensure t)
(require 'use-package)
(use-package auto-compile
  :defer t
  :config (auto-compile-on-load-mode))
(setq load-prefer-newer t)

DONE Look and feel configuration

Base configurations for window and frame

  ;; hide something
  (menu-bar-mode -1)
  (tool-bar-mode -1)
  (scroll-bar-mode -1)
  (set-default 'cursor-type 'hbar)

  (winner-mode t)

  ;; load theme
  ;;  (load-theme 'wombat)

(defvar running-alternate-emacs nil)
(defvar running-development-emacs nil)
You can’t perform that action at this time.