emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trunk r115036: * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding


From: Bozhidar Batsov
Subject: Re: trunk r115036: * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding): Use
Date: Fri, 8 Nov 2013 21:48:19 +0200

So you're saying I should use `cond', right? I was under the impression that `case' is preferable if you'll be always checking the value of the same _expression_.


On 8 November 2013 21:04, Stefan Monnier <address@hidden> wrote:
>> +                            (case ruby-encoding-magic-comment-style
>> +                              ('ruby "# coding: %s")
>> +                              ('emacs "# -*- coding: %s -*-")
>> +                              ('custom ruby-custom-encoding-magic-comment-template))))

This will use the first branch if ruby-encoding-magic-comment-style is
`quote' (and the two other branches will also check to see if
ruby-encoding-magic-comment-style is equal to `quote' tho that check
will be redundant).


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]