Merge remote-tracking branches 'crybaby/master', 'gibson/master' and 'mdwdev/master'
authorMark Wooding <mdw@distorted.org.uk>
Sun, 3 Oct 2021 14:24:02 +0000 (15:24 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 3 Oct 2021 14:24:02 +0000 (15:24 +0100)
* crybaby/master:
  dot/swank.lisp: Only force `:fd-handler' on Lisps which can do it.
  dot/emacs: Add Viper cursor-colour flail.
  dot/emacs: Apply Viper settings as the defaults.
  dot/emacs, el/dot-emacs.el: Set up Viper mode.

* gibson/master:
  firefox/stylus/Scribd Reveal.css: Hack to override Scribd sign-in bollocks.
  firefox/stylus/*.css: New styles for Fandom and Vridar.
  el/dot-emacs.el: Add a switch for the `--rebase-merges' option.
  dot/emacs: Move the cursor properly.

* mdwdev/master:
  firefox/stylus/: Add styling for Trustonic's awful Confluence wiki.
  el/dot-emacs.el: Move the comment indentation weirdness to Alec-emulation.

dot/emacs
dot/swank.lisp
el/dot-emacs.el
firefox/stylus/Scribd Reveal.css [new file with mode: 0644]
firefox/stylus/fandom.com.css [new file with mode: 0644]
firefox/stylus/vridar.org.css [new file with mode: 0644]
firefox/stylus/wiki.trustonic.internal.css [new file with mode: 0644]

index 370cfee..ad17a56 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 (setq-default comment-column 40)       ;Set a standard comment column
 (setq-default truncate-partial-width-windows nil
              truncate-lines t)
+(setq line-move-visual t
+      visual-order-cursor-movement t)
 (setq default-indicate-empty-lines t)
 (setq view-read-only t)
 (setq-default view-exit-action #'kill-buffer)
       '(("en_GB-ize-w_accents" "[[:alpha:]]" "[^[:alpha:]]" "'" t
         ("-d" "en_GB-ize-w_accents") nil utf-8))
       ispell-silently-savep t)
+(setq-default viper-case-fold-search t
+             viper-electric-mode t
+             viper-ex-style-motion nil
+             viper-ex-style-editing nil
+             viper-expert-level 5
+             viper-inhibit-startup-message t
+             ;;viper-insert-state-cursor-color "red"
+             viper-no-multiple-ESC nil
+             viper-re-query-replace t
+             viper-re-search t
+             ;;viper-replace-overlay-cursor-color "red"
+             viper-shift-width 2
+             viper-vi-style-in-minibuffer nil
+             viper-want-ctl-h-help t)
 (trap
   (require 'uniquify)
   (setq uniquify-buffer-name-style 'post-forward-angle-brackets)
   (tool-bar-mode 0))
 (trap (or mdw-fast-startup (global-auto-revert-mode t)))
 
+(defun mdw-set-viper-cursor-colour ()
+  ;; ?? doesn't seem to work
+  (set-frame-parameter nil 'cursor-color "green")
+  (message ";; %S" post-command-hook)
+  (sit-for 2))
+;;(add-hook 'viper-vi-state-hook 'mdw-set-viper-cursor-colour)
+
 (defvar mdw-black-background t)
 
 (eval-after-load "outline"
index 904a984..cbac155 100644 (file)
@@ -3,9 +3,9 @@
 #+mdw (cl:in-package #:mdw-hacks)
 
 ;; Miscellaneous configuration.
-(setf swank:*communication-style* :fd-handler
-      swank:*dont-close* t
+(setf swank:*dont-close* t
       *print-right-margin* 77)
+#+(or sbcl cmu) (setf swank:*communication-style* :fd-handler)
 
 ;; Maybe inhibit some Swank extensions.
 (let ((forbidden-contribs
index 74ced5a..e3e1b7c 100644 (file)
@@ -1678,6 +1678,15 @@ doesn't match any of the regular expressions in
   (((class color)) :background "cyan")
   (t :inverse-video t))
 
+(mdw-define-face viper-minibuffer-emacs (t nil))
+(mdw-define-face viper-minibuffer-insert (t nil))
+(mdw-define-face viper-minibuffer-vi (t nil))
+(mdw-define-face viper-replace-overlay
+  (((min-colors 64)) :background "darkred")
+  (((class color)) :background "red")
+  (t :inverse-video t))
+(mdw-define-face viper-search (t :inherit isearch))
+
 (mdw-define-face holiday-face
   (t :background "red"))
 (mdw-define-face calendar-today-face
@@ -2208,14 +2217,14 @@ set."
 
 (mdw-define-c-style mdw-trustonic-c (mdw-c)
   (c-basic-offset . 4)
-  (c-indent-comment-alist (anchored-comment . (column . 0))
-                         (end-block . (space . 1))
-                         (cpp-end-block . (space . 1))
-                         (other . (space . 1)))
   (c-offsets-alist (access-label . -2)))
 
 (mdw-define-c-style mdw-trustonic-alec-c (mdw-trustonic-c)
   (comment-column . 0)
+  (c-indent-comment-alist (anchored-comment . (column . 0))
+                         (end-block . (space . 1))
+                         (cpp-end-block . (space . 1))
+                         (other . (space . 1)))
   (c-offsets-alist (arglist-cont-nonempty . mdw-c-indent-arglist-nested)))
 
 (defun mdw-set-default-c-style (modes style)
@@ -4978,7 +4987,9 @@ This allows you to pass a list of arguments through `ansi-term'."
                           magit-diff-refresh-popup
                           magit-diff-mode-refresh-popup
                           magit-revision-mode-refresh-popup))
-           (magit-define-popup-switch popup ?R "Reverse diff" "-R"))))
+           (magit-define-popup-switch popup ?R "Reverse diff" "-R"))
+         (magit-define-popup-switch 'magit-rebase-popup ?r
+                                    "Rebase merges" "--rebase-merges")))
 
 (defadvice magit-wip-commit-buffer-file
     (around mdw-just-this-buffer activate compile)
diff --git a/firefox/stylus/Scribd Reveal.css b/firefox/stylus/Scribd Reveal.css
new file mode 100644 (file)
index 0000000..1699d53
--- /dev/null
@@ -0,0 +1,26 @@
+/* -*-css-*- */
+/*@ urlPrefixes: https://www.scribd.com/doc/, https://www.scribd.com/document/ */
+/*@ start:  */
+.autogen_class_views_pdfs_page_blur_promo {
+  display: none!important;
+}
+div.text_layer {
+  text-shadow: black 0 0 0!important;
+  -webkit-user-select: text;
+  -moz-user-select: text;
+  -ms-user-select: text;
+  user-select: text;
+}
+.page_missing_explanation {
+  display: none!important;
+}
+.trial_upsell {
+  display: none!important;
+}
+.autogen_class_views_pdfs_show.has_toolbar_nag .document_column .document_scroller {
+  top: 50px;
+}
+div.image_layer .absimg {
+  opacity: 1!important;
+}
+/*@END*/
diff --git a/firefox/stylus/fandom.com.css b/firefox/stylus/fandom.com.css
new file mode 100644 (file)
index 0000000..7ba2b2e
--- /dev/null
@@ -0,0 +1,4 @@
+/* -*-css-*- */
+/*@ domains: fandom.com */
+body { overflow: scroll !important; }
+/*@END*/
diff --git a/firefox/stylus/vridar.org.css b/firefox/stylus/vridar.org.css
new file mode 100644 (file)
index 0000000..e5bd41b
--- /dev/null
@@ -0,0 +1,13 @@
+/* -*-css-*- */
+/*@ domains: vridar.org */
+a:hover { border: 0 !important; }
+.tagcloud a:hover { border: solid 1px !important; }
+a:visited { color: #0000d8 !important; }
+a:link, a:hover { color: #007ac8 !important; }
+.site-content { font-size: inherit; }
+body { font-family: serif; }
+h1, h2, h3, h4, h5, h6 {
+        font-family: sans-serif;
+        font-weight: bold;
+}
+/*@END*/
diff --git a/firefox/stylus/wiki.trustonic.internal.css b/firefox/stylus/wiki.trustonic.internal.css
new file mode 100644 (file)
index 0000000..2515ee1
--- /dev/null
@@ -0,0 +1,8 @@
+/* -*-css-*- */
+/*@ domains: wiki.trustonic.internal */
+body { font-family: inherit; font-size: 11pt; }
+h1, h2, h3, h4 { font-family: sans-serif; font-weight: bold; }
+.aui-button, .aui-nav-link, .aui-nav-imagelimk, .user-mention, [role=menu]
+        { font-family: sans-serif !important; }
+code, kbd, pre { font-family: monospace; font-size: 9pt; }
+/*@END*/