Adding the tip of the day, and trying to fix whitespace, which is broken (like my i key) http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4177
This commit is contained in:
parent
19d54c8814
commit
47e72faecf
1 changed files with 24 additions and 1 deletions
25
.emacs
25
.emacs
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
(tooltip-mode nil)
|
||||
(setq midnight-mode t)
|
||||
(setq show-trailing-whitespace t)
|
||||
(setq column-number-mode nil)
|
||||
(setq size-indication-mode nil)
|
||||
(setq mode-line-position nil)
|
||||
|
|
@ -76,6 +75,10 @@
|
|||
(load "~/.emacs.d/ergoemacs-keybindings-5.1/ergoemacs-mode")
|
||||
(ergoemacs-mode 1)
|
||||
|
||||
;; Highlight bad whitespace
|
||||
(global-whitespace-mode t)
|
||||
(setq whitespace-style (quote (tabs tab-mark)))
|
||||
|
||||
;; Make % work like vi
|
||||
(global-set-key "%" 'match-paren)
|
||||
(defun match-paren (arg)
|
||||
|
|
@ -108,6 +111,23 @@
|
|||
(list (line-beginning-position)
|
||||
(line-beginning-position 2)))))
|
||||
|
||||
;; Tip of the day!
|
||||
(defun totd ()
|
||||
(interactive)
|
||||
(random t) ;; seed with time-of-day
|
||||
(with-output-to-temp-buffer "*Tip of the day*"
|
||||
(let* ((commands (loop for s being the symbols
|
||||
when (commandp s) collect s))
|
||||
(command (nth (random (length commands)) commands)))
|
||||
(princ
|
||||
(concat "Your tip for the day is:\n"
|
||||
"========================\n\n"
|
||||
(describe-function command)
|
||||
"\n\nInvoke with:\n\n"
|
||||
(with-temp-buffer
|
||||
(where-is command t)
|
||||
(buffer-string)))))))
|
||||
|
||||
;; Set my location sunrise-sunset
|
||||
;; (setq calendar-latitude 40.1)
|
||||
;; (setq calendar-longitude -88.2)
|
||||
|
|
@ -116,6 +136,9 @@
|
|||
(setq calendar-longitude 78.5)
|
||||
(setq calendar-location-name "Hyderabad, India")
|
||||
|
||||
;; Custom key maps
|
||||
(global-set-key (kbd "C-c t") 'totd)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Haskell mode
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue