X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/9749c2677b05e3ae21f1f06df2596a7436a468fc..f28a37275758598d089daa908bde2a042a88c4a9:/dot/emacs diff --git a/dot/emacs b/dot/emacs index da7d116..ea5a476 100644 --- a/dot/emacs +++ b/dot/emacs @@ -33,7 +33,7 @@ (if (file-exists-p boot) (load boot)))) -(require 'cl) +(require 'cl-lib) (require 'dot-emacs) (unless (mdw-emacs-version-p 25) @@ -141,11 +141,14 @@ edit-server-new-frame nil server-raise-frame nil gnuserv-frame t) - (trap (let ((warning-suppress-types - (cons '(server) - (and (boundp 'warning-suppress-types) - warning-suppress-types)))) - (server-start))) + (trap (progn + (require 'server) + (let ((state (server-running-p))) + (if state + (message "Emacs server %s: not starting" + (cond ((eq state t) "already running") + (t "maybe running"))) + (server-start))))) (trap (progn (require 'edit-server) (edit-server-start) @@ -385,7 +388,9 @@ wdired-allow-to-change-permissions 'advanced) (setq read-quoted-char-radix 16) ;C-q HEX-STUFF [RET] (setq case-fold-file-names nil) ;Don't translate file names (grr...) -(setq scroll-step 5) ;Don't scroll too much at a time +(setq scroll-step 5 ;Don't scroll too much at a time + hscroll-step 8 + auto-hscroll-mode 'current-line) (setq custom-unlispify-tag-names nil ;Display variable names properly custom-unlispify-menu-entries nil custom-buffer-done-kill t) @@ -510,7 +515,8 @@ (setq browse-url-browser-function (mdw-good-url-browser) browse-url-generic-program "mdw-chrome" - browse-url-mozilla-program "mdw-iceweasel") + browse-url-firefox-program "mdw-iceweasel" + browse-url-mozilla-program browse-url-firefox-program) (setq w3m-default-display-inline-images t w3m-use-cookies t) @@ -520,8 +526,8 @@ ("application/x-pdf" "\\.pdf\\'" ("xdg-open" file) nil)))) (dolist (e entries) (setq w3m-content-type-alist - (cons e (remove* (car e) w3m-content-type-alist - :key #'car :test #'string=)))))) + (cons e (cl-remove (car e) w3m-content-type-alist + :key #'car :test #'string=)))))) (setq w3-do-incremental-display t w3-use-menus '(file edit view go bookmark options @@ -774,6 +780,7 @@ (global-set-key [?\C-c ?w ?b] 'w3m-bookmark-view) (global-set-key [?\C-c ?w ?c] 'mdw-set-frame-colour) (global-set-key [?\C-c ?w ?d] 'mdw-divvy-window) + (global-set-key [?\C-c ?w ?f] 'mdw-set-fallback-window) (global-set-key [?\C-c ?w ?h] 'windmove-left) (global-set-key [?\C-c ?w ?j] 'windmove-down) (global-set-key [?\C-c ?w ?k] 'windmove-up) @@ -813,10 +820,10 @@ (eval-after-load "hippie-exp" '(setq hippie-expand-try-functions-list - (remove-if (lambda (name) - (memq name '(try-expand-list - try-expand-list-all-buffers))) - hippie-expand-try-functions-list))) + (cl-remove-if (lambda (name) + (memq name '(try-expand-list + try-expand-list-all-buffers))) + hippie-expand-try-functions-list))) (autoload 'dired-jump "dired-x") (autoload 'dired-jump-other-window "dired-x") @@ -909,9 +916,9 @@ (setq completion-ignored-extensions (append `(".hc" ".hi") completion-ignored-extensions)) -(dolist (dir (remove-if-not (lambda (ext) - (= (aref ext (- (length ext) 1)) ?/)) - completion-ignored-extensions)) +(dolist (dir (cl-remove-if-not (lambda (ext) + (= (aref ext (- (length ext) 1)) ?/)) + completion-ignored-extensions)) (if (/= (aref dir 0) ?/) (setq completion-ignored-extensions (cons (concat "/" dir)