[Top][All Lists]

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

Re: Default share/ and lisp/ directories?

From: Noam Postavsky
Subject: Re: Default share/ and lisp/ directories?
Date: Tue, 20 Feb 2018 16:06:54 -0500

On Tue, Feb 20, 2018 at 3:27 PM, Kaushal Modi <address@hidden> wrote:

>> Use (file-name-directory (directory-file-name (expand-file-name file)))

> Thank you. I was aware of that, but was just being plain lazy.. I didn't
> consider refactoring my whole config to fix that until now[1], so thanks :)

For those of us who are even lazier, what's wrong with

(defvar share-dir (expand-file-name "../share/" invocation-directory))
(defvar lisp-dir
   (format "../share/emacs/%s/lisp/"
           (pcase (version-to-list emacs-version)
             (`(,major 0 ,micro . ,_) (format "%d.0.%d" major micro))
             (`(,major ,minor . ,_) (format "%d.%d" major minor))))

reply via email to

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