unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Moved safe-local-variable properties from `files.el'
@ 2006-05-11 15:02 Reiner Steib
  2006-05-12  4:15 ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2006-05-11 15:02 UTC (permalink / raw)


Hi,

I continued to move the safe-local-variable properties from `files.el'
to the files where the variables are defined (if they aren't defined
in C code).  I noticed a few discrepancies:

- (put 'byte-compile-warnings 'safe-local-variable 'booleanp)

  The custom type allows:

  :type `(choice (const :tag "All" t)
		 (set :menu-tag "Some"
		      (const free-vars) (const unresolved)
		      (const callargs) (const redefine)
		      (const obsolete) (const noruntime)
		      (const cl-functions) (const interactive-only))))

  I.e. `booleanp' doesn't allow a list.

- In `files.el' we had: (c-file-style . stringp).  If changed it to
  (put 'c-file-style 'safe-local-variable 'string-or-null-p).

- In `files.el' we had: (version-control . symbolp)

  The custom type allows:

  :type '(choice (const :tag "Never" never)
		 (const :tag "If existing" nil)
		 (other :tag "Always" t))

  I.e. `symbolp' might allow too much.

- `no-update-autoloads':

  I couldn't find a defvar/defcustom and it's not documented in
  (info "(emacs)Specifying File Variables").

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Moved safe-local-variable properties from `files.el'
  2006-05-11 15:02 Moved safe-local-variable properties from `files.el' Reiner Steib
@ 2006-05-12  4:15 ` Richard Stallman
  2006-05-12 12:31   ` Reiner Steib
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2006-05-12  4:15 UTC (permalink / raw)
  Cc: emacs-devel

If you would like to correct the property predicates
for these variables, that would be useful.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Moved safe-local-variable properties from `files.el'
  2006-05-12  4:15 ` Richard Stallman
@ 2006-05-12 12:31   ` Reiner Steib
  2006-05-13  4:52     ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2006-05-12 12:31 UTC (permalink / raw)
  Cc: emacs-devel

On Fri, May 12 2006, Richard Stallman wrote:

> If you would like to correct the property predicates
> for these variables, that would be useful.

I've committed a correction for `version-control'.

For `byte-compile-warnings', I'll commit the following, unless someone
suggests a better solution:

--8<---------------cut here---------------start------------->8---
--- bytecomp.el	11 May 2006 15:50:13 +0200	2.184
+++ bytecomp.el	12 May 2006 14:24:00 +0200	
@@ -357,7 +357,20 @@
 		      (const callargs) (const redefine)
 		      (const obsolete) (const noruntime)
 		      (const cl-functions) (const interactive-only))))
-;;;###autoload(put 'byte-compile-warnings 'safe-local-variable 'booleanp)
+(put 'byte-compile-warnings 'safe-local-variable 'byte-compile-warnings-safe-p)
+;;;###autoload
+(defun byte-compile-warnings-safe-p (x)
+  (or (booleanp x)
+      (and (listp x)
+	   (equal (mapcar
+		   (lambda (e)
+		     (when (memq e '(free-vars unresolved
+				     callargs redefine
+				     obsolete noruntime
+				     cl-functions interactive-only))
+		       e))
+		   x)
+		  x))))
 
 (defvar byte-compile-interactive-only-functions
   '(beginning-of-buffer end-of-buffer replace-string replace-regexp
--8<---------------cut here---------------end--------------->8---

I don't know what to do WRT `no-update-autoloads':

>> - `no-update-autoloads':
>>   I couldn't find a defvar/defcustom and it's not documented in
>>   (info "(emacs)Specifying File Variables").

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Moved safe-local-variable properties from `files.el'
  2006-05-12 12:31   ` Reiner Steib
@ 2006-05-13  4:52     ` Richard Stallman
  2006-05-13  9:34       ` Reiner Steib
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2006-05-13  4:52 UTC (permalink / raw)
  Cc: emacs-devel

Something seems to have gone wrong with no-update-autoloads.
Clearly the intent was to prevent any autoloads from being
generated for the file, but autoload.el fails to look at it.

One solution is to make update-file-autoloads check for a local
binding for this variable.  It is nontrivial to do this, since
we don't want update-file-autoloads to call normal-mode.
But it probably isn't hard.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Moved safe-local-variable properties from `files.el'
  2006-05-13  4:52     ` Richard Stallman
@ 2006-05-13  9:34       ` Reiner Steib
  2006-05-13 20:41         ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2006-05-13  9:34 UTC (permalink / raw)
  Cc: emacs-devel

On Sat, May 13 2006, Richard Stallman wrote:

> Something seems to have gone wrong with no-update-autoloads.
> Clearly the intent was to prevent any autoloads from being
> generated for the file, but autoload.el fails to look at it.

FWIW, I didn't change the `no-update-autoloads' entry, so this seems
to be unrelated to my changes.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Moved safe-local-variable properties from `files.el'
  2006-05-13  9:34       ` Reiner Steib
@ 2006-05-13 20:41         ` Richard Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2006-05-13 20:41 UTC (permalink / raw)
  Cc: emacs-devel

    > Something seems to have gone wrong with no-update-autoloads.
    > Clearly the intent was to prevent any autoloads from being
    > generated for the file, but autoload.el fails to look at it.

    FWIW, I didn't change the `no-update-autoloads' entry, so this seems
    to be unrelated to my changes.

I agree, your changes do not affect it.  It was only half-implemented
before, and it remains so.

It would be good to clean that up.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-13 20:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-11 15:02 Moved safe-local-variable properties from `files.el' Reiner Steib
2006-05-12  4:15 ` Richard Stallman
2006-05-12 12:31   ` Reiner Steib
2006-05-13  4:52     ` Richard Stallman
2006-05-13  9:34       ` Reiner Steib
2006-05-13 20:41         ` Richard Stallman

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).