random tweaks to multi-line and more

This commit is contained in:
Ivan Malison 2015-11-25 11:15:16 -05:00
parent 42175447f1
commit 03f62993e6

View File

@ -204,12 +204,16 @@
;; functions ;; functions
;; ============================================================================= ;; =============================================================================
(defun random-choice (choices)
(nth (random (length choices)) choices))
(defun display-prefix (arg) (defun display-prefix (arg)
"Display the value of the raw prefix arg." "Display the value of the raw prefix arg."
(interactive "p") (interactive "p")
(message "%s" arg)) (message "%s" arg))
(defmacro imalison:prefix-alternatives (name &rest alternatives) (defmacro imalison:prefix-alternatives (name &rest alternatives)
(car alternatives)
`(defun ,name (arg) `(defun ,name (arg)
(interactive "p") (interactive "p")
(setq function (setq function
@ -219,7 +223,7 @@
(cl-loop for alternative in alternatives (cl-loop for alternative in alternatives
collect `((eq arg ,last-power) (quote ,alternative)) collect `((eq arg ,last-power) (quote ,alternative))
do (setq last-power (* last-power 4))))))) do (setq last-power (* last-power 4)))))))
(setq function (or function (car alternatives))) ; Set a default value for function (setq function (or function)) ; Set a default value for function
(setq current-prefix-arg nil) (setq current-prefix-arg nil)
(call-interactively function))) (call-interactively function)))
@ -871,11 +875,17 @@ The current directory is assumed to be the project's root otherwise."
(progn (progn
(defun imalison:multi-line-skip-fill () (defun imalison:multi-line-skip-fill ()
(interactive) (interactive)
(multi-line-adjust-whitespace multi-line-skip-fill-respacer)) (multi-line-execute multi-line-skip-fill-stragety nil))
(defun imalison:multi-line-fill ()
(interactive)
(multi-line-execute multi-line-fill-stragety nil))
(imalison:prefix-alternatives imalison:multi-line multi-line (imalison:prefix-alternatives imalison:multi-line multi-line
multi-line-single-line multi-line-single-line
imalison:multi-line-skip-fill)) imalison:multi-line-skip-fill
:bind ("C-c d" . imalison:multi-line)) imalison:multi-line-fill))
:bind ("C-c d" . imalison:multi-line))
(use-package recentf (use-package recentf
;; binding is in helm. ;; binding is in helm.
@ -2404,6 +2414,7 @@ items follow a style that is consistent with other prog-modes."
:ensure spaceline :ensure spaceline
:config :config
(progn (progn
(setq powerline-default-separator (random-choice '(butt slant wave)))
(setq spaceline-workspace-numbers-unicode t (setq spaceline-workspace-numbers-unicode t
spaceline-window-numbers-unicode t) spaceline-window-numbers-unicode t)
(if (display-graphic-p) (if (display-graphic-p)
@ -2412,13 +2423,6 @@ items follow a style that is consistent with other prog-modes."
(setq powerline-height 25) (setq powerline-height 25)
(spaceline-spacemacs-theme))) (spaceline-spacemacs-theme)))
(use-package telephone-line
:disabled t
:config
(progn
(setq telephone-line-primary-left-separator #'telephone-line-cubed-left)
(telephone-line-mode 1)))
;; ============================================================================= ;; =============================================================================
;; Themes ;; Themes
;; ============================================================================= ;; =============================================================================
@ -2434,9 +2438,6 @@ items follow a style that is consistent with other prog-modes."
(setq calendar-latitude latitude) (setq calendar-latitude latitude)
(setq calendar-longitude longitude)))) (setq calendar-longitude longitude))))
(defun random-choice (choices)
(nth (random (length choices)) choices))
(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))))