refactoring code

This commit is contained in:
Jesus E
2023-05-12 23:08:14 -04:00
parent 4177899f78
commit df9488c745
7 changed files with 106 additions and 81 deletions

View File

@@ -32,5 +32,4 @@
(setq-default
indent-tabs-mode nil)
(myemacs/elapsed-time)
(provide 'init-editing-utils)

View File

@@ -12,23 +12,18 @@
;; Repositories
;; ================
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
;;("melpa-stable" . "https://stable.melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")
("org" . "https://orgmode.org/elpa/")))
'(("GNU ELPA" . "https://elpa.gnu.org/packages/")
("MELPA Stable" . "https://stable.melpa.org/packages/")
("ORG" . "https://orgmode.org/elpa/")
("MELPA" . "https://melpa.org/packages/"))
package-archive-priorities
'(("MELPA Stable" . 10)
("GNU ELPA" . 5)
("ORG" . 3)
("MELPA" . 0)))
(setq package-archive-priorities
'(("melpa" . 4)
("melpa-stable" . 0)
("gnu" . 1)
("org" . 3)))
;; =================
;; Refresh packages in Emacs
;; ==========================
(when (not package-archive-contents)
(package-refresh-contents))
;;; Find packages if not installed
;; ================================
;;; On-demand installation of packages

View File

@@ -42,5 +42,4 @@
(global-set-key (kbd "M-%") 'anzu-query-replace)
(global-set-key (kbd "s-<SPC>") 'anzu-query-replace)
(myemacs/elapsed-time)
(provide 'init-modeline)

View File

@@ -60,5 +60,4 @@
(add-hook 'php-mode-hook 'my/php-mode-stuff)
(myemacs/elapsed-time)
(provide 'init-php)

View File

@@ -18,7 +18,4 @@
'(eval-after-load ,feature
'(progn ,@body))))
;; Elapsed time
(myemacs/elapsed-time)
(provide 'init-utils)

View File

@@ -1,18 +0,0 @@
;;----------------------------------------------------------------------------
;; Some cool functions
;;----------------------------------------------------------------------------
;; These functions are made by me (Quitter: @heckyel) or
;; heavily modified by me
;;----------------------------------------------------------------------------
;; Toggles fullscreen
;;----------------------------------------------------------------------------
(defun myemacs/toggle-fullscreen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
(defun myemacs/elapsed-time ()
(let ((elapsed (float-time (time-subtract (current-time)
emacs-start-time))))
(message "[STARTUP] Loading %s ... done (%.3fs)" load-file-name elapsed)))