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)
New contributor
Bruno Ciccarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$

1 Answer 1

3
\$\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.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the feedback, I'll fix it. \$\endgroup\$ yesterday

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.