Small fixes

This commit is contained in:
larstvei 2022-09-18 16:49:58 +02:00
parent f866d1f089
commit e8a7096811

View File

@ -111,7 +111,7 @@
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun tangle-init () (defun tangle-init ()
"If the current buffer is 'init.org' the code-blocks are "If the current buffer is init.org the code-blocks are
tangled, and the tangled file is compiled." tangled, and the tangled file is compiled."
(when (equal (buffer-file-name) (when (equal (buffer-file-name)
(expand-file-name (concat user-emacs-directory "init.org"))) (expand-file-name (concat user-emacs-directory "init.org")))
@ -248,8 +248,7 @@
(when (memq window-system '(mac ns)) (when (memq window-system '(mac ns))
(setq ns-pop-up-frames nil (setq ns-pop-up-frames nil
mac-option-modifier nil mac-option-modifier nil
mac-command-modifier 'meta mac-command-modifier 'meta)
x-select-enable-clipboard t)
(exec-path-from-shell-initialize) (exec-path-from-shell-initialize)
(when (fboundp 'mac-auto-operator-composition-mode) (when (fboundp 'mac-auto-operator-composition-mode)
(mac-auto-operator-composition-mode 1))) (mac-auto-operator-composition-mode 1)))
@ -382,10 +381,6 @@
show-paren-mode ; Highlight matching parentheses show-paren-mode ; Highlight matching parentheses
which-key-mode)) ; Available keybindings in popup which-key-mode)) ; Available keybindings in popup
(funcall mode 1)) (funcall mode 1))
(when (version< emacs-version "24.4")
(eval-after-load 'auto-compile
'((auto-compile-on-save-mode 1)))) ; compile .el files on save
#+END_SRC #+END_SRC
** Visual ** Visual
@ -676,8 +671,8 @@
given, the duplicated region will be commented out." given, the duplicated region will be commented out."
(interactive "P") (interactive "P")
(save-excursion (save-excursion
(let ((start (if (region-active-p) (region-beginning) (point-at-bol))) (let ((start (if (region-active-p) (region-beginning) (line-beginning-position)))
(end (if (region-active-p) (region-end) (point-at-eol))) (end (if (region-active-p) (region-end) (line-end-position)))
(fill-column most-positive-fixnum)) (fill-column most-positive-fixnum))
(goto-char end) (goto-char end)
(unless (region-active-p) (unless (region-active-p)