tweaks
This commit is contained in:
parent
a8698dbc9f
commit
0541b7f796
@ -1,4 +1,4 @@
|
|||||||
* General Configuation
|
* General
|
||||||
** Lexical Binding
|
** Lexical Binding
|
||||||
This makes it so that the file that is produced from tangling this file uses lexical scoping
|
This makes it so that the file that is produced from tangling this file uses lexical scoping
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -262,7 +262,7 @@ These definitions silence the byte-compiler
|
|||||||
;; y and n instead of yes and no
|
;; y and n instead of yes and no
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* emacs-lisp
|
* Lisp
|
||||||
** An emacs version predicate builder:
|
** An emacs version predicate builder:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defmacro imalison:emacs-version-predicate (major-version minor-version)
|
(defmacro imalison:emacs-version-predicate (major-version minor-version)
|
||||||
@ -2404,7 +2404,6 @@ I use helm for almost all emacs completion
|
|||||||
|
|
||||||
(use-package hackernews :commands hackernews)
|
(use-package hackernews :commands hackernews)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Keybindings
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(bind-key "M-q" 'fill-or-unfill-paragraph)
|
(bind-key "M-q" 'fill-or-unfill-paragraph)
|
||||||
(bind-key "C-c C-s" 'sudo-edit)
|
(bind-key "C-c C-s" 'sudo-edit)
|
||||||
@ -2502,14 +2501,14 @@ Set the character used to represent spaces to ·, and the character used for tab
|
|||||||
** TODO Finish making the following litarate
|
** TODO Finish making the following litarate
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; Themes
|
;; Themes
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
|
|
||||||
;; These can be overriden in custom-before.el
|
;; These can be overriden in custom-before.el
|
||||||
(defvar imalison:light-theme 'solarized-light)
|
(defvar imalison:light-theme 'solarized-light)
|
||||||
(defvar imalison:dark-theme 'material)
|
(defvar imalison:dark-theme 'material)
|
||||||
(use-package theme-changer
|
(use-package theme-changer
|
||||||
:disabled t
|
:disabled t
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
@ -2518,25 +2517,25 @@ Set the character used to represent spaces to ·, and the character used for tab
|
|||||||
(setq calendar-latitude latitude)
|
(setq calendar-latitude latitude)
|
||||||
(setq calendar-longitude longitude))))
|
(setq calendar-longitude longitude))))
|
||||||
|
|
||||||
(defun imalison:set-font-height ()
|
(defun imalison:set-font-height ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((new-height (read-face-attribute 'default :height (selected-frame))))
|
(let ((new-height (read-face-attribute 'default :height (selected-frame))))
|
||||||
(set-face-attribute 'default nil :height new-height)))
|
(set-face-attribute 'default nil :height new-height)))
|
||||||
|
|
||||||
(defvar imalison:linum-format)
|
(defvar imalison:linum-format)
|
||||||
|
|
||||||
(make-variable-buffer-local 'imalison:linum-format)
|
(make-variable-buffer-local 'imalison:linum-format)
|
||||||
(defun imalison:linum-before-numbering-hook ()
|
(defun imalison:linum-before-numbering-hook ()
|
||||||
(setq imalison:linum-format
|
(setq imalison:linum-format
|
||||||
(concat "%" (number-to-string
|
(concat "%" (number-to-string
|
||||||
(max (length
|
(max (length
|
||||||
(number-to-string
|
(number-to-string
|
||||||
(count-lines (point-min) (point-max)))) 3)) "d")))
|
(count-lines (point-min) (point-max)))) 3)) "d")))
|
||||||
|
|
||||||
(defun imalison:format-linum (line-text)
|
(defun imalison:format-linum (line-text)
|
||||||
(propertize (format imalison:linum-format line-text) 'face 'linum))
|
(propertize (format imalison:linum-format line-text) 'face 'linum))
|
||||||
|
|
||||||
(defun imalison:remove-fringe-and-hl-line-mode (&rest _stuff)
|
(defun imalison:remove-fringe-and-hl-line-mode (&rest _stuff)
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
|
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
|
||||||
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
||||||
@ -2547,31 +2546,31 @@ Set the character used to represent spaces to ·, and the character used for tab
|
|||||||
(setq left-margin-width 0)
|
(setq left-margin-width 0)
|
||||||
(defvar-setq hl-line-mode nil))
|
(defvar-setq hl-line-mode nil))
|
||||||
|
|
||||||
(defun imalison:after-load-theme (&rest _args)
|
(defun imalison:after-load-theme (&rest _args)
|
||||||
(when (fboundp 'powerline-reset)
|
(when (fboundp 'powerline-reset)
|
||||||
(powerline-reset))
|
(powerline-reset))
|
||||||
(set-face-background 'fringe (face-background 'default))
|
(set-face-background 'fringe (face-background 'default))
|
||||||
(imalison:restore-ansi-term-color-vector))
|
(imalison:restore-ansi-term-color-vector))
|
||||||
|
|
||||||
(when t
|
(when t
|
||||||
(if
|
(if
|
||||||
(advice-add 'load-theme :after #'imalison:after-load-theme)
|
(advice-add 'load-theme :after #'imalison:after-load-theme)
|
||||||
(defadvice load-theme (after name activate)
|
(defadvice load-theme (after name activate)
|
||||||
(imalison:after-load-theme))))
|
(imalison:after-load-theme))))
|
||||||
|
|
||||||
(when (file-exists-p custom-after-file) (load custom-after-file))
|
(when (file-exists-p custom-after-file) (load custom-after-file))
|
||||||
|
|
||||||
(defvar imalison:ansi-term-color-vector ansi-term-color-vector)
|
(defvar imalison:ansi-term-color-vector ansi-term-color-vector)
|
||||||
|
|
||||||
(defun imalison:ansi-term-color-vector-broken? ()
|
(defun imalison:ansi-term-color-vector-broken? ()
|
||||||
(--some (or (eq it 'unspecified) (not (symbolp it)))
|
(--some (or (eq it 'unspecified) (not (symbolp it)))
|
||||||
(append ansi-term-color-vector nil)))
|
(append ansi-term-color-vector nil)))
|
||||||
|
|
||||||
(defun imalison:restore-ansi-term-color-vector (&optional force)
|
(defun imalison:restore-ansi-term-color-vector (&optional force)
|
||||||
(when (or force (imalison:ansi-term-color-vector-broken?))
|
(when (or force (imalison:ansi-term-color-vector-broken?))
|
||||||
(setq ansi-term-color-vector imalison:ansi-term-color-vector)))
|
(setq ansi-term-color-vector imalison:ansi-term-color-vector)))
|
||||||
|
|
||||||
(defun imalison:appearance (&optional frame)
|
(defun imalison:appearance (&optional frame)
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "called set appearance")
|
(message "called set appearance")
|
||||||
(if (display-graphic-p)
|
(if (display-graphic-p)
|
||||||
@ -2586,10 +2585,10 @@ Set the character used to represent spaces to ·, and the character used for tab
|
|||||||
(imalison:remove-fringe-and-hl-line-mode)
|
(imalison:remove-fringe-and-hl-line-mode)
|
||||||
(message "finished set appearance"))
|
(message "finished set appearance"))
|
||||||
|
|
||||||
;; This is needed because you can't set the font or theme at daemon start-up.
|
;; This is needed because you can't set the font or theme at daemon start-up.
|
||||||
;; (when (display-graphic-p) (imalison:appearance))
|
;; (when (display-graphic-p) (imalison:appearance))
|
||||||
(add-hook 'after-init-hook 'imalison:appearance)
|
(add-hook 'after-init-hook 'imalison:appearance)
|
||||||
(add-hook 'after-make-frame-functions 'imalison:appearance)
|
(add-hook 'after-make-frame-functions 'imalison:appearance)
|
||||||
(remove-hook 'after-make-frame-functions 'imalison:appearance)
|
(remove-hook 'after-make-frame-functions 'imalison:appearance)
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
Loading…
Reference in New Issue
Block a user