Move custom functions to utils.el
This commit is contained in:
parent
677934b0b8
commit
3dc7feefc9
|
@ -65,13 +65,13 @@
|
|||
;; initial buffers should use text-mode
|
||||
(setq-default major-mode 'text-mode)
|
||||
|
||||
; Calender should start on Monday
|
||||
;; Calender should start on Monday
|
||||
(setq calendar-week-start-day 1)
|
||||
|
||||
;; insert only one space after a period
|
||||
(setq sentence-end-double-space nil)
|
||||
|
||||
; Matches parentheses and such in every mode
|
||||
;; Matches parentheses and such in every mode
|
||||
(show-paren-mode 1)
|
||||
|
||||
;; pair parentheses
|
||||
|
@ -93,35 +93,6 @@
|
|||
(when (is-linux-p)
|
||||
(set-fontset-font t nil "Symbola" nil 'prepend)))
|
||||
|
||||
(defun kill-other-buffers ()
|
||||
"Kill all other buffers."
|
||||
(interactive)
|
||||
(mapc 'kill-buffer
|
||||
(delq
|
||||
(current-buffer)
|
||||
(buffer-list))))
|
||||
|
||||
(defun insert-date ()
|
||||
"Insert the current date."
|
||||
(interactive)
|
||||
(let ((format "%d.%m.%Y")
|
||||
(system-time-locale "de_CH"))
|
||||
(insert (format-time-string format))))
|
||||
|
||||
(defun insert-iso-date ()
|
||||
"Insert the current date in the ISO format."
|
||||
(interactive)
|
||||
(let ((format "%Y-%m-%d")
|
||||
(system-time-locale "de_CH"))
|
||||
(insert (format-time-string format))))
|
||||
|
||||
(defun insert-full-date ()
|
||||
"Insert the current date, write out the day and month name."
|
||||
(interactive)
|
||||
(let ((format "%A, %d. %B %Y")
|
||||
(system-time-locale "de_CH"))
|
||||
(insert (format-time-string format))))
|
||||
|
||||
(defun buffer-too-big-p ()
|
||||
(or (> (buffer-size) (* 5000 64))
|
||||
(> (line-number-at-pos (point-max)) 5000)))
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
(defun kill-other-buffers ()
|
||||
"Kill all other buffers."
|
||||
(interactive)
|
||||
(mapc 'kill-buffer
|
||||
(delq
|
||||
(current-buffer)
|
||||
(buffer-list))))
|
||||
|
||||
(defun insert-date ()
|
||||
"Insert the current date."
|
||||
(interactive)
|
||||
(let ((format "%d.%m.%Y")
|
||||
(system-time-locale "de_CH"))
|
||||
(insert (format-time-string format))))
|
||||
|
||||
(defun insert-iso-date ()
|
||||
"Insert the current date in the ISO format."
|
||||
(interactive)
|
||||
(let ((format "%Y-%m-%d")
|
||||
(system-time-locale "de_CH"))
|
||||
(insert (format-time-string format))))
|
||||
|
||||
(defun insert-full-date ()
|
||||
"Insert the current date, write out the day and month name."
|
||||
(interactive)
|
||||
(let ((format "%A, %d. %B %Y")
|
||||
(system-time-locale "de_CH"))
|
||||
(insert (format-time-string format))))
|
|
@ -34,6 +34,7 @@
|
|||
(load-file (config-path "eyebrowse.el"))
|
||||
(load-file (config-path "manuals.el"))
|
||||
(load-file (config-path "mu4e.el"))
|
||||
(load-file (config-path "utils.el"))
|
||||
(load-file (config-path "window_split.el"))
|
||||
(load-file (config-path "yasnippet.el"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue