;;; Some general utilities.
(eval-when-compile
- (unless (fboundp 'make-regexp)
- (load "make-regexp"))
+ (unless (fboundp 'make-regexp) (load "make-regexp"))
(require 'cl))
(defmacro mdw-regexps (&rest list)
;; Functions for sexp diary entries.
+(defvar mdw-diary-for-org-mode-p nil
+ "Display diary along with the agenda?")
+
(defun mdw-not-org-mode (form)
"As FORM, but not in Org mode agenda."
(and (not mdw-diary-for-org-mode-p)
(nth 2 when))))))))
(eq w d)))
-(defvar mdw-diary-for-org-mode-p nil
- "Display diary along with the agenda?")
-
(defadvice org-agenda-list (around mdw-preserve-links activate)
(let ((mdw-diary-for-org-mode-p t))
ad-do-it))
(let ((auto-revert-check-vc-info t))
(auto-revert-buffers)))
-(defun comint-send-and-indent ()
- (interactive)
- (comint-send-input)
- (and mdw-auto-indent
- (indent-for-tab-command)))
-
-(defadvice comint-line-beginning-position
- (around mdw-calculate-it-properly () activate compile)
- "Calculate the actual line start for multi-line input."
- (if (or comint-use-prompt-regexp
- (eq (field-at-pos (point)) 'output))
- ad-do-it
- (setq ad-return-value
- (constrain-to-field (line-beginning-position) (point)))))
-
;;;--------------------------------------------------------------------------
;;; Dired hacking.
(setq-default cperl-indent-level 2
cperl-continued-statement-offset 2
+ cperl-indent-region-fix-constructs nil
cperl-continued-brace-offset 0
cperl-brace-offset -2
cperl-brace-imaginary-offset 0
;;;--------------------------------------------------------------------------
;;; HTML, CSS, and other web foolishness.
-(setq-default css-indent-offset 2)
+(setq-default css-indent-offset 8)
;;;--------------------------------------------------------------------------
;;; SGML hacking.
(if mdw-friendly-name (setq ad-return-value mdw-friendly-name)
ad-do-it))
-(trap
- (if (not mdw-fast-startup)
- (progn
- (require 'slime-autoloads)
- (slime-setup '(slime-autodoc slime-c-p-c)))))
+(eval-and-compile
+ (trap
+ (if (not mdw-fast-startup)
+ (progn
+ (require 'slime-autoloads)
+ (slime-setup '(slime-autodoc slime-c-p-c))))))
(let ((stuff '((cmucl ("cmucl"))
(sbcl ("sbcl") :coding-system utf-8-unix)
(auto-fill-mode -1)
(setq tab-width 8))
+(defun comint-send-and-indent ()
+ (interactive)
+ (comint-send-input)
+ (and mdw-auto-indent
+ (indent-for-tab-command)))
+
+(defadvice comint-line-beginning-position
+ (around mdw-calculate-it-properly () activate compile)
+ "Calculate the actual line start for multi-line input."
+ (if (or comint-use-prompt-regexp
+ (eq (field-at-pos (point)) 'output))
+ ad-do-it
+ (setq ad-return-value
+ (constrain-to-field (line-beginning-position) (point)))))
+
(defun term-send-meta-right () (interactive) (term-send-raw-string "\e\e[C"))
(defun term-send-meta-left () (interactive) (term-send-raw-string "\e\e[D"))
(defun term-send-ctrl-uscore () (interactive) (term-send-raw-string "\C-_"))
(set-window-dedicated-p (or window (selected-window)) nil))
;;;--------------------------------------------------------------------------
+;;; SQL stuff.
+
+(setq sql-postgres-options '("-n" "-P" "pager=off")
+ sql-postgres-login-params
+ '((user :default "mdw")
+ (database :default "mdw")
+ (server :default "db.distorted.org.uk")))
+
+;;;--------------------------------------------------------------------------
;;; Man pages.
;; Turn off `noip' when running `man': it interferes with `man-db''s own