136 ;; Shut off message buffer by setting nil. |
136 ;; Shut off message buffer by setting nil. |
137 (setq message-log-max 512) |
137 (setq message-log-max 512) |
138 |
138 |
139 ;; Prevent Emacs from loading 'default.el', which is loaded after '.emacs'. |
139 ;; Prevent Emacs from loading 'default.el', which is loaded after '.emacs'. |
140 (setq inhibit-default-init nil) ; t/nil |
140 (setq inhibit-default-init nil) ; t/nil |
141 |
|
142 (defun my-debug (mode) |
|
143 "With prefix enable enter to debuger and show backtrace when |
|
144 problems occur, with double prefix enable debugging on event and |
|
145 signal, else disable breaking to debugger." |
|
146 (interactive "P") |
|
147 (let ( (lvl1 (not (not mode))) (lvl2 (equal mode '(16))) ) |
|
148 (setq debug-on-error lvl1) |
|
149 ;; Get trace when press C-g. |
|
150 (setq debug-on-quit lvl1) |
|
151 (setq debug-on-event lvl2) |
|
152 (setq debug-on-signal lvl2) |
|
153 (cond |
|
154 (lvl2 (message "Debugging on quit/event/signal...")) |
|
155 (lvl1 (message "Debugging on quit...")) |
|
156 (t (message "Debugging disabled..."))))) |
|
157 |
141 |
158 (defun my-eval-buffer () |
142 (defun my-eval-buffer () |
159 "Evaluate entire buffer with re-assigning values to `defvar' / `defcustom'. |
143 "Evaluate entire buffer with re-assigning values to `defvar' / `defcustom'. |
160 Useful during package development." |
144 Useful during package development." |
161 (interactive) |
145 (interactive) |