diff options
author | David Maus <dmaus@ictsoc.de> | 2011-06-01 07:57:31 +0200 |
---|---|---|
committer | David Maus <dmaus@ictsoc.de> | 2011-06-01 08:30:52 +0200 |
commit | e144f53c9a7362a65f7f3e924a965da70c9bfd58 (patch) | |
tree | d368fd03f1ebe30bec5b50fa007ca807f5a81437 | |
parent | 9da7485a7b86f7e1f5df463bcc62cf9730ae66ec (diff) | |
download | org-mode-e144f53c9a7362a65f7f3e924a965da70c9bfd58.tar.gz |
Don't use equalp at run-time, compare downcased strings
* org-bibtex.el (org-bibtex-headline): Don't use equalp at run-time,
compare downcased strings.
Compiler complains about using `equalp' because other than for example
`concatenate' it is not declared 'inline.
Cf. [[info:cl#Declarations]] about the 'inline declaration
...
`inline'
The `inline' DECL-SPEC lists one or more functions whose bodies
should be expanded "in-line" into calling functions whenever the
compiler is able to arrange for it. For example, the Common Lisp
function `cadr' is declared `inline' by this package so that the
form `(cadr X)' will expand directly into `(car (cdr X))' when it
is called in user functions, for a savings of one (relatively
expensive) function call.
The following declarations are all equivalent. Note that the
`defsubst' form is a convenient way to define a function and
declare it inline all at once.
(declaim (inline foo bar))
(eval-when (compile load eval) (proclaim '(inline foo bar)))
(defsubst foo (...) ...) ; instead of defun
*Please note:* this declaration remains in effect after the
containing source file is done. It is correct to use it to
request that a function you have defined should be inlined, but it
is impolite to use it to request inlining of an external function.
In Common Lisp, it is possible to use `(declare (inline ...))'
before a particular call to a function to cause just that call to
be inlined; the current byte compilers provide no way to implement
this, so `(declare (inline ...))' is currently ignored by this
package.
...
Thus other than `concatenate' `equalp' is stored as a function call at
run-time.
-rw-r--r-- | lisp/org-bibtex.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index ed67cd7..6c46b28 100644 --- a/lisp/org-bibtex.el +++ b/lisp/org-bibtex.el @@ -323,8 +323,8 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t." (lambda (kv) (let ((key (car kv)) (val (cdr kv))) (when (and (string-match org-bibtex-prefix key) - (not (equalp - (concat org-bibtex-prefix "TYPE") key))) + (not (string= + (downcase (concat org-bibtex-prefix "TYPE")) (downcase key)))) (cons (downcase (replace-regexp-in-string org-bibtex-prefix "" key)) val)))) |