From de36a4b9435f45caa6fab3870c0a6934bd4ee046 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 23 May 2017 20:58:46 +0200 Subject: [PATCH] Emacs: Unbind lesser used commands such as dictionary settings Instead we save the buffer local dictionaries across desktop sessions. --- .emacs.d/lisp/functions.el | 1 - .emacs.d/lisp/main.el | 19 ++++--------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.emacs.d/lisp/functions.el b/.emacs.d/lisp/functions.el index 7ff0f863..7149948a 100644 --- a/.emacs.d/lisp/functions.el +++ b/.emacs.d/lisp/functions.el @@ -332,7 +332,6 @@ WARNING: this may slow down editing on big files." (set-visited-file-name new-name) (set-buffer-modified-p nil) (message "File '%s' successfully renamed to '%s'" name (file-name-nondirectory new-name)))))))) -(define-key mickey-minor-mode-map (kbd "C-x w") 'rename-buffer-and-file) (defun sanitize () "(Un)tabifies according to `indent-tabs-mode', indents and deletes trailing whitespace. diff --git a/.emacs.d/lisp/main.el b/.emacs.d/lisp/main.el index 44417bb1..a5d00a29 100644 --- a/.emacs.d/lisp/main.el +++ b/.emacs.d/lisp/main.el @@ -5,9 +5,7 @@ (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) (menu-bar-mode -1) (when (fboundp 'set-scroll-bar-mode) - (set-scroll-bar-mode 'left) - (scroll-bar-mode -1) - (define-key mickey-minor-mode-map (kbd "C-") 'toggle-scroll-bar)) + (scroll-bar-mode -1)) ;; Remember last cursor position. (require 'saveplace) @@ -71,7 +69,6 @@ ;; Line numbers (add-hook 'find-file-hook (lambda () (linum-mode 1))) -(define-key mickey-minor-mode-map (kbd "C-") 'linum-mode) ;; Emacs-nox does not display a fringe after the linum: Setting linum-format in ;; linum-before-numbering-hook is not the right approach as it will change the ;; type of linum-format in the middle. See linum-update-window. @@ -114,7 +111,7 @@ (lambda () (page-number-mode t))) -(define-key mickey-minor-mode-map (kbd "C-") 'whitespace-mode) +(define-key mickey-minor-mode-map (kbd "") 'whitespace-mode) (setq whitespace-style '(face empty indentation space-after-tab space-before-tab tab-mark trailing)) @@ -162,17 +159,8 @@ (if b b "w3m" ))) browse-url-browser-function 'browse-url-generic) -;; Default ispell dictionnay. If not set, Emacs uses the current locale. +;; Default ispell dictionary. If not set, Emacs uses the current locale. (setq ispell-dictionary "english") -(define-key mickey-minor-mode-map - (kbd "") - (lambda () (interactive) (ispell-change-dictionary "english"))) -(define-key mickey-minor-mode-map - (kbd "") - (lambda () (interactive) (ispell-change-dictionary "francais"))) -(define-key mickey-minor-mode-map - (kbd "") - (lambda () (interactive) (ispell-change-dictionary "svenska"))) ;; Long paragraphs. Useful for quick navigation with backward-paragraph and ;; forward-paragraph. @@ -240,6 +228,7 @@ ;; http://stackoverflow.com/questions/22995203/one-compile-command-per-buffer-not-directory ; (add-to-list 'desktop-locals-to-save 'compile-history) (add-to-list 'desktop-locals-to-save 'compile-command) + (add-to-list 'desktop-locals-to-save 'ispell-local-dictionary) (desktop-save-mode 1)) ;; GMP documentation