unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stuart D. Herring" <herring@lanl.gov>
To: "Richard Stallman" <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: turn off safe-local-variable-values checking
Date: Wed, 28 Feb 2007 16:58:07 -0800 (PST)	[thread overview]
Message-ID: <37171.128.165.123.18.1172710687.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <41361.128.165.123.132.1144871864.squirrel@webmail.lanl.gov>

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

[Original thread is at
http://lists.gnu.org/archive/html/emacs-devel/2006-04/msg00521.html.]

I wrote, a long time ago:

>>     table.el
>>     allout.el
>>     ediff*.el
>>
>> This is useful--I presume these bindings are safe,
>> so we should define predicates for the variables they bind.
>>
>> Would someone like to do that now, and ack?
>
> Interesting: each of those three files required a different approach.  I
> added predicates for time-stamp.el's local variables, putting reasonable
> limits on the integers.  Allout just needed to autoload its
> already-present safe-local declaration.  And ediff was using part of
> edebug which could really be used for evil, so I wrote a check for
> non-evil use and added that to the code for symbol properties.
>
> Patch attached, natch.

Oddly, most but not all of my patch was applied.  The part that wasn't
later became horribly out of date because of conflicting changes, but I've
resolved the conflicts several times and kept it alive, and am
resubmitting just the part that was missed as a diff against current
sources.  See the ChangeLog entry:

 	* files.el: Add predicates for time-stamp.el's file-local
 	variables (here, since it's never automatically loaded).

Assuming that there's nothing wrong with adding the rest of what was added
then, please install?

Davis

PS - Sadly, I was reminded of these changes by the recent thread
http://lists.gnu.org/archive/html/emacs-devel/2007-02/msg01042.html: there
was an insidious bug in the part of my patch that was applied!

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

[-- Attachment #2: local-variables-2.patch --]
[-- Type: application/octet-stream, Size: 1105 bytes --]

Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.885
diff -c -r1.885 files.el
*** files.el	25 Feb 2007 09:24:11 -0000	1.885
--- files.el	1 Mar 2007 00:20:43 -0000
***************
*** 2449,2454 ****
--- 2448,2464 ----
  	(left-margin                     . integerp) ;; C source code
  	(no-update-autoloads             . booleanp)
  	(tab-width                       . integerp) ;; C source code
+ 	(time-stamp-inserts-lines        . t)
+ 	(time-stamp-line-limit           . (lambda (val)
+ 					     (and (integerp val)
+ 						  (not (zerop val))
+ 						  (<= (abs val) 1000))))
+ 	(time-stamp-count                . (lambda (val) (and (integerp val)
+ 							       (<= val 100))))
+ 	(time-stamp-end                  . stringp)
+ 	(time-stamp-format               . stringp)
+ 	(time-stamp-pattern              . string-or-null-p)
+ 	(time-stamp-start                . stringp)
  	(truncate-lines                  . booleanp))) ;; C source code
  
  (put 'c-set-style 'safe-local-eval-function t)

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2007-03-01  0:58 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30 11:27 turn off safe-local-variable-values checking Shug Boabby
2006-03-31 17:28 ` Richard Stallman
2006-03-31 20:58 ` Stefan Monnier
2006-04-03  0:12   ` Shug Boabby
2006-04-03  0:49     ` Dan Nicolaescu
2006-04-03  0:56       ` David Kastrup
2006-04-03  1:16         ` Dan Nicolaescu
2006-04-03  1:34           ` David Kastrup
2006-04-04 17:38             ` AUCTex (was: turn off safe-local-variable-values checking) Dan Nicolaescu
2006-04-04 21:12               ` AUCTex David Kastrup
2006-04-05 19:41                 ` AUCTex Dan Nicolaescu
2006-04-05 19:53                   ` AUCTex David Kastrup
2006-04-03  2:25     ` turn off safe-local-variable-values checking Stefan Monnier
2006-04-03  2:58       ` Johan Bockgård
2006-04-03 13:51         ` Richard Stallman
2006-04-10 18:25         ` Richard Stallman
2006-04-12 18:13           ` Stuart D. Herring
2006-04-13  3:20             ` Richard Stallman
2006-04-13 15:04               ` Stuart D. Herring
2006-04-16  2:09                 ` M-x normal-mode and local variables Richard Stallman
2006-04-16 12:22                   ` Stefan Monnier
2006-04-17 17:56                     ` Richard Stallman
2006-04-12 19:57           ` turn off safe-local-variable-values checking Stuart D. Herring
2007-03-01  0:58             ` Stuart D. Herring [this message]
2007-03-01 17:12               ` Chong Yidong
2007-03-01 20:12                 ` Stuart D. Herring
2006-04-03 14:44       ` Andreas Schwab
2006-04-03 23:57         ` Richard Stallman
2006-04-04 18:59           ` Andreas Schwab
2006-04-04 19:37           ` Reiner Steib
2006-04-04 20:46             ` Stefan Monnier
2006-04-05  8:19               ` Reiner Steib
2006-04-05 13:01                 ` Stefan Monnier
2006-04-05 15:51                   ` Chong Yidong
2006-04-06  1:11                   ` Richard Stallman
2006-04-06 15:40                     ` Additional safe-local-variables (was: turn off safe-local-variable-values checking) Reiner Steib
2006-04-06 17:51                       ` Richard Stallman
2006-04-06 19:23                         ` Additional safe-local-variables Reiner Steib
2006-04-07  2:19                           ` Richard Stallman
2006-04-07 18:55                             ` Reiner Steib
2006-04-08 16:17                               ` Richard Stallman
2006-04-05  1:51             ` turn off safe-local-variable-values checking Richard Stallman
2006-04-05  3:45               ` Miles Bader
2006-04-05 14:54                 ` Richard Stallman
2006-04-03  0:13   ` Shug Boabby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37171.128.165.123.18.1172710687.squirrel@webmail.lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).