lisp/org-table.el: fix warning about `eq' usage

* lisp/org-table.el (org-table-make-reference): Use `equal' instead of
`eq' to compare strings.

This change makes the following warning go away:

  Warning (comp): org-table.el:2867:23: \
  Warning: `eq' called with literal string that may never match (arg 2)

This change does not affect the behavior of `org-table-make-reference'
because `eq' treats all instances of the empty string as the same
object anyway, e.g., `(eq (string-trim "aaabbb" "a+" "b+") "")' ==> t.
The only effect of this change is to eliminate the warning.
This commit is contained in:
Karl Fogel 2023-10-30 10:33:29 -05:00 committed by Bastien Guerry
parent d68d0f5f49
commit ee0961ba31
1 changed files with 1 additions and 1 deletions

View File

@ -2864,7 +2864,7 @@ list, `literal' is for the format specifier L."
(if lispp (if lispp
(if (eq lispp 'literal) (if (eq lispp 'literal)
elements elements
(if (and (eq elements "") (not keep-empty)) (if (and (equal elements "") (not keep-empty))
"" ""
(prin1-to-string (prin1-to-string
(if numbers (string-to-number elements) elements)))) (if numbers (string-to-number elements) elements))))