Attached patch fixes a small issue with
contrib/lisp/org-elisp-symbol.el, a contributed package that defines a
link type for elisp symbols.

Currently org-elisp-symbol.el uses `eq' to compare a symbol value with
a string. Such a comparism always evals to nil:

#+begin_src emacs-lisp
(let ((foo "foo"))
  (eq foo "foo")) => nil
#+end_src

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmj...@jabber.org
Email..... dm...@ictsoc.de
From 4b5d2e726d8f64e111c42623ae0cd5cf8d82ad70 Mon Sep 17 00:00:00 2001
From: David Maus <dm...@ictsoc.de>
Date: Thu, 1 Sep 2011 06:49:29 +0200
Subject: [PATCH] Use `string=' to compare strings

* org-elisp-symbol.el (org-elisp-symbol-store-link): Use `string=' to
compare strings.

(let ((foo "foo"))
  (eq foo "foo")) => nil
---
 contrib/lisp/org-elisp-symbol.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-elisp-symbol.el b/contrib/lisp/org-elisp-symbol.el
index e614e97..6eb8114 100644
--- a/contrib/lisp/org-elisp-symbol.el
+++ b/contrib/lisp/org-elisp-symbol.el
@@ -104,8 +104,8 @@
             (stype (cond ((commandp sym-name) "Command")
                          ((functionp sym-name) "Function")
                          ((user-variable-p sym-name) "User variable")
-                         ((eq def "defvar") "Variable")
-                         ((eq def "defmacro") "Macro")
+                         ((string= def "defvar") "Variable")
+                         ((string= def "defmacro") "Macro")
                          (t "Symbol")))
             (args (if (match-string 3)
                       (mapconcat (lambda (a) (unless (string-match "^&" a) a))
-- 
1.7.2.5

Attachment: pgpBs3SyLfVdE.pgp
Description: PGP signature

Reply via email to