(setq load-path (append (list (concat (getenv "HOME") "/lisp/")) load-path))
(require 'cl) (require 'nixlist)
(require 'winring) (require 'scroll-in-place) (require 'uniquify) (require 'icomplete) (require 'balloon-help) (require 'hack-locals) (require 'type-break)
(when (featurep 'xemacs)
(require 'x-compose))
(unless (featurep 'xemacs)
(iswitchb-mode 1))
(defun nix-enable-disabled-commands (&rest ignore)
"This function completely disables disabled commands.
it does this by, uh, enabling them. I hope this is clear."
(remprop this-command 'disabled)
(call-interactively this-command))
(setq disabled-command-hook 'nix-enable-disabled-commands)
(setq inhibit-default-init-portions '(desktop-load))
(setq-default modeline-buffer-identification
(list (cons modeline-buffer-id-left-extent "NixEmacs%N:")
(cons modeline-buffer-id-right-extent " %17b")))
(require 'init-prog-modes) (require 'init-message-modes) (require 'init-music)
(set-face-foreground 'highlight "DarkGreen")
(set-face-background 'highlight "DarkSeaGreen2")
(let ((minor-mode-alist minor-mode-alist))
(type-break-mode))
(defadvice type-break-time-warning (around nix-type-break-time-warning-snuff-logging last activate)
"Block logging of the `Type break due in {blah}' messages.
The messages are still displayed."
(let ((old-message-function (symbol-function 'message))
(log-message-ignore-regexps (append log-message-ignore-regexps
'("Warning: typing break due in"))))
(unwind-protect (progn (fset 'message (symbol-function 'gawd-snuff-message-function))
ad-do-it)
(fset 'message old-message-function))))
(defadvice type-break-keystroke-warning (around nix-type-break-keystroke-warning-snuff-logging last activate)
"Block logging of the `Type break due in {blah} keystrokes' messages.
The messages are still displayed."
(let ((old-message-function (symbol-function 'message))
(log-message-ignore-regexps (append log-message-ignore-regexps
'("Warning: typing break due in [0-9]* keystrokes\\.\\'"))))
(unwind-protect (progn (fset 'message (symbol-function 'gawd-snuff-message-function))
ad-do-it)
(fset 'message old-message-function))))
(setq type-break-demo-functions '(type-break-demo-boring
type-break-demo-life))
(defvar nix-type-break-warning-countdown-string-type nil
"Indicates the unit type of `type-break-warning-countdown-string'.
It will be either \"s\" or \"#k\".")
(defadvice type-break-time-warning-schedule (after nix-type-break-time-warning-schedule-typefix activate)
"Keep the `nix-type-break-warning-countdown-string-type' up to date."
(setq nix-type-break-warning-countdown-string-type
(if (equal type-break-warning-countdown-string-type "seconds")
"s"
"#k")))
(defadvice type-break-check-keystroke-warning (after nix-type-break-check-keystroke-warning-typefix activate)
"Keep the `nix-type-break-warning-countdown-string-type' up to date."
(setq nix-type-break-warning-countdown-string-type
(if (equal type-break-warning-countdown-string-type "seconds")
"s"
"#k")))
(setq type-break-mode-line-warning
`(type-break-mode-line-break-message-p
("")
(type-break-warning-countdown-string
("["
type-break-warning-countdown-string
nix-type-break-warning-countdown-string-type
"] "))))
(define-modeline-control "type-break" 'type-break-mode-line-string
"Modeline control warning about typing breaks."
nil "button3 begins a typing break.")
(define-key modeline-type-break-map (kbd "<button3>") 'type-break)
(setq modeline-format (splice-equal (cons modeline-buffer-id-extent 'modeline-buffer-id)
(cons modeline-type-break-extent 'modeline-type-break)
modeline-format))
(define-modeline-control "winring" '(" {" winring-name "} ")
"Modeline control giving the name of the current window in the ring."
'modeline-mousable "button1 circulates backwards in the window ring, button3 forwards")
(define-key modeline-winring-map (kbd "<button1>") 'winring-prev-configuration)
(define-key modeline-winring-map (kbd "<button3>") 'winring-next-configuration)
(setq type-break-mode-line-message-mode t)
(type-break-schedule)
(balloon-help-mode) (miniedit-install)
(winring-initialize #'(lambda ()
(setq modeline-format (splice-equal (cons modeline-buffer-id-extent 'modeline-buffer-id)
(list 'winring-show-names (cons modeline-winring-extent 'modeline-winring))
modeline-format))))
(setq gawd-key-bind-alist
(nconc gawd-key-bind-alist
`((,(current-global-map)
("A-r" . 'rename-buffer)
("A-j" . 'jump-to-register)
("A-g" . 'fume-prompt-function-goto)
("A-C-l" . 'fume-list-functions)
("A-k" . 'kill-entire-line)
("s-k" . 'kill-buffer-and-window)
("s-H-A-x" . 'save-buffers-kill-emacs)
("S-A-left" . 'winring-next-configuration)
("S-A-right" . 'winring-prev-configuration)
("A-m p" . 'emms-start)
("A-m s" . 'emms-stop)
("A-m >" . 'emms-next)
("A-m <" . 'emms-previous)
("A-m <right>" . 'emms-seek-forward)
("A-m <left>" . 'emms-seek-backward)
("A-m SPC" . 'emms-pause)
("A-m A-SPC" . 'emms-pause)
("A-m TAB" . 'emms-smart-browse)
("A-m m" . 'emms-show)
("A-m A-m" . 'emms-show)
("A-m r" . 'emms-toggle-repeat-playlist)
("A-m A-r" . 'emms-toggle-repeat-track)
("A-m b <right>" . 'emms-bookmarks-next)
("A-m b <left>" . 'emms-bookmarks-prev)
("A-m b SPC" . 'emms-bookmarks-add)
("A-m b <del>" . 'emms-bookmarks-clear)
("A-m <f11>" . 'emms-volume-mode-raise)
("A-m <f2>" . 'emms-volume-mode-lower)
("A-m d" . 'emms-play-directory)
("A-m D" . 'emms-play-directory-tree)
("S-left" . 'backward-word)
("S-right" . 'forward-word)
("S-BS" . 'backward-kill-word)
("S-<del>" . 'backward-or-forward-kill-word)
("<scroll-lock>" . 'ignore) ("H-<scroll-lock>" . 'ignore) ("C-x C-c" . nil) ("C-z" . nil) ("C-z ." . 'vi-dot) ("A-c" . 'compose-map) ("A-u" . 'redo) ("A-/" . 'redo) ("A-_" . 'redo)
("M-z" . 'zap-up-to-char) ("A-z" . 'zap-to-char)))))
(setq track-eol t backup-by-copying-when-linked nil backup-by-copying-when-mismatch nil mail-extr-ignore-single-names nil use-dialog-box nil gc-cons-threshold 40000000 vc-initial-comment t vc-diff-switches "-u" signal-error-on-buffer-boundary nil toolbar-visible-p nil igrep-verbose-prompts 'semi mark-ring-max 64 global-mark-ring-max 64 log-message-ignore-regexps '("\\`\\'") desktop-files-not-to-save "^$" guided-tour-insinuate-menubar nil winring-show-names t)
(if (featurep 'xemacs)
(setq zmacs-regions nil) (setq transient-mark-mode nil shift-select-mode nil mouse-autoselect-window nil))
(if (featurep 'xemacs)
(setq auto-gc-threshold (/ gc-cons-threshold 3)) (setq undo-limit 500000 undo-strong-limit 1200000))
(setq custom-file "~/.xemacs/.customized" custom-unlispify-menu-entries nil custom-unlispify-tag-names nil
custom-variable-default-form 'edit
custom-novice nil)
(let ((term-setup-hook))
(desktop-read))
(load custom-file)