Hi,
If someone has a minute can you guys help me clear a knowledge aspect up in my mind?
Q1. Why do you need to localise a local *error* function when you don't need to localise other local functions?
eg:
(defun func1 (/ [color=red]*error*[/color])
;; Localise this function
(defun *error* ()
<code>
)
;; But not localise this function
(defun func2()
<code>
)
)
Q2. And if I have a function that calls a few other functions, is it best to make the *error* function local in that function, or have it temporarily global.
eg, this:
(defun func1 (/ [color=blue]*error*[/color])
[color=blue](defun *error* ()
<code>
)[/color]
(func2)
(func3)
)
(defun func2()
<code>
)
(defun func3()
<code>
)
or this:
(defun func1 (/ [color=green]*error*[/color])
[color=green](setq temperr *error*)
(setq *error* errortrap)[/color]
(func2)
(func3)
[color=green](setq *error* temperr)[/color]
)
[color=green](defun errortrap ()
<code>
)[/color]
(defun func2()
<code>
)
(defun func3()
<code>
)
Thanks