chiark / gitweb /
dot/emacs, el/dot-emacs.el: Switch to using the `cl-lib' package.
[profile] / dot / emacs
index 220fdd4e93831284665e2593591509cd5ca894a5..b78c03c7a88724e980f2f2617c79a1fab601d228 100644 (file)
--- 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)
 (require 'paren)
 (trap (show-paren-mode t))
 (or window-system (mdw-emacs-version-p 22) (menu-bar-mode -1))
-(setq x-select-enable-clipboard nil
-      x-select-enable-primary t
-      mouse-drag-copy-region t)
+(if (eq window-system 'x)
+    (setq x-select-enable-clipboard nil
+         x-select-enable-primary t))
+(setq mouse-drag-copy-region t)
 
 ;; Multiple cursors.
 
      (not (and (fboundp 'daemonp) (daemonp)))
      (progn (setq server-temp-file-regexp (concat "^" tmpdir "\\|/draft$")
                  edit-server-new-frame nil
+                 server-raise-frame nil
                  gnuserv-frame t)
            (trap (let ((warning-suppress-types
                         (cons '(server)
 
 (trap (resize-minibuffer-mode 1))      ;Make minibuffer grow dynamically
 (auto-compression-mode 1)              ;Enable automatic compression
+(xterm-mouse-mode 1)
 (setq enable-local-variables :safe
       enable-local-eval nil)
 (setq dabbrev-case-replace nil)                ;Retain case when completing
 (setq linum-format "%7d ")
 (setq next-line-add-newlines nil)      ;Don't add weird newlines
 (setq split-height-threshold nil)      ;Reuse windows where sensible
-(setq display-buffer-reuse-frames nil  ;Don't confuse me by showing buffers
-      iswitchb-default-method 'samewindow ;in other random frames
-      ido-default-file-method 'selected-window
-      ido-default-buffer-method 'selected-window)
+(setq compilation-scroll-output 'first-error)
+(setq iswitchb-default-method 'samewindow ;Don't confuse me by showing
+      ido-default-file-method 'selected-window ;buffers in other random
+      ido-default-buffer-method 'selected-window) ;frames
 (setq ido-enable-prefix t
       ido-enable-flex-matching t
       ido-everywhere t
 (setq find-ls-option                   ;Build file lists efficiently
       '("-print0 | xargs -0r ls -ld" . "ld"))
 (setq bookmark-save-flag 0)            ;Save bookmarks automatically
+(setq ediff-grab-mouse nil)
 (setq vc-follow-symlinks t
       vc-git-resolve-conflicts nil)
 (setq x-gtk-file-dialog-help-text nil)
                    ("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
 
 (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")
 
 (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)