stumpwm-devel
[Top][All Lists]
Advanced

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

[STUMP] Explain definition please...


From: Tim Cross
Subject: [STUMP] Explain definition please...
Date: Fri, 12 Jul 2019 11:03:50 +1000
User-agent: mu4e 1.3.1; emacs 26.2

Hi,

while my stumpwm migration is going really well and I'm really enjoying
this WM, I have come across something which I simply don't understand
which is beyond my meagre CL skills. Would appreciate it if someone can
explain it.

In the wrappers.lisp, we have the following two function definitions

(defun getenv (var)
  "Return the value of the environment variable."
  (sb-posix:getenv (string var)))

(defun (setf getenv) (val var)
  "Set the value of the environment variable, @var{var} to @var{val}."
  (sb-posix:putenv (format nil "~A=~A" (string var) (string val))))

The second one has me quite baffled. Two main questions:

1. Why define it like this instead of just doing something like (defun
setenv (val var) ...)?

2. How do you call/use such a function?

thanks,

Tim

-- 
Tim Cross



reply via email to

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