[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Org release 7.8.07 (BUGFIX-only release)
From: |
Achim Gratz |
Subject: |
Re: [O] Org release 7.8.07 (BUGFIX-only release) |
Date: |
Sun, 01 Apr 2012 12:39:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) |
Bastien writes:
>> In org-find-library-name:
>> org-compat.el:341:14:Warning: find-library called with 3 arguments, but
>> accepts only 1
>
> Well, this is the culprit compatibility defun:
>
> (defun org-find-library-name (library)
> (if (fboundp 'find-library-name)
> (file-name-directory (find-library-name library))
> ; XEmacs does not have `find-library-name'
> (flet ((find-library-name-helper (filename ignored-codesys)
> filename)
> (find-library-name (library)
> (find-library library nil 'find-library-name-helper))) <<<<<
> (file-name-directory (find-library-name library)))))
>
> I don't know how to circumvent this warning and btw I don't have this
> warning in Emacs 24.0.94.1.
I also do not have this warning when compiling org-compat.el in
isolation, but I do have this warning when I do a
batch-byte-recompile-directory. That is never a good sign...
Anyway, I think that most if not all these defuns in org-compat.el
should really be macros (although careful quoting has to be applied) so
that the byte-compiler only needs to compile whatever is appropriate.
(defmacro org-find-library-name (library)
(if (fboundp 'find-library-name)
`(file-name-directory (find-library-name ,library))
; XEmacs does not have `find-library-name'
`(flet ((find-library-name-helper (filename ignored-codesys)
filename)
(find-library-name (library)
(find-library library nil 'find-library-name-helper)))
(file-name-directory (find-library-name ,library)))))
I also don't think an flet macro should be used here (or it should also
be expanded at compile time, which I can't see how to do easily), maybe
replace with a lambda expression? Looking at the definition of
find-library in XEmacs makes me a bit queasy, but I think it needs three
arguments to tell it not to display the file in a window...
(defmacro org-find-library-name (library)
(if (fboundp 'find-library-name)
`(file-name-directory (find-library-name ,library))
; XEmacs does not have `find-library-name'
`(file-name-directory (find-library ,library nil (lambda (lib ignore)
lib)))))
Anyway, something to do after Emacs 24.1 is out.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables