chiark / gitweb /
dot-emacs.el: Fix complicated prefix-argument handling for compilation.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 21 Jul 2017 08:38:21 +0000 (09:38 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 21 Jul 2017 08:38:21 +0000 (09:38 +0100)
When I was setting this up, I stupidly forgot that the default is 1, not
zero.  Use the 8 bit, not the 1 bit, for interactiveness.

el/dot-emacs.el

index 93cec991399651715731a525c4931c8372d43bde..efbc6ee10e1414f9aff693735e094944fdfe348b 100644 (file)
@@ -321,13 +321,13 @@ (defun mdw-compile (command &optional directory comint)
 the prefix argument.  Prompt for the directory, and run
 interactively, if requested through the prefix.
 
 the prefix argument.  Prompt for the directory, and run
 interactively, if requested through the prefix.
 
-Use a prefix of 4, 5, 6, or 7, or type C-u between one and three times, to
+Use a prefix of 4, 6, 12, or 14, or type C-u between one and three times, to
 force prompting for a directory.
 
 force prompting for a directory.
 
-Use a prefix of 2, 3, 6, or 7, or type C-u three times, to force
+Use a prefix of 2, 6, 10, or 14, or type C-u three times, to force
 prompting for the command.
 
 prompting for the command.
 
-Use a prefix of 1, 3, 5, or 7, or type C-u twoce or three times,
+Use a prefix of 8, 10, 12, or 14, or type C-u twice or three times,
 to force interactive compilation."
   (interactive
    (let* ((prefix (prefix-numeric-value current-prefix-arg))
 to force interactive compilation."
   (interactive
    (let* ((prefix (prefix-numeric-value current-prefix-arg))
@@ -339,7 +339,7 @@ (defun mdw-compile (command &optional directory comint)
               (compilation-read-command command)
             command)
           dir
               (compilation-read-command command)
             command)
           dir
-          (plusp (logand prefix #x51)))))
+          (plusp (logand prefix #x58)))))
   (let ((default-directory (or directory default-directory)))
     (compile command comint)))
 
   (let ((default-directory (or directory default-directory)))
     (compile command comint)))