emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Quoting functions with ' vs #'
@ 2014-05-21  5:15 Aaron Ecay
  2014-05-21  7:29 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Ecay @ 2014-05-21  5:15 UTC (permalink / raw)
  To: orgmode; +Cc: Bastien

Hello,

Commit a5686d87 (link[1]) changes several uses of #' to '.  Is this org
“house style”?  It disables a compile-time warning about potentially
undefined functions:

#+begin_src elisp
(defun i-give-a-warning () (mapc #'doesnt-exist '(1 2 3)))

(defun i-do-not () (mapc 'doesnt-exist2 '(1 2 3)))
#+end_src

When I’m writing elisp, this warning catches my own mistakes on a pretty
regular basis, and so I’m rather fond of it.  But if bare ' is how org
code should be written, it would be good to know that.

Thanks,
Aaron

[1] <http://repo.or.cz/w/org-mode.git/commitdiff/a5686d87786b1d6514ec85959a2188f703346a06>

--
Aaron Ecay

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Quoting functions with ' vs #'
  2014-05-21  5:15 Quoting functions with ' vs #' Aaron Ecay
@ 2014-05-21  7:29 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-05-21  7:29 UTC (permalink / raw)
  To: Aaron Ecay; +Cc: orgmode

Hi Aaron,

Aaron Ecay <aaronecay@gmail.com> writes:

> Commit a5686d87 (link[1]) changes several uses of #' to '.  Is this org
> “house style”?

Not really.  My decision for this can be sumed up like this:

#+begin_src elisp
(defun i-give-a-warning () (mapc 'does-exist '(1 2 3)))
(defun i-do-not () (mapc #'maybe-problematic-for-compilation '(1 2 3)))
#+end_src

But I don't feel strongly about that, except for #'(lambda ...) which
is just redondant, if not misleading.

2 cts,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-21  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21  5:15 Quoting functions with ' vs #' Aaron Ecay
2014-05-21  7:29 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).