Commit af3d522f authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from trunk.

parents 37910ab2 7400048f
2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
* lib/intprops.h, lib/stdint.in.h, m4/mktime.m4, m4/readlink.m4:
Merge from gnulib.
2011-05-21 Andreas Schwab <schwab@linux-m68k.org>
* Makefile.in (AUTOMAKE_INPUTS): Add $(srcdir)/lib/gnulib.mk.
2011-05-20 Eli Zaretskii <eliz@gnu.org>
* .bzrignore: Add lib/stdio.in-h, lib/stdbool.h, and lib/stdint.h.
......
......@@ -422,7 +422,7 @@ ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/$(DOS_gnulib_comp.m4)
$(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
cd $(srcdir) && aclocal -I m4
AUTOMAKE_INPUTS = @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am
AUTOMAKE_INPUTS = @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am $(srcdir)/lib/gnulib.mk
$(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS)
cd $(srcdir) && automake --gnu -a -c lib/Makefile
am--refresh: $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/src/config.in
......
2011-05-21 Glenn Morris <rgm@gnu.org>
* bzrmerge.el (bzrmerge-resolve): Suppress prompts about file-locals.
2011-03-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.3 released.
......
......@@ -146,7 +146,8 @@ are both lists of revnos, in oldest-first order."
(unless (file-exists-p file) (error "Bzrmerge-resolve: Can't find %s" file))
(with-demoted-errors
(let ((exists (find-buffer-visiting file)))
(with-current-buffer (find-file-noselect file)
(with-current-buffer (let ((enable-local-variables :safe))
(find-file-noselect file))
(if (buffer-modified-p)
(error "Unsaved changes in %s" (current-buffer)))
(save-excursion
......
2011-05-22 Chong Yidong <cyd@stupidchicken.com>
* mule.texi (Specify Coding, Text Coding, Communication Coding):
(File Name Coding, Terminal Coding): Add command names (Bug#8312).
2011-05-18 Glenn Morris <rgm@gnu.org>
* ack.texi (Acknowledgments): Remove fakemail.c.
......
......@@ -916,11 +916,12 @@ written in the Emacs internal character code).
@section Specifying a File's Coding System
If Emacs recognizes the encoding of a file incorrectly, you can
reread the file using the correct coding system by typing @kbd{C-x
@key{RET} r @var{coding-system} @key{RET}}. To see what coding system
Emacs actually used to decode the file, look at the coding system
mnemonic letter near the left edge of the mode line (@pxref{Mode
Line}), or type @kbd{C-h C @key{RET}}.
reread the file using the correct coding system with @kbd{C-x
@key{RET} r} (@code{revert-buffer-with-coding-system}). This command
prompts for the coding system to use. To see what coding system Emacs
actually used to decode the file, look at the coding system mnemonic
letter near the left edge of the mode line (@pxref{Mode Line}), or
type @kbd{C-h C} (@code{describe-coding-system}).
@vindex coding
You can specify the coding system for a particular file in the file
......@@ -994,15 +995,16 @@ one:
@table @kbd
@item C-x @key{RET} f @var{coding} @key{RET}
Use coding system @var{coding} for saving or revisiting the visited
file in the current buffer.
Use coding system @var{coding} to save or revisit the visited file in
the current buffer (@code{set-buffer-file-coding-system})
@item C-x @key{RET} c @var{coding} @key{RET}
Specify coding system @var{coding} for the immediately following
command.
command (@code{universal-coding-system-argument}).
@item C-x @key{RET} r @var{coding} @key{RET}
Revisit the current file using the coding system @var{coding}.
Revisit the current file using the coding system @var{coding}
(@code{revert-buffer-with-coding-system}).
@item M-x recode-region @key{RET} @var{right} @key{RET} @var{wrong} @key{RET}
Convert a region that was decoded using coding system @var{wrong},
......@@ -1084,19 +1086,17 @@ in communication with other processes.
@table @kbd
@item C-x @key{RET} x @var{coding} @key{RET}
Use coding system @var{coding} for transferring selections to and from
other window-based applications.
other window-based applications (@code{set-selection-coding-system}).
@item C-x @key{RET} X @var{coding} @key{RET}
Use coding system @var{coding} for transferring @emph{one}
selection---the next one---to or from another window-based application.
selection---the next one---to or from another window-based application
(@code{set-next-selection-coding-system}).
@item C-x @key{RET} p @var{input-coding} @key{RET} @var{output-coding} @key{RET}
Use coding systems @var{input-coding} and @var{output-coding} for
subprocess input and output in the current buffer.
@item C-x @key{RET} c @var{coding} @key{RET}
Specify coding system @var{coding} for the immediately following
command.
subprocess input and output in the current buffer
(@code{set-buffer-process-coding-system}).
@end table
@kindex C-x RET x
......@@ -1134,9 +1134,10 @@ own buffer, and thus you can use this command to specify translation to
and from a particular subprocess by giving the command in the
corresponding buffer.
You can also use @kbd{C-x @key{RET} c} just before the command that
runs or starts a subprocess, to specify the coding system to use for
communication with that subprocess.
You can also use @kbd{C-x @key{RET} c}
(@code{universal-coding-system-argument}) just before the command that
runs or starts a subprocess, to specify the coding system for
communicating with that subprocess. @xref{Text Coding}.
The default for translation of process input and output depends on the
current language environment.
......@@ -1160,7 +1161,7 @@ the text representation.)
@table @kbd
@item C-x @key{RET} F @var{coding} @key{RET}
Use coding system @var{coding} for encoding and decoding file
@emph{names}.
@emph{names} (@code{set-file-name-coding-system}).
@end table
@vindex file-name-coding-system
......@@ -1205,10 +1206,12 @@ system, and the coding system to which you wish to convert.
@table @kbd
@item C-x @key{RET} k @var{coding} @key{RET}
Use coding system @var{coding} for keyboard input.
Use coding system @var{coding} for keyboard input
(@code{set-keyboard-coding-system}).
@item C-x @key{RET} t @var{coding} @key{RET}
Use coding system @var{coding} for terminal output.
Use coding system @var{coding} for terminal output
(@code{set-terminal-coding-system}).
@end table
@kindex C-x RET t
......
......@@ -93,8 +93,11 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
#ifdef HAVE_CONFIG_H
# include <config.h>
/* On some systems, Emacs defines static as nothing for the sake
of unexec. We don't want that here since we don't use unexec. */
/* This is probably not necessary any more. On some systems, config.h
used to define static as nothing for the sake of unexec. We don't
want that here since we don't use unexec. None of these systems
are supported any more, but the idea is still mentioned in
etc/PROBLEMS. */
# undef static
# ifndef PTR /* for XEmacs */
# define PTR void *
......
......@@ -27,6 +27,10 @@
E should not have side effects. */
#define _GL_INT_CONVERT(e, v) ((e) - (e) + (v))
/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
<http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
#define _GL_INT_NEGATE_CONVERT(e, v) ((e) - (e) - (v))
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
......@@ -50,7 +54,7 @@
/* Return 1 if the integer expression E, after integer promotion, has
a signed type. E should not have side effects. */
#define _GL_INT_SIGNED(e) (_GL_INT_CONVERT (e, -1) < 0)
#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
/* Minimum and maximum values for integer types and expressions. These
......@@ -79,7 +83,7 @@
#define _GL_INT_MAXIMUM(e) \
(_GL_INT_SIGNED (e) \
? _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_CONVERT (e, -1))
: _GL_INT_NEGATE_CONVERT (e, 1))
#define _GL_SIGNED_INT_MAXIMUM(e) \
(((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
......@@ -179,16 +183,21 @@
: 0 < (a))
/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. */
See above for restrictions. Avoid && and || as they tickle
bugs in Sun C 5.11 2010/08/13 and other compilers; see
<http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
((b) < 0 \
? ((a) < 0 \
? (a) < (max) / (b) \
: (b) < -1 && (min) / (b) < (a)) \
: (0 < (b) \
&& ((a) < 0 \
? (a) < (min) / (b) \
: (max) / (b) < (a))))
: (b) == -1 \
? 0 \
: (min) / (b) < (a)) \
: (b) == 0 \
? 0 \
: ((a) < 0 \
? (a) < (min) / (b) \
: (max) / (b) < (a)))
/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Do not check for division by zero. */
......@@ -234,11 +243,11 @@
(((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
|| INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \
((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
: (a) < 0 ? (b) <= (a) + (b) - 1 \
: (b) < 0 && (a) + (b) <= (a))
#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \
((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
: (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \
: (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
......@@ -302,13 +311,10 @@
/* Return 1 if the expression A <op> B would overflow,
where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
assuming MIN and MAX are the minimum and maximum for the result type.
This macro assumes that A | B is a valid integer if both A and B are,
which is true of all known practical hosts. If this is a problem
for you, please let us know how to fix it for your host. */
Arguments should be free of side effects. */
#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
op_result_overflow (a, b, \
_GL_INT_MINIMUM ((a) | (b)), \
_GL_INT_MAXIMUM ((a) | (b)))
_GL_INT_MINIMUM ((b) - (b) + (a)), \
_GL_INT_MAXIMUM ((b) - (b) + (a)))
#endif /* _GL_INTPROPS_H */
......@@ -93,7 +93,7 @@
#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
/* Minimum and maximum values for a integer type under the usual assumption.
/* Minimum and maximum values for an integer type under the usual assumption.
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
......
2011-05-22 Yuanle Song <sylecn@gmail.com>
* nxml/rng-xsd.el (rng-xsd-check-pattern): Use case-sensitive
matching (Bug#8516).
2011-01-22 Jari Aalto <jari.aalto@cante.net>
* vc/vc-dir.el (vc-default-dir-printer): Give edited tag a
different face (Bug#8178).
2011-05-22 Chong Yidong <cyd@stupidchicken.com>
* vc/diff-mode.el (diff-changed): Don't use terminal specs for
defface (Bug#8144).
2011-05-22 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/macroexp.el (macroexpand-all-1): Convert ' to #' for
funcall as well (bug#8712). Warn when performing those conversions.
* emacs-lisp/bytecomp.el (byte-compile-form): Fix error report.
* progmodes/grep.el (grep-mode): Fix it for good (bug#8684)!
2011-05-22 Glenn Morris <rgm@gnu.org>
* files.el (hack-local-variables-prop-line): Small simplifications.
(hack-local-variables, hack-local-variables-prop-line):
If MODE-ONLY, return the mode, rather than just `t'.
2011-05-21 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/grep.el (grep-mode): Fix last change (bug#8684).
2011-05-21 Glenn Morris <rgm@gnu.org>
* files.el (hack-local-variables-prop-line, hack-local-variables):
If only interested in the mode, don't bother doing the other stuff.
* image-mode.el (image-after-revert-hook):
Redraw all frames on which the image is visible. (Bug#8567)
* dired-aux.el (dired-touch-initial): Just use current-time. (Bug#6887)
* wid-edit.el (widget-checklist-match-inline):
Fix 2011-04-19 change. (Bug#8649)
2011-05-20 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/checkdoc.el (checkdoc-sentencespace-region-engine):
......
......@@ -229,14 +229,17 @@ List has a form of (file-name full-file-name (attribute-list))."
(defun dired-touch-initial (files)
"Create initial input value for `touch' command."
(let (initial)
(while files
(let ((current (nth 5 (file-attributes (car files)))))
(if (and initial (not (equal initial current)))
(setq initial (current-time) files nil)
(setq initial current))
(setq files (cdr files))))
(format-time-string "%Y%m%d%H%M.%S" initial)))
;; Nobody can explain what this version is supposed to do. (Bug#6887)
;; Also, the manual says it uses "the present time".
;;; (let (initial)
;;; (while files
;;; (let ((current (nth 5 (file-attributes (car files)))))
;;; (if (and initial (not (equal initial current)))
;;; (setq initial (current-time) files nil)
;;; (setq initial current))
;;; (setq files (cdr files))))
;;; (format-time-string "%Y%m%d%H%M.%S" initial)))
(format-time-string "%Y%m%d%H%M.%S" (current-time)))
(defun dired-do-chxxx (attribute-name program op-symbol arg)
;; Change file attributes (mode, group, owner, timestamp) of marked files and
......
......@@ -3629,7 +3629,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "e34e1bbdb701078d52466c319d8e0cda")
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "7efcfe4f9e0913ae4a87be014010c27f")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
......
......@@ -2892,8 +2892,8 @@ If FORM is a lambda or a macro, byte-compile it as a function."
That command is designed for interactive use only" fn))
(if (and (fboundp (car form))
(eq (car-safe (symbol-function (car form))) 'macro))
(byte-compile-report-error
(format "Forgot to expand macro %s" (car form))))
(byte-compile-log-warning
(format "Forgot to expand macro %s" (car form)) nil :error))
(if (and handler
;; Make sure that function exists. This is important
;; for CL compiler macros since the symbol may be
......
......@@ -169,14 +169,22 @@ Assumes the caller has bound `macroexpand-all-environment'."
;; here, so that any code that cares about the difference will
;; see the same transformation.
;; First arg is a function:
(`(,(and fun (or `apply `mapcar `mapatoms `mapconcat `mapc))
(`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc))
',(and f `(lambda . ,_)) . ,args)
(byte-compile-log-warning
(format "%s quoted with ' rather than with #'"
(list 'lambda (nth 1 f) '...))
t)
;; We don't use `maybe-cons' since there's clearly a change.
(cons fun
(cons (macroexpand-all-1 (list 'function f))
(macroexpand-all-forms args))))
;; Second arg is a function:
(`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args)
(byte-compile-log-warning
(format "%s quoted with ' rather than with #'"
(list 'lambda (nth 1 f) '...))
t)
;; We don't use `maybe-cons' since there's clearly a change.
(cons fun
(cons (macroexpand-all-1 arg1)
......
......@@ -3032,60 +3032,62 @@ n -- to ignore the local variables list.")
(defun hack-local-variables-prop-line (&optional mode-only)
"Return local variables specified in the -*- line.
Ignore any specification for `mode:' and `coding:';
`set-auto-mode' should already have handled `mode:',
`set-auto-coding' should already have handled `coding:'.
If MODE-ONLY is non-nil, all we do is check whether the major
mode is specified, returning t if it is specified. Otherwise,
return an alist of elements (VAR . VAL), where VAR is a variable
and VAL is the specified value."
Returns an alist of elements (VAR . VAL), where VAR is a variable
and VAL is the specified value. Ignores any specification for
`mode:' and `coding:' (which should have already been handled
by `set-auto-mode' and `set-auto-coding', respectively).
Throws an error if the -*- line is malformed.
If MODE-ONLY is non-nil, just returns the symbol specifying the
mode, if there is one, otherwise nil."
(save-excursion
(goto-char (point-min))
(let ((end (set-auto-mode-1))
result mode-specified)
;; Parse the -*- line into the RESULT alist.
;; Also set MODE-SPECIFIED if we see a spec or `mode'.
result)
(cond ((not end)
nil)
((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
;; Simple form: "-*- MODENAME -*-". Already handled.
(setq mode-specified t)
nil)
;; Simple form: "-*- MODENAME -*-".
(if mode-only
(intern (concat (match-string 1) "-mode"))))
(t
;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'
;; (last ";" is optional).
(while (< (point) end)
;; If MODE-ONLY, just check for `mode'.
;; Otherwise, parse the -*- line into the RESULT alist.
(while (and (or (not mode-only)
(not result))
(< (point) end))
(or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
(error "Malformed -*- line"))
(goto-char (match-end 0))
;; There used to be a downcase here,
;; but the manual didn't say so,
;; and people want to set var names that aren't all lc.
(let ((key (intern (match-string 1)))
(val (save-restriction
(narrow-to-region (point) end)
(let ((read-circle nil))
(read (current-buffer))))))
;; It is traditional to ignore
;; case when checking for `mode' in set-auto-mode,
;; so we must do that here as well.
;; That is inconsistent, but we're stuck with it.
;; The same can be said for `coding' in set-auto-coding.
(or (and (equal (downcase (symbol-name key)) "mode")
(setq mode-specified t))
(equal (downcase (symbol-name key)) "coding")
(condition-case nil
(push (cons (if (eq key 'eval)
'eval
(indirect-variable key))
val) result)
(error nil)))
(skip-chars-forward " \t;")))))
(if mode-only
mode-specified
result))))
(let* ((key (intern (match-string 1)))
(val (save-restriction
(narrow-to-region (point) end)
(let ((read-circle nil))
(read (current-buffer)))))
;; It is traditional to ignore
;; case when checking for `mode' in set-auto-mode,
;; so we must do that here as well.
;; That is inconsistent, but we're stuck with it.
;; The same can be said for `coding' in set-auto-coding.
(keyname (downcase (symbol-name key))))
(if mode-only
(and (equal keyname "mode")
(setq result
(intern (concat (symbol-name val) "-mode"))))
(or (equal keyname "coding")
(condition-case nil
(push (cons (if (eq key 'eval)
'eval
(indirect-variable key))
val) result)
(error nil))))
(skip-chars-forward " \t;")))
result)))))
(defun hack-local-variables-filter (variables dir-name)
"Filter local variable settings, querying the user if necessary.
......@@ -3144,8 +3146,10 @@ DIR-NAME is the name of the associated directory. Otherwise it is nil."
(defun hack-local-variables (&optional mode-only)
"Parse and put into effect this buffer's local variables spec.
If MODE-ONLY is non-nil, all we do is check whether the major mode
is specified, returning t if it is specified."
If MODE-ONLY is non-nil, all we do is check whether a \"mode:\"
is specified, and return the corresponding mode symbol, or nil.
In this case, we try to ignore minor-modes, and only return a
major-mode."
(let ((enable-local-variables
(and local-enable-local-variables enable-local-variables))
result)
......@@ -3154,88 +3158,98 @@ is specified, returning t if it is specified."
(report-errors "Directory-local variables error: %s"
(hack-dir-local-variables)))
(when (or mode-only enable-local-variables)
(setq result (hack-local-variables-prop-line mode-only))
;; Look for "Local variables:" line in last page.
(save-excursion
(goto-char (point-max))
(search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
'move)
(when (let ((case-fold-search t))
(search-forward "Local Variables:" nil t))
(skip-chars-forward " \t")
;; suffix is what comes after "local variables:" in its line.
;; prefix is what comes before "local variables:" in its line.
(let ((suffix
(concat
(regexp-quote (buffer-substring (point)
(line-end-position)))
"$"))
(prefix
(concat "^" (regexp-quote
(buffer-substring (line-beginning-position)
(match-beginning 0)))))
beg)
(forward-line 1)
(let ((startpos (point))
endpos
(thisbuf (current-buffer)))
(save-excursion
(unless (let ((case-fold-search t))
(re-search-forward
(concat prefix "[ \t]*End:[ \t]*" suffix)
nil t))
;; This used to be an error, but really all it means is
;; that this may simply not be a local-variables section,
;; so just ignore it.
(message "Local variables list is not properly terminated"))
(beginning-of-line)
(setq endpos (point)))
(with-temp-buffer
(insert-buffer-substring thisbuf startpos endpos)
(goto-char (point-min))
(subst-char-in-region (point) (point-max) ?\^m ?\n)
(while (not (eobp))
;; Discard the prefix.
(if (looking-at prefix)
(delete-region (point) (match-end 0))
(error "Local variables entry is missing the prefix"))
(end-of-line)
;; Discard the suffix.
(if (looking-back suffix)
(delete-region (match-beginning 0) (point))
(error "Local variables entry is missing the suffix"))
(forward-line 1))
(goto-char (point-min))
(while (not (eobp))
;; Find the variable name; strip whitespace.
(skip-chars-forward " \t")
(setq beg (point))
(skip-chars-forward "^:\n")
(if (eolp) (error "Missing colon in local variables entry"))
(skip-chars-backward " \t")
(let* ((str (buffer-substring beg (point)))
(var (let ((read-circle nil))
(read str)))
val)
;; Read the variable value.
(skip-chars-forward "^:")
(forward-char 1)
(let ((read-circle nil))
(setq val (read (current-buffer))))
(if mode-only
(if (eq var 'mode)
(setq result t))
(unless (eq var 'coding)
(condition-case nil
(push (cons (if (eq var 'eval)
'eval
(indirect-variable var))
val) result)
(error nil)))))
(forward-line 1))))))))
;; If MODE-ONLY is non-nil, and the prop line specifies a mode,
;; then we're done, and have no need to scan further.
(unless (and (setq result (hack-local-variables-prop-line mode-only))
mode-only)
;; Look for "Local variables:" line in last page.
(save-excursion
(goto-char (point-max))
(search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
'move)
(when (let ((case-fold-search t))
(search-forward "Local Variables:" nil t))
(skip-chars-forward " \t")
;; suffix is what comes after "local variables:" in its line.
;; prefix is what comes before "local variables:" in its line.
(let ((suffix
(concat
(regexp-quote (buffer-substring (point)
(line-end-position)))
"$"))
(prefix
(concat "^" (regexp-quote
(buffer-substring (line-beginning-position)
(match-beginning 0)))))
beg)
(forward-line 1)
(let ((startpos (point))
endpos
(thisbuf (current-buffer)))
(save-excursion
(unless (let ((case-fold-search t))