12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- (defun load-directory (dir)
- "Load functions from the libs DIR.
- read the .el files"
- (let ((load-it (lambda (f)
- (load-file (concat (file-name-as-directory dir) f)))
- ))
- (mapc load-it (directory-files dir nil "\\.el$"))))
- (defun sacha/increase-font-size ()
- (interactive)
- (set-face-attribute 'default
- nil
- :height
- (ceiling (* 1.10
- (face-attribute 'default :height)))))
- (defun sacha/decrease-font-size ()
- (interactive)
- (set-face-attribute 'default
- nil
- :height
- (floor (* 0.9
- (face-attribute 'default :height)))))
- (defun sacha/smarter-move-beginning-of-line (arg)
- "Move point back to indentation of beginning of line.
- Move point to the first non-whitespace character on this line.
- If point is already there, move to the beginning of the line.
- Effectively toggle between the first non-whitespace character and
- the beginning of the line.
- If ARG is not nil or 1, move forward ARG - 1 lines first. If
- point reaches the beginning or end of the buffer, stop there."
- (interactive "^p")
- (setq arg (or arg 1))
-
- (when (/= arg 1)
- (let ((line-move-visual nil))
- (forward-line (1- arg))))
- (let ((orig-point (point)))
- (back-to-indentation)
- (when (= orig-point (point))
- (move-beginning-of-line 1))))
- (provide 'init-utils)
|