2
\$\begingroup\$

I'm still going to improve it but I left my emacs to my liking. I really liked having this freedom to leave the ide as I like, most don't give you that. I'm even thinking about making an IDE in the future, it would be a clone of Nano with the freedom that Vim and Emacs give you to edit your development environment.

;; MyEmacs
(add-to-list 'exec-path "C:/Program Files (x86)/GnuWin32/bin")
(split-window-vertically (round (* 0.7 (window-height))))
(other-window 1)
(set-fringe-mode 15)
(load-theme 'tango-dark t)
(electric-indent-mode 1)
(column-number-mode t)
(global-display-line-numbers-mode t)
(global-hl-line-mode t)
(global-visual-line-mode t)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(tooltip-mode -1)
(setq inhibit-startup-message t)
(setq-default indent-tabs-mode nil) 
(setq-default tab-width 4) 
(unless (package-installed-p 'use-package)
 (package-install 'use-package)
 (require 'use-package)
 (setq use-package-always-ensure t))
(setq auto-mode-alist (append '(("\\.scm$" . scheme-mode)) auto-mode-alist))
(setq auto-mode-alist (append '(("\\.lisp$" . lisp-mode)) auto-mode-alist))
(add-to-list 'auto-mode-alist '("\\.el\\'" . emacs-lisp-mode))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(global-set-key (kbd "C-c C-e") 'eval-last-sexp)
(global-set-key (kbd "C-c C-r") 'eval-region)
toolic
15.1k5 gold badges29 silver badges211 bronze badges
asked May 16, 2024 at 1:31
\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

target platform

Neither the Review Context nor the code comments describe what OS platform(s) we are targeting.

(add-to-list 'exec-path "C:/Program Files (x86)/GnuWin32/bin")

This suggests that MacOS and Linux are not on the menu. It would be useful to interrogate the current platform and bail out early with a useful diagnostic, rather than waiting for some fatal error to cryptically occur.

Alternatively, maybe the calling code should more robustly setup the exec path, keeping in mind which platform we're currently running on. Then this library code would have fewer responsibilities to worry about.

common lisp

In elisp, I do like the idiomatic usage of (unless ..., as opposed to, say, (or ....

https://web.archive.org/web/20240516043034/https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node84.html

As a matter of style, unless is normally used to conditionally produce some side effects, and the value of the unless form is normally not used.

And that is exactly what we see the OP code doing here, good deal.


This codebase appears to achieve its design goals.

I would be willing to delegate or accept maintenance tasks on it.

answered May 16, 2024 at 4:27
\$\endgroup\$
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.