From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: major mode for fpscalc + some meta Date: Mon, 23 Sep 2013 03:11:39 +0200 Organization: Aioe.org NNTP Server Message-ID: <87eh8gs5nf.fsf@nl106-137-194.student.uu.se> References: <87mwn4j4om.fsf@nl106-137-194.student.uu.se> <87ioxsl9z6.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1379898914 13250 80.91.229.3 (23 Sep 2013 01:15:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Sep 2013 01:15:14 +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 Sep 23 03:15:18 2013 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 1VNukA-0000ah-Ev for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Sep 2013 03:15:18 +0200 Original-Received: from localhost ([::1]:37185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNuk9-0006g0-KY for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Sep 2013 21:15:17 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: VVbyYd/iFZoeWNmD9i++cQ.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:jjRY6Fyns5f1VgFVvLMO3QrDtI0= Original-Xref: usenet.stanford.edu gnu.emacs.help:201245 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:93514 Archived-At: Stefan Monnier writes: > define-abbrev-table should be at the top-level, not > within fpscalc-mode. > > and of course, this won't work any more when src and > dst include funny characters: you want to pass to > `find-file(-noselect)' the non-quoted file. I updated the source: http://user.it.uu.se/~embe8573/fps/fpscalc.el Now it looks like this: (defun compute () "Run the system defined in the current buffer (i.e., an .fps file), save the fallout in a file, and show that file in a new buffer." (interactive) (let*((src (buffer-file-name)) (dst (format "%s_fallout.txt" src)) (srcq (shell-quote-argument src)) (dstq (shell-quote-argument dst)) ) (shell-command (format "%s < %s > %s" fpscalc-command-name srcq dstq)) (display-buffer (find-file-noselect dst)) )) (add-hook 'fpscalc-mode-hook 'init-fpscalc-abbrevs) (defun init-fpscalc-abbrevs () (define-abbrev-table 'fpscalc-mode-abbrev-table '(("init" "initialise") ("prio" "priority") ))) -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573