X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/6c0b60796d4e0c7ada1c0673e90e74e0a8462c77..a2cb2ff4217f955f1cfbc836927f8a9f8f57b9eb:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 67a5d1e..bc512b4 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -55,8 +55,7 @@ This may be at the expense of cool features.") ;;; 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) @@ -1096,21 +1095,6 @@ tramp, which seems to get itself into a twist." (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. @@ -3153,6 +3137,7 @@ name, as a symbol." (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 @@ -4244,7 +4229,7 @@ strip numbers instead." ;;;-------------------------------------------------------------------------- ;;; HTML, CSS, and other web foolishness. -(setq-default css-indent-offset 2) +(setq-default css-indent-offset 8) ;;;-------------------------------------------------------------------------- ;;; SGML hacking. @@ -4807,11 +4792,12 @@ align the other subforms beneath it. Otherwise, indent them (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) @@ -4943,6 +4929,21 @@ align the other subforms beneath it. Otherwise, indent them (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-_")) @@ -5098,6 +5099,15 @@ there is sadness." (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