emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101485: * lisp/emacs-lisp/warnings.e


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101485: * lisp/emacs-lisp/warnings.el: Fix commenting convention.
Date: Sun, 19 Sep 2010 02:05:26 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101485
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2010-09-19 02:05:26 +0200
message:
  * lisp/emacs-lisp/warnings.el: Fix commenting convention.
  (display-warning): Use special mode and make the buffer read-only.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/warnings.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-18 17:23:12 +0000
+++ b/lisp/ChangeLog    2010-09-19 00:05:26 +0000
@@ -1,3 +1,8 @@
+2010-09-19  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/warnings.el: Fix commenting convention.
+       (display-warning): Use special mode and make the buffer read-only.
+
 2010-09-18  Jay Belanger  <address@hidden>
 
        * calc/calc-prog.el (calc-read-parse-table-part): Don't "fix" the

=== modified file 'lisp/emacs-lisp/warnings.el'
--- a/lisp/emacs-lisp/warnings.el       2010-01-13 08:35:10 +0000
+++ b/lisp/emacs-lisp/warnings.el       2010-09-19 00:05:26 +0000
@@ -119,9 +119,9 @@
   :type '(repeat (repeat symbol))
   :version "22.1")
 
-;;; The autoload cookie is so that programs can bind this variable
-;;; safely, testing the existing value, before they call one of the
-;;; warnings functions.
+;; The autoload cookie is so that programs can bind this variable
+;; safely, testing the existing value, before they call one of the
+;; warnings functions.
 ;;;###autoload
 (defvar warning-prefix-function nil
   "Function to generate warning prefixes.
@@ -132,9 +132,9 @@
 and the function can insert text in it.  This text becomes
 the beginning of the warning.")
 
-;;; The autoload cookie is so that programs can bind this variable
-;;; safely, testing the existing value, before they call one of the
-;;; warnings functions.
+;; The autoload cookie is so that programs can bind this variable
+;; safely, testing the existing value, before they call one of the
+;; warnings functions.
 ;;;###autoload
 (defvar warning-series nil
   "Non-nil means treat multiple `display-warning' calls as a series.
@@ -146,16 +146,16 @@
 also call that function before the next warning.")
 (put 'warning-series 'risky-local-variable t)
 
-;;; The autoload cookie is so that programs can bind this variable
-;;; safely, testing the existing value, before they call one of the
-;;; warnings functions.
+;; The autoload cookie is so that programs can bind this variable
+;; safely, testing the existing value, before they call one of the
+;; warnings functions.
 ;;;###autoload
 (defvar warning-fill-prefix nil
   "Non-nil means fill each warning text using this string as `fill-prefix'.")
 
-;;; The autoload cookie is so that programs can bind this variable
-;;; safely, testing the existing value, before they call one of the
-;;; warnings functions.
+;; The autoload cookie is so that programs can bind this variable
+;; safely, testing the existing value, before they call one of the
+;; warnings functions.
 ;;;###autoload
 (defvar warning-type-format (purecopy " (%s)")
   "Format for displaying the warning type in the warning message.
@@ -241,6 +241,8 @@
        (with-current-buffer buffer
           ;; If we created the buffer, disable undo.
           (unless old
+            (special-mode)
+            (setq buffer-read-only t)
             (setq buffer-undo-list t))
          (goto-char (point-max))
          (when (and warning-series (symbolp warning-series))
@@ -248,6 +250,7 @@
                  (prog1 (point-marker)
                    (unless (eq warning-series t)
                      (funcall warning-series)))))
+          (let ((inhibit-read-only t))
          (unless (bolp)
            (newline))
          (setq start (point))
@@ -262,7 +265,7 @@
            (let ((fill-prefix warning-fill-prefix)
                  (fill-column 78))
              (fill-region start (point))))
-         (setq end (point))
+            (setq end (point)))
          (when (and (markerp warning-series)
                     (eq (marker-buffer warning-series) buffer))
            (goto-char warning-series)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]