;; make backup files in ~/.backups/ rather than scattered around all ;; over the filesystem. (defun make-backup-file-name (file-name) "Create the non-numeric backup file name for `file-name'." (require 'dired) (if (file-exists-p "~/backups") (concat (expand-file-name "~/backups/") (replace-regexp "/" "_" file-name)) (dired-replace-in-string "/" "|" file-name)) (concat file-name "~")) (add-hook 'server-switch-hook (function (lambda() (cond ((string-match "Post" mode-name) (post-goto-body))))))