{"id":2571,"date":"2014-03-24T05:26:21","date_gmt":"2014-03-24T09:26:21","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=2571"},"modified":"2014-03-24T05:26:21","modified_gmt":"2014-03-24T09:26:21","slug":"variadic-comparisons-in-emacs-lisp","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=2571","title":{"rendered":"Variadic Comparisons in Emacs Lisp"},"content":{"rendered":"<p> One of the ways that Emacs Lisp differs from other Lisps is that it doesn&#8217;t support multiple arguments for comparisons. That is, you can&#8217;t write things like <\/p>\n<div class=\"org-src-container\">\n<pre class=\"src src-emacs-lisp\">(<span style=\"color: #a020f0;\">if<\/span> (= a b c) do-this else-do-that)\n<\/pre>\n<\/p><\/div>\n<p> or <\/p>\n<div class=\"org-src-container\">\n<pre class=\"src src-emacs-lisp\">(<span style=\"color: #a020f0;\">when<\/span> (&lt; a b c) ...)\n<\/pre>\n<\/p><\/div>\n<p> You can still express those comparisons, of course, but you have to connect two or more two-argument comparisons with <code>and<\/code>. <\/p>\n<p> Now, as Bozhidar Batsov points out, that&#8217;s about to change. <a href=\"http:\/\/emacsredux.com\/blog\/2014\/03\/22\/a-peek-at-emacs-24-dot-4-variadic-comparison-functions\/\">Emacs 24.4 will support variadic comparisons<\/a>. That&#8217;s not a huge change but it does bring Elisp in line with other Lisps and makes it easier to express complex comparisons concisely and clearly. As I wrote <a href=\"http:\/\/irreal.org\/blog\/?p=2565\">before<\/a>, I&#8217;m really impressed with this release and looking forward to its availability. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the ways that Emacs Lisp differs from other Lisps is that it doesn&#8217;t support multiple arguments for comparisons. That is, you can&#8217;t write things like (if (= a b c) do-this else-do-that) or (when (&lt; a b c) &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=2571\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[18],"class_list":["post-2571","post","type-post","status-publish","format-standard","hentry","category-programming","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2571"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2571\/revisions"}],"predecessor-version":[{"id":2572,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2571\/revisions\/2572"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}