From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/11919 Path: main.gmane.org!not-for-mail From: Matt Simmons Newsgroups: gmane.emacs.gnus.general Subject: Evaluate local variables in buffer Date: 17 Aug 1997 22:49:55 -0700 Message-ID: Reply-To: simmonmt@acm.org NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: multipart/mixed; boundary="Multipart_Sun_Aug_17_22:49:55_1997-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035151550 787 80.91.224.250 (20 Oct 2002 22:05:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:05:50 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.6/8.8.6) with ESMTP id JAA03209 for ; Mon, 18 Aug 1997 09:09:25 -0700 Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with SMTP id LAA04925 for ; Mon, 18 Aug 1997 11:04:47 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Mon, 18 Aug 1997 16:42:35 +0200 Original-Received: (qmail 23224 invoked by uid 504); 18 Aug 1997 14:42:33 -0000 Original-Received: (qmail 23221 invoked from network); 18 Aug 1997 14:42:29 -0000 Original-Received: from phx-az26-18.ix.netcom.com (HELO aurora.matt.cs.purdue.edu) (simmonmt@207.94.110.242) by claymore.vcinet.com with SMTP; 18 Aug 1997 14:42:28 -0000 Original-Received: (from simmonmt@localhost) by aurora.matt.cs.purdue.edu (8.8.6/8.8.6) id AAA01183; Mon, 18 Aug 1997 00:49:56 -0500 (CDT) Original-To: ding@gnus.org Original-Lines: 64 X-Mailer: Gnus v5.4.65/XEmacs 20.2 Xref: main.gmane.org gmane.emacs.gnus.general:11919 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:11919 --Multipart_Sun_Aug_17_22:49:55_1997-1 Content-Type: text/plain; charset=US-ASCII I wrote a perl script that turns rdist output into a format suitable for emacs outline-mode. However, to kick XEmacs into outline-mode, I had to add Local Variables stuff to the end of the output. Much to my surprise, Gnus didn't eval the local variables stuff by default, so I set about making it do so. I had to make a modification to hack-one-local-variable in prim/files.el, since the default hack-one-local-variable is coded to expect a buffer associated with a file. This is obviously not the case with *Article*, so I added an if to check for buffers without files. I also had to add hack-local-variables to gnus-article-display-hook. My question is this: Does GNU Emacs use a different function for local variables evaluation? If so, could something like gnus-article-eval-local-variables be created that would call the appropriate function? I would write it myself, but I'm out of easy range of Emacs sources for the next week or so. Thanks Matt -- The difference between a bug and | a feature is documentation. | Matt Simmons -- Ben Duncan | simmonmt@acm.org bend@ali.intop.net | --Multipart_Sun_Aug_17_22:49:55_1997-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="files.diff" Content-Transfer-Encoding: 7bit *** /p/local/xemacs-20.2/lib/xemacs-20.2/lisp/prim/files.el Wed Apr 23 23:00:09 1997 --- files.el Mon Aug 18 00:47:31 1997 *************** *** 1550,1557 **** (beginning-of-line) (set-window-start (selected-window) (point))) (setq enable-local-eval ! (y-or-n-p (format "Process `eval' or hook local variables in file %s? " ! (file-name-nondirectory buffer-file-name)))))))) (if (eq var 'eval) (save-excursion (eval val)) (make-local-variable var) --- 1550,1560 ---- (beginning-of-line) (set-window-start (selected-window) (point))) (setq enable-local-eval ! (if buffer-file-name ! (y-or-n-p (format "Process `eval' or hook local variables in file %s? " ! (file-name-nondirectory buffer-file-name))) ! (y-or-n-p (format "Process `eval' or hook local variables in buffer %s? " ! (buffer-name))))))))) (if (eq var 'eval) (save-excursion (eval val)) (make-local-variable var) --Multipart_Sun_Aug_17_22:49:55_1997-1--