[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs for config.scm editing

From: znavko
Subject: emacs for config.scm editing
Date: Sun, 07 Apr 2019 13:18:25 +0000

Hello! I've got my config.scm good stylized with indentations comme il-faut.

After reading actual Guix manual '14.3 The Perfect Setup' and this page and also these suggestions
and also this:

I've installed necessary packages: emacs and emacs-paredit for scheme highlight and indentations. Also I configured to run always paredit in emacs:

$ guix package -i emacs emacs-paredit emacs-geiser

$ nano ~/.emacs
$ cat ~/.emacs
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
(add-hook 'eval-_expression_-minibuffer-setup-hook #'enable-paredit-mode)
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
(add-hook 'scheme-mode-hook #'enable-paredit-mode)

$ emacs ~/config-wpa-dhcp.scm.conf

But it not works only when file extension is .scm. For files .conf it did not highlight:
For activating scheme-mode according to this manual
need to add this string to the first line of file: ; -*- mode: Scheme;-*-
And this has gave me profit:

Also, for automatically placing indentations I used M-q as Ricardo Wurmus said

In the attachment, my current config is.
My config.scm define 2 users: bob and mom, it also uses %desktop-services without NetworkManager but only wpa-supplicant and dhcp-client, also it enables touchpad tapping, and disable pcspeaker for not to beep when password is wrong in SLim, disables ideapad_laptop for prevent soft blocking of wifi card. Also it disables actions on closing notebook lid.

Attachment: config-wpa-dhcp.conf
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]