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

Re: Where is the variable "flavor" defined?



Akira> The variable "flavor" is certainly used in startup file for
Akira> some packages. However, unfortunately I can't figure out where
Akira> this strange variable is defined at. What's more, emacs says
Akira> "Symbol's value as variable is void: flavor" for "M-:
Akira> flavor". I can't understand what's going on. Could anyone give
Akira> some advice for this stupid variable for me?

I'm not a developer (yet), but I'll have a shot, anyway :-)

This is from /usr/share/emacs/site-lisp/debian-startup.el:

(defun debian-startup (flavor)

  ;; Our handling of debian-emacs-flavor here is truly weird, but we
  ;; have to do it like this because some of the emacsen flavors
  ;; didn't DWIM in their startup sequence.  I wasn't as clear as I
  ;; should have been in debian-policy, but they were also
  ;; technically violating policy.

  ;; It's even weirder now.  I've changed policy back to the old way,
  ;; but I'm also doing some sanity checking here and making sure that
  ;; even debian-emacs-flavor gets set no matter what.  I'm in a rush
  ;; right now, but I'll come back later and make all this cleaner and
  ;; better documented.  Sorry.

  (if (not (boundp 'debian-emacs-flavor))
      (defconst debian-emacs-flavor flavor
        "A symbol representing the particular debian flavor of emacs that's
running.  Something like 'emacs20, 'xemacs20, etc.")
        
    (let ((common-dir "/etc/emacs/site-start.d")
          (flavor-dir (concat "/etc/" (symbol-name flavor) "/site-start.d")))
      (debian-run-directories flavor-dir common-dir))))


Since Emacs Lisp uses dynamic binding, the parameter "flavor" is
available as a named variable in debian-run-directories and everything
it calls ... does that explain it?

-- 
Ian Zimmerman, Oakland, California, U.S.A.
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087
To many people, "Unix security" may seem to be an oxymoron.
-Garfinkel & Spafford, _Practical Unix Security_


-- 
To UNSUBSCRIBE, email to debian-emacsen-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: