chiark / gitweb /
Merge branch 'master' of us:etc/profile
authorMark Wooding <mdw@distorted.org.uk>
Mon, 28 Dec 2015 14:25:35 +0000 (14:25 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 28 Dec 2015 14:25:35 +0000 (14:25 +0000)
* 'master' of us:etc/profile:
  el/dot-emacs.el: Set indent quantum for plain `perl-mode'.

bin/mdw-build
bin/update-buildable-branch [new file with mode: 0755]
dot/gitconfig.in
dot/gnus-local.el.distorted
dot/lisp-init.lisp
el/dot-emacs.el
setup

index 1c51085491d0a4a771b86154bebf9bfa34aa90c2..9717a207ede5906a4c685ee33a55f2b834b62255 100755 (executable)
@@ -315,7 +315,12 @@ if ! tar tf $buildpath/$distdir.tar.gz 2>/dev/null | grep -q RELEASE; then
 fi
 
 run mv $buildpath/$distdir.tar.gz .
-run gpg -u$(mdw-conf releasekey) -ab -o$distdir.tar.gz.gpg $distdir.tar.gz
+case $build in
+  release)
+    run gpg -u$(mdw-conf releasekey) -ab -o$distdir.tar.gz.gpg \
+      $distdir.tar.gz
+    ;;
+esac
 
 ## Maybe build the Debian packages.
 case "$debian" in
diff --git a/bin/update-buildable-branch b/bin/update-buildable-branch
new file mode 100755 (executable)
index 0000000..b7f71ff
--- /dev/null
@@ -0,0 +1,110 @@
+#! /bin/sh -e
+
+fail () {
+  echo >&2 "$0: $*"
+  exit 1
+}
+
+usage () {
+  echo "usage: $0 [-c] [UPSTREAM BUILDABLE]"
+}
+
+fail_usage () {
+  usage >&2
+  exit 1
+}
+
+## Parse the command-line.
+bogusp=nil createp=nil
+unset head new
+while getopts "ch" opt; do
+  case $opt in
+    h) usage; exit 0 ;;
+    c) createp=t ;;
+    *) bogusp=t ;;
+  esac
+done
+shift $(( $OPTIND - 1 ))
+case $# in 0) ;; 1) bogusp=t ;; *) head=$1 new=$2; shift 2 ;; esac
+case $# in 0) ;; *) bogusp=t ;; esac
+case $bogusp in nil) ;; *) fail_usage ;; esac
+
+## Get the current branch name.
+case ${head+t} in
+  t) ;;
+  *)
+    head=$(git symbolic-ref HEAD)
+    case $head in
+      refs/heads/*) head=${head#refs/heads/} ;;
+      *) fail "HEAD is not at a branch head" ;;
+    esac
+    case $head in
+      buildable/*) fail "upstream is already a buildable branch" ;;
+    esac
+    ;;
+esac
+
+## Get the output branch name.
+case ${new+t} in
+  t) ;;
+  *)
+    new=buildable/$head
+    ;;
+esac
+case $createp in
+  t)
+    if git rev-parse $new -- >/dev/null 2>&1; then
+      fail "branch $new already exists"
+    fi
+    old=0000000000000000000000000000000000000000
+    ;;
+  nil)
+    old=$(git rev-parse $new --)
+    ;;
+esac
+
+## Make a temporary place.
+git=$(git rev-parse --git-dir)
+git=$(cd $git && pwd)
+dir=$(mktemp -d)
+trap "cd; rm -rf \"$dir\"" EXIT INT TERM
+cd "$dir"
+mkdir work tmp
+
+## Make a nice clean checkout.
+GIT_INDEX_FILE=$dir/idx; export GIT_INDEX_FILE
+GIT_DIR=$git; export GIT_DIR
+GIT_WORK_TREE=$dir/work; export GIT_WORK_TREE
+git read-tree "$head^{}"
+git checkout-index --all
+
+## Go in, and set stuff up.  The business with `RELEASE' is kinda scungy.
+## Sorry 'bout that.
+cd work
+if ! ver=$(git describe --abbrev=4 "$head^{}" 2>/dev/null); then
+  ver=UNKNOWN
+fi
+echo "$ver" >RELEASE
+mdw-setup
+rm -rf autom4te.cache/ RELEASE
+
+## Pick through newly added symlinks and snap them to real files.
+git ls-files -o | while read f; do
+  if [ -L "$f" ]; then
+    cp "$f" ../tmp/snap
+    mv ../tmp/snap "$f"
+  fi
+done
+
+## Add the new files to the tree.
+commit () {
+  tree=$1; shift
+  case $createp in
+    t) git commit-tree -p "$head^{}" "$@" $tree ;;
+    nil) git commit-tree -p "$new" -p "$head^{}" "$@" $tree ;;
+  esac
+}
+git ls-files -oz | xargs -0r git add -f
+tree=$(git write-tree)
+commit=$(commit $tree -m "Update automatically managed build utilities.")
+git update-ref "refs/heads/$new" $commit $old
index b80bf215f077066f93a9afcf5e8c679c5d5b9a65..c642c132ffe246c8aae766720621b4acaf95b00e 100644 (file)
@@ -12,6 +12,9 @@
        email = mdw@distorted.org.uk
        signingkey = @releasekey@
 
+[annex]
+       sshcaching = false
+
 [merge]
        summary = true
        tool = emerge
index 4f6e014be912c0a617ef46621dd48652437dbf2e..02dea2e1551cd3d32fc632082eff487d2553a87f 100644 (file)
@@ -88,6 +88,7 @@
          (from "cron daemon" "admin.misc")
          (from "uucp@distorted\\.org\\.uk" "admin.uucp")
          (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
+         (from "bugs@distorted\\.org\\.uk" "admin.bugs")
 
          ;; Colo provider.
          (from "\\(accounts\\|support\\)@jump\\.net\\.uk" "keep.colo")
index c77e49444a365a4dff28e272877e0e386b57b8ed..146b25037cf4aa8fabbad230d6d1eab4c6c2874d 100644 (file)
@@ -20,15 +20,33 @@ (setf *load-verbose* nil)
 (setf *compile-verbose* nil)
 #+cmu (setf *gc-verbose* nil)
 
+;; Tell SBCL where to find its source source.
+#+sbcl
+(sb-ext:set-sbcl-source-location #p"/usr/share/sbcl-source/")
+
+;; Tell some Lisps about my home directory.
+#+cmu (ext:clear-search-list "HOME")
+#+(and unix (or sbcl clisp cmu))
+(let* ((#1=#:homestring (or #+sbcl (sb-ext:posix-getenv "HOME")
+                           #+clisp (ext:getenv "HOME")
+                           #+cmu (unix:unix-getenv "HOME")
+                           "/home/mdw"))
+       (#2=#:home (pathname (concatenate 'string #1# "/"))))
+  (setf (logical-pathname-translations "HOME")
+       `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" #2# nil)))
+       (logical-pathname-translations "CL")
+       '(("CL:SOURCE;**;*.*.*" #p"/usr/share/common-lisp/source/**/*.*")
+         ("CL:SYSTEMS;**;*.*.*" #p"/usr/share/common-lisp/systems/**/*.*"))))
+
 ;; Various fixings.
 #+clisp (setf custom:*parse-namestring-ansi* t)
 
 ;; Shebang.
 (set-dispatch-macro-character
  #\# #\!
- (lambda (stream char arg)
-   (declare (ignore char arg))
-   (values (read-line stream))))
+ (lambda (#1=#:stream . #2=(#:char #:arg))
+   (declare (ignore . #2#))
+   (values (read-line #1#))))
 
 ;; Start up swank.
 (defun mdw-hacks:crank-swank (&rest #1=#:args)
index 316b9e050266b8bfe6d5062f6520a684c0db5182..2fb1520d6fd390ce7299018b939ae9f3155a6674 100644 (file)
@@ -810,6 +810,8 @@ (defun mdw-whitespace-mode (&optional arg)
       (whitespace-mode arg))
     (setq show-trailing-whitespace whitespace-mode)))
 
+(defvar mdw-do-misc-mode-hacking nil)
+
 (defun mdw-misc-mode-config ()
   (and mdw-auto-indent
        (cond ((eq major-mode 'lisp-mode)
@@ -819,14 +821,13 @@ (defun mdw-misc-mode-config ()
              nil)
             (t
              (local-set-key "\C-m" 'newline-and-indent))))
+  (set (make-local-variable 'mdw-do-misc-mode-hacking) t)
   (local-set-key [C-return] 'newline)
   (make-local-variable 'page-delimiter)
   (setq page-delimiter "\f\\|^.*-\\{6\\}.*$")
   (setq comment-column 40)
   (auto-fill-mode 1)
   (setq fill-column 77)
-  (setq show-trailing-whitespace t)
-  (mdw-whitespace-mode 1)
   (and (fboundp 'gtags-mode)
        (gtags-mode))
   (if (fboundp 'hs-minor-mode)
@@ -835,8 +836,17 @@ (defun mdw-misc-mode-config ()
   (reveal-mode t)
   (trap (turn-on-font-lock)))
 
-(defun mdw-post-config-mode-hack ()
-  (mdw-whitespace-mode 1))
+(defun mdw-post-local-vars-misc-mode-config ()
+  (when (and mdw-do-misc-mode-hacking
+            (not buffer-read-only))
+    (setq show-trailing-whitespace t)
+    (mdw-whitespace-mode 1)))
+(add-hook 'hack-local-variables-hook 'mdw-post-local-vars-misc-mode-config)
+
+(defadvice toggle-read-only (after mdw-angry-fruit-salad activate)
+  (when mdw-do-misc-mode-hacking
+    (setq show-trailing-whitespace (not buffer-read-only))
+    (mdw-whitespace-mode (if buffer-read-only 0 1))))
 
 (eval-after-load 'gtags
   '(progn
@@ -1226,7 +1236,7 @@ (mdw-define-face whizzy-error-face
 (mdw-define-face mdw-ellipsis-face
   (((type tty)) :foreground "blue") (t :foreground "grey60"))
 (let ((dollar (make-glyph-code ?$ 'mdw-ellipsis-face))
-      (backslash (make-glyph-code ?\ 'mdw-ellipsis-face))
+      (backslash (make-glyph-code ?\\ 'mdw-ellipsis-face))
       (dot (make-glyph-code ?. 'mdw-ellipsis-face))
       (bar (make-glyph-code ?| mdw-ellipsis-face)))
   (set-display-table-slot standard-display-table 0 dollar)
@@ -1461,9 +1471,7 @@ (defun mdw-fontify-c-and-c++ ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face))))
-
-    (mdw-post-config-mode-hack)))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; AP calc mode.
@@ -1515,9 +1523,7 @@ (defun mdw-fontify-apcalc ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Java programming configuration.
@@ -1583,9 +1589,7 @@ (defun mdw-fontify-java ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Javascript programming configuration.
@@ -1643,9 +1647,7 @@ (defun mdw-fontify-javascript ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Scala programming configuration.
@@ -1718,9 +1720,7 @@ (defun mdw-fontify-scala ()
                         "\\|" "\\\\" "." "\\)"
                         "\\('\\)")
                 '(1 "\"")
-                '(4 "\"")))))
-
-  (mdw-post-config-mode-hack))
+                '(4 "\""))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; C# programming configuration.
@@ -1791,9 +1791,7 @@ (defun mdw-fontify-csharp ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 (define-derived-mode csharp-mode java-mode "C#"
   "Major mode for editing C# code.")
@@ -1908,9 +1906,7 @@ (defun mdw-fontify-fsharp ()
                      '(0 mdw-number-face))
 
                (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                     '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                     '(0 mdw-punct-face))))))
 
 (defun mdw-fontify-inferior-fsharp ()
   (mdw-fontify-fsharp)
@@ -1979,9 +1975,7 @@ (defun mdw-fontify-go ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Rust programming configuration.
@@ -2057,10 +2051,7 @@ (defun mdw-fontify-rust ()
 
   ;; Hack key bindings.
   (local-set-key [?{] 'mdw-self-insert-and-indent)
-  (local-set-key [?}] 'mdw-self-insert-and-indent)
-
-  ;; Final hacking.
-  (mdw-post-config-mode-hack))
+  (local-set-key [?}] 'mdw-self-insert-and-indent))
 
 ;;;--------------------------------------------------------------------------
 ;;; Awk programming configuration.
@@ -2118,9 +2109,7 @@ (defun mdw-fontify-awk ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Perl programming style.
@@ -2182,9 +2171,7 @@ (defun mdw-fontify-perl ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 (defun perl-number-tests (&optional arg)
   "Assign consecutive numbers to lines containing `#t'.  With ARG,
@@ -2227,9 +2214,7 @@ (defun mdw-fontify-pythonic (keywords)
 
         ;; And anything else is punctuation.
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-              '(0 mdw-punct-face))))
-
-  (mdw-post-config-mode-hack))
+              '(0 mdw-punct-face)))))
 
 ;; Define Python fontification styles.
 
@@ -2303,9 +2288,7 @@ (defun mdw-fontify-icon ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Assembler mode.
@@ -2339,8 +2322,7 @@ (defun mdw-fontify-tcl ()
                       "\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
               '(0 mdw-number-face))
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-              '(0 mdw-punct-face))))
-  (mdw-post-config-mode-hack))
+              '(0 mdw-punct-face)))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Dylan programming configuration.
@@ -2406,9 +2388,7 @@ (defun mdw-fontify-dylan ()
                              "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\|"
                              "\\_<[-+*/=<>:&|]+\\_>"
                              "\\)")
-                     '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                     '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Algol 68 configuration.
@@ -2450,9 +2430,7 @@ (defun mdw-fontify-algol-68 ()
                              "\\>")
                      '(0 mdw-number-face))
                (list "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/"
-                     '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                     '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; REXX configuration.
@@ -2525,9 +2503,7 @@ (defun mdw-fontify-rexx ()
 
           ;; And everything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Standard ML programming style.
@@ -2577,9 +2553,7 @@ (defun mdw-fontify-sml ()
 
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Haskell configuration.
@@ -2657,9 +2631,7 @@ (defun mdw-fontify-haskell ()
                         "\\([eE]\\([-+]\\|\\)[0-9]+\\|\\)")
                 '(0 mdw-number-face))
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Erlang configuration.
@@ -2692,9 +2664,7 @@ (defun mdw-fontify-erlang ()
           (list "\\<[0-9]+\\(\\|#[0-9a-zA-Z]+\\|[eE][+-]?[0-9]+\\)\\>"
                 '(0 mdw-number-face))
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                '(0 mdw-punct-face)))))
-
-  (mdw-post-config-mode-hack))
+                '(0 mdw-punct-face))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Texinfo configuration.
@@ -2728,9 +2698,7 @@ (defun mdw-fontify-texinfo ()
 
         ;; Fontify TeX special characters as punctuation.
         (list "[{}]+"
-              '(0 mdw-punct-face))))
-
-  (mdw-post-config-mode-hack))
+              '(0 mdw-punct-face)))))
 
 ;;;--------------------------------------------------------------------------
 ;;; TeX and LaTeX configuration.
@@ -2796,9 +2764,7 @@ (defun mdw-fontify-tex ()
 
         ;; Fontify TeX special characters as punctuation.
         (list "[$^_{}#&]"
-              '(0 mdw-punct-face))))
-
-  (mdw-post-config-mode-hack))
+              '(0 mdw-punct-face)))))
 
 ;;;--------------------------------------------------------------------------
 ;;; SGML hacking.
@@ -3158,8 +3124,7 @@ (defun mdw-fontify-smalltalk ()
                       "\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
               '(0 mdw-number-face))
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-              '(0 mdw-punct-face))))
-  (mdw-post-config-mode-hack))
+              '(0 mdw-punct-face)))))
 
 ;; Lispy languages.
 
@@ -3216,9 +3181,7 @@ (defun mdw-fontify-lispy ()
                            "\\)\\_>")
                    '(0 mdw-number-face))
              (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-                   '(0 mdw-punct-face))))
-
-  (mdw-post-config-mode-hack))
+                   '(0 mdw-punct-face)))))
 
 (defun comint-send-and-indent ()
   (interactive)
diff --git a/setup b/setup
index 6504cbb30e755e7036b50d909da9b9c6ad7cae24..004b9fd48746eb5b607f2361d8221e8387002483 100755 (executable)
--- a/setup
+++ b/setup
@@ -258,6 +258,7 @@ scripts="
   mdw-pager
   mdw-conf
   mdw-build
+  update-buildable-branch
   emacsclient-hack
   movemail-hack
   sendmail-hack