From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.help Subject: Re: sml-mode indentation for structures Date: Mon, 06 Oct 2014 20:09:27 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412619028 32206 80.91.229.3 (6 Oct 2014 18:10:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Oct 2014 18:10:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 06 20:10:21 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XbCjk-00060j-WB for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Oct 2014 20:10:21 +0200 Original-Received: from localhost ([::1]:53546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbCjk-0003gM-Bt for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Oct 2014 14:10:20 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.kpnqwest.it!news.kpnqwest.it.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 06 Oct 2014 13:09:26 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:8eOs53R6y6MRZL7FCJvhu3X9QVU= Original-Lines: 20 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 212.46.173.194 Original-X-Trace: sv3-cPh9QP7MOwtSneoUF7fjEPj/7d6XunHtaSPNrW8phnezrxY3bRTM9AxxDCEvixO1bHrxKvqr9Mp+3HF!VqZ12uWHDf7fAsZJIAthn15ht5ES28NIjFfYsaqJVcIvXvT7Sx7tdeqREPk88nA= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1899 Original-Xref: usenet.stanford.edu gnu.emacs.help:208039 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100315 Archived-At: On Mon, Oct 06 2014, Helmut Eller wrote: > On Mon, Oct 06 2014, Stefan Monnier wrote: > >>>> (add-function :around smie-indent-rules #'my-sml-rules))) >>> I only had to replace smie-indent-rules with >>> (symbol-function 'sml-smie-rules). >> >> Oh, sorry, it should have been `smie-rules-function'. >> Using (symbol-function 'sml-smie-rules) instead, ends up being more like >> the `defadvice' case: it modifies the behavior of sml-mode globally >> rather than only in the buffer where we run the code. > > I see. Actually I run the code with eval-after-load; but, yes, using > sml-mode-hook feels cleaner. (add-function :around (local 'smie-indent-rules) #'my-sml-rules) seems to be needed to make it work from sml-mode-hook. Helmut