emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111786: Merge from emacs-24; up to r


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111786: Merge from emacs-24; up to r111266
Date: Thu, 14 Feb 2013 22:35:54 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111786 [merge]
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2013-02-14 22:35:54 -0800
message:
  Merge from emacs-24; up to r111266
modified:
  ChangeLog
  configure.ac
  doc/lispref/ChangeLog
  doc/lispref/modes.texi
  lisp/ChangeLog
  lisp/emacs-lisp/easy-mmode.el
  lisp/net/goto-addr.el
  lisp/progmodes/python.el
  lisp/xml.el
  src/ChangeLog
  src/lisp.h
  src/w32.c
  src/w32proc.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-02-12 03:52:04 +0000
+++ b/ChangeLog 2013-02-15 06:35:54 +0000
@@ -1,3 +1,8 @@
+2013-02-15  Paul Eggert  <address@hidden>
+
+       Fix AIX port (Bug#13650).
+       * configure.ac (DATA_START, DATA_SEG_BITS): Set to 0x20000000 on AIX.
+
 2013-02-12  Eli Zaretskii  <address@hidden>
 
        * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/memrchr.$(O).

=== modified file 'configure.ac'
--- a/configure.ac      2013-02-12 00:51:24 +0000
+++ b/configure.ac      2013-02-15 06:35:54 +0000
@@ -3750,6 +3750,11 @@
     AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })])
     ;;
 
+  aix*)
+    dnl This works with 32-bit executables; Emacs doesn't support 64-bit.
+    AC_DEFINE(DATA_START, [0x20000000])
+    AC_DEFINE(DATA_SEG_BITS, [0x20000000])
+    ;;
   hpux*)
     dnl The data segment on this machine always starts at address 0x40000000.
     AC_DEFINE(DATA_START, [0x40000000])

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2013-02-13 04:31:09 +0000
+++ b/doc/lispref/ChangeLog     2013-02-15 06:35:54 +0000
@@ -1,3 +1,7 @@
+2013-02-14  Glenn Morris  <address@hidden>
+
+       * modes.texi (Basic Major Modes): 'z' no longer bound in special-mode.
+
 2013-02-13  Glenn Morris  <address@hidden>
 
        * objects.texi (Char-Table Type): Add footnote about #^^.

=== modified file 'doc/lispref/modes.texi'
--- a/doc/lispref/modes.texi    2013-02-13 04:31:09 +0000
+++ b/doc/lispref/modes.texi    2013-02-15 06:35:54 +0000
@@ -905,9 +905,8 @@
 of @code{special} (@pxref{Major Mode Conventions}).
 
 Special mode sets the buffer to read-only.  Its keymap defines several
-common bindings, including @kbd{q} for @code{quit-window}, @kbd{z} for
address@hidden, and @kbd{g} for @code{revert-buffer}
-(@pxref{Reverting}).
+common bindings, including @kbd{q} for @code{quit-window} and @kbd{g}
+for @code{revert-buffer} (@pxref{Reverting}).
 
 An example of a major mode derived from Special mode is Buffer Menu
 mode, which is used by the @file{*Buffer List*} buffer.  @xref{List

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-15 01:30:11 +0000
+++ b/lisp/ChangeLog    2013-02-15 06:35:54 +0000
@@ -1,3 +1,30 @@
+2013-02-15  Michael Albinus  <address@hidden>
+
+       * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
+
+2013-02-15  Stefan Monnier  <address@hidden>
+
+       * net/goto-addr.el (goto-address-fontify): Add start and end args.
+       (goto-address-fontify-region): Use them instead of narrowing, so
+       syntax-ppss has access to the whole buffer.
+
+2013-02-15  Fabián Ezequiel Gallina  <address@hidden>
+
+       * progmodes/python.el: Explain how to restore "cc-mode"-like
+       forward-sexp movement in header documentation (Bug#13642).
+       (python-nav--forward-sexp): Behave like emacs-lisp-mode in
+       comments and strings (GH bug 114).
+
+2013-02-15  Fabián Ezequiel Gallina  <address@hidden>
+
+       * progmodes/python.el (python-info-current-defun): Fix current
+       defun detection (Bug#13618).
+
+2013-02-15  Chong Yidong  <address@hidden>
+
+       * xml.el (xml-parse-string): Fix typo in handling of bad character
+       references.
+
 2013-02-15  Glenn Morris  <address@hidden>
 
        * play/fortune.el (fortune-compile): Simplify and fix previous change.

=== modified file 'lisp/emacs-lisp/easy-mmode.el'
--- a/lisp/emacs-lisp/easy-mmode.el     2013-01-01 09:11:05 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el     2013-02-14 17:16:47 +0000
@@ -132,13 +132,14 @@
 :require SYM   Same as in `defcustom'.
 :variable PLACE        The location to use instead of the variable MODE to 
store
                the state of the mode.  This can be simply a different
-               named variable, or more generally anything that can be used
-               with the CL macro `setf'.  PLACE can also be of the form
-               \(GET . SET), where GET is an expression that returns the
-               current state, and SET is a function that takes one argument,
-               the new state, and sets it.  If you specify a :variable,
-               this function does not define a MODE variable (nor any of
-               the terms used in :variable).
+               named variable, or a generalized variable.
+               PLACE can also be of the form \(GET . SET), where GET is
+               an expression that returns the current state, and SET is
+               a function that takes one argument, the new state, and
+               sets it.  If you specify a :variable, this function does
+               not define a MODE variable (nor any of the terms used
+               in :variable).
+
 :after-hook     A single lisp form which is evaluated after the mode hooks
                 have been run.  It should not be quoted.
 

=== modified file 'lisp/net/goto-addr.el'
--- a/lisp/net/goto-addr.el     2013-01-01 09:11:05 +0000
+++ b/lisp/net/goto-addr.el     2013-02-14 15:53:46 +0000
@@ -156,18 +156,19 @@
 
 (defvar goto-address-prog-mode)
 
-(defun goto-address-fontify ()
+(defun goto-address-fontify (&optional start end)
   "Fontify the URLs and e-mail addresses in the current buffer.
 This function implements `goto-address-highlight-p'
 and `goto-address-fontify-p'."
   ;; Clean up from any previous go.
-  (goto-address-unfontify (point-min) (point-max))
+  (goto-address-unfontify (or start (point-min)) (or end (point-max)))
   (save-excursion
     (let ((inhibit-point-motion-hooks t))
-      (goto-char (point-min))
+      (goto-char (or start (point-min)))
       (when (or (eq t goto-address-fontify-maximum-size)
-               (< (- (point-max) (point)) goto-address-fontify-maximum-size))
-       (while (re-search-forward goto-address-url-regexp nil t)
+               (< (- (or end (point-max)) (point))
+                   goto-address-fontify-maximum-size))
+       (while (re-search-forward goto-address-url-regexp end t)
          (let* ((s (match-beginning 0))
                 (e (match-end 0))
                 this-overlay)
@@ -187,8 +188,8 @@
              (overlay-put this-overlay
                           'keymap goto-address-highlight-keymap)
              (overlay-put this-overlay 'goto-address t))))
-       (goto-char (point-min))
-       (while (re-search-forward goto-address-mail-regexp nil t)
+       (goto-char (or start (point-min)))
+       (while (re-search-forward goto-address-mail-regexp end t)
          (let* ((s (match-beginning 0))
                 (e (match-end 0))
                 this-overlay)
@@ -212,11 +213,9 @@
 (defun goto-address-fontify-region (start end)
   "Fontify URLs and e-mail addresses in the given region."
   (save-excursion
-    (save-restriction
-      (let ((beg-line (progn (goto-char start) (line-beginning-position)))
-           (end-line (progn (goto-char end) (line-end-position))))
-       (narrow-to-region beg-line end-line)
-       (goto-address-fontify)))))
+    (let ((beg-line (progn (goto-char start) (line-beginning-position)))
+          (end-line (progn (goto-char end) (line-end-position))))
+      (goto-address-fontify beg-line end-line))))
 
 ;; code to find and goto addresses; much of this has been blatantly
 ;; snarfed from browse-url.el

=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el  2013-02-02 06:04:06 +0000
+++ b/lisp/progmodes/python.el  2013-02-15 06:35:54 +0000
@@ -54,8 +54,13 @@
 ;; `python-nav-beginning-of-statement', `python-nav-end-of-statement',
 ;; `python-nav-beginning-of-block' and `python-nav-end-of-block' are
 ;; included but no bound to any key.  At last but not least the
-;; specialized `python-nav-forward-sexp' allows easy
-;; navigation between code blocks.
+;; specialized `python-nav-forward-sexp' allows easy navigation
+;; between code blocks.  If you prefer `cc-mode'-like `forward-sexp'
+;; movement, setting `forward-sexp-function' to nil is enough, You can
+;; do that using the `python-mode-hook':
+
+;; (add-hook 'python-mode-hook
+;;           (lambda () (setq forward-sexp-function nil)))
 
 ;; Shell interaction: is provided and allows you to execute easily any
 ;; block of code of your current buffer in an inferior Python process.
@@ -1349,13 +1354,10 @@
                            're-search-backward))
            (context-type (python-syntax-context-type)))
       (cond
-       ((eq context-type 'string)
+       ((memq context-type '(string comment))
         ;; Inside of a string, get out of it.
-        (while (and (funcall re-search-fn "[\"']" nil t)
-                    (python-syntax-context 'string))))
-       ((eq context-type 'comment)
-        ;; Inside of a comment, just move forward.
-        (python-util-forward-comment dir))
+        (let ((forward-sexp-function))
+          (forward-sexp dir)))
        ((or (eq context-type 'paren)
             (and forward-p (looking-at (python-rx open-paren)))
             (and (not forward-p)
@@ -1378,16 +1380,16 @@
                 (save-excursion
                   (python-nav-lisp-forward-sexp-safe dir)
                   (point)))
-              (next-sexp-context
-               (save-excursion
-                 (goto-char next-sexp-pos)
-                 (cond
-                  ((python-info-beginning-of-block-p) 'block-start)
-                  ((python-info-end-of-block-p) 'block-end)
-                  ((python-info-beginning-of-statement-p) 'statement-start)
-                  ((python-info-end-of-statement-p) 'statement-end)
-                  ((python-info-statement-starts-block-p) 'starts-block)
-                  ((python-info-statement-ends-block-p) 'ends-block)))))
+               (next-sexp-context
+                (save-excursion
+                  (goto-char next-sexp-pos)
+                  (cond
+                   ((python-info-beginning-of-block-p) 'block-start)
+                   ((python-info-end-of-block-p) 'block-end)
+                   ((python-info-beginning-of-statement-p) 'statement-start)
+                   ((python-info-end-of-statement-p) 'statement-end)
+                   ((python-info-statement-starts-block-p) 'starts-block)
+                   ((python-info-statement-ends-block-p) 'ends-block)))))
           (if forward-p
               (cond ((and (not (eobp))
                           (python-info-current-line-empty-p))
@@ -1411,8 +1413,8 @@
                     (t (goto-char next-sexp-pos)))
             (cond ((and (not (bobp))
                         (python-info-current-line-empty-p))
-                     (python-util-forward-comment dir)
-                     (python-nav--forward-sexp dir))
+                   (python-util-forward-comment dir)
+                   (python-nav--forward-sexp dir))
                   ((eq context 'block-end)
                    (python-nav-beginning-of-block))
                   ((eq context 'statement-end)
@@ -2946,40 +2948,61 @@
 This function is compatible to be used as
 `add-log-current-defun-function' since it returns nil if point is
 not inside a defun."
-    (save-restriction
-      (widen)
-      (save-excursion
-        (end-of-line 1)
-        (let ((names)
-              (starting-indentation
-               (save-excursion
-                 (and
-                  (python-nav-beginning-of-defun 1)
-                  ;; This extra number is just for checking code
-                  ;; against indentation to work well on first run.
-                  (+ (current-indentation) 4))))
-              (starting-point (point)))
-          ;; Check point is inside a defun.
-          (when (and starting-indentation
-                     (< starting-point
+  (save-restriction
+    (widen)
+    (save-excursion
+      (end-of-line 1)
+      (let ((names)
+            (starting-indentation (current-indentation))
+            (starting-pos (point))
+            (first-run t)
+            (last-indent)
+            (type))
+        (catch 'exit
+          (while (python-nav-beginning-of-defun 1)
+            (when (and
+                   (or (not last-indent)
+                       (< (current-indentation) last-indent))
+                   (or
+                    (and first-run
                          (save-excursion
-                           (python-nav-end-of-defun)
-                           (point))))
-            (catch 'exit
-              (while (python-nav-beginning-of-defun 1)
-                (when (< (current-indentation) starting-indentation)
-                  (setq starting-indentation (current-indentation))
-                  (setq names
-                        (cons
-                         (if (not include-type)
-                             (match-string-no-properties 1)
-                           (mapconcat 'identity
-                                      (split-string
-                                       (match-string-no-properties 0)) " "))
-                         names)))
-                (and (= (current-indentation) 0) (throw 'exit t)))))
-          (and names
-               (mapconcat (lambda (string) string) names "."))))))
+                           ;; If this is the first run, we may add
+                           ;; the current defun at point.
+                           (setq first-run nil)
+                           (goto-char starting-pos)
+                           (python-nav-beginning-of-statement)
+                           (beginning-of-line 1)
+                           (looking-at-p
+                            python-nav-beginning-of-defun-regexp)))
+                    (< starting-pos
+                       (save-excursion
+                         (let ((min-indent
+                                (+ (current-indentation)
+                                   python-indent-offset)))
+                           (if (< starting-indentation  min-indent)
+                               ;; If the starting indentation is not
+                               ;; within the min defun indent make the
+                               ;; check fail.
+                               starting-pos
+                             ;; Else go to the end of defun and add
+                             ;; up the current indentation to the
+                             ;; ending position.
+                             (python-nav-end-of-defun)
+                             (+ (point)
+                                (if (>= (current-indentation) min-indent)
+                                    (1+ (current-indentation))
+                                  0))))))))
+              (setq last-indent (current-indentation))
+              (if (or (not include-type) type)
+                  (setq names (cons (match-string-no-properties 1) names))
+                (let ((match (split-string (match-string-no-properties 0))))
+                  (setq type (car match))
+                  (setq names (cons (cadr match) names)))))
+            ;; Stop searching ASAP.
+            (and (= (current-indentation) 0) (throw 'exit t))))
+        (and names
+             (concat (and type (format "%s " type))
+                     (mapconcat 'identity names ".")))))))
 
 (defun python-info-current-symbol (&optional replace-self)
   "Return current symbol using dotty syntax.

=== modified file 'lisp/xml.el'
--- a/lisp/xml.el       2013-01-23 06:25:50 +0000
+++ b/lisp/xml.el       2013-02-13 07:24:11 +0000
@@ -611,7 +611,7 @@
                   xml-validating-parser
                   (error "XML: (Validity) Invalid character reference `%s'"
                          (match-string 0)))
-             (replace-match (or (string val) xml-undefined-entity) t t))
+             (replace-match (if val (string val) xml-undefined-entity) t t))
          ;; For an entity reference, search again from the start of
          ;; the replaced text, since the replacement can contain
          ;; entity or character references, or markup.
@@ -620,7 +620,7 @@
          (and (null val)
               xml-validating-parser
               (error "XML: (Validity) Undefined entity `%s'" ref))
-         (replace-match (cdr val) t t)
+         (replace-match (or (cdr val) xml-undefined-entity) t t)
          (goto-char (match-beginning 0)))
        ;; Check for XML bombs.
        (and xml-entity-expansion-limit

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-02-14 19:01:12 +0000
+++ b/src/ChangeLog     2013-02-15 06:35:54 +0000
@@ -1,3 +1,23 @@
+2013-02-15  Paul Eggert  <address@hidden>
+
+       Fix AIX port (Bug#13650).
+       * lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
+       Fix bug introduced in 2012-07-27 change.  DATA_SEG_BITS, if set,
+       was #undeffed earlier, so it cannot be used as a macro here.
+       Use the constant and not the macro.
+
+2013-02-15  Eli Zaretskii  <address@hidden>
+
+       * w32proc.c (new_child): If no vacant slots are found in
+       child_procs[], make another pass looking for slots whose process
+       has exited or died.  (Bug#13546)
+
+       * w32.c (sys_pipe): When failing due to file descriptors above
+       MAXDESC, set errno to EMFILE.
+       (_sys_read_ahead): Update cp->status when failing to read serial
+       communications input, so that the status doesn't stay at
+       STATUS_READ_IN_PROGRESS.  (Bug#13546)
+
 2013-02-14  Jan Djärv  <address@hidden>
 
        * gtkutil.c (tb_size_cb): New function.

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2013-02-11 23:37:18 +0000
+++ b/src/lisp.h        2013-02-15 06:35:54 +0000
@@ -505,13 +505,9 @@
   (XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS)  \
        + ((intptr_t) (ptr) & VALMASK)))
 
-#if DATA_SEG_BITS
 /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers
    which were stored in a Lisp_Object.  */
 #define XPNTR(a) ((uintptr_t) ((XLI (a) & VALMASK)) | DATA_SEG_BITS))
-#else
-#define XPNTR(a) ((uintptr_t) (XLI (a) & VALMASK))
-#endif
 
 #endif /* not USE_LSB_TAG */
 

=== modified file 'src/w32.c'
--- a/src/w32.c 2013-02-02 17:14:24 +0000
+++ b/src/w32.c 2013-02-15 06:35:54 +0000
@@ -6800,6 +6800,7 @@
        {
          _close (phandles[0]);
          _close (phandles[1]);
+         errno = EMFILE;
          rc = -1;
        }
       else
@@ -6873,19 +6874,31 @@
 
       /* Configure timeouts for blocking read.  */
       if (!GetCommTimeouts (hnd, &ct))
-       return STATUS_READ_ERROR;
+       {
+         cp->status = STATUS_READ_ERROR;
+         return STATUS_READ_ERROR;
+       }
       ct.ReadIntervalTimeout           = 0;
       ct.ReadTotalTimeoutMultiplier    = 0;
       ct.ReadTotalTimeoutConstant      = 0;
       if (!SetCommTimeouts (hnd, &ct))
-       return STATUS_READ_ERROR;
+       {
+         cp->status = STATUS_READ_ERROR;
+         return STATUS_READ_ERROR;
+       }
 
       if (!ReadFile (hnd, &cp->chr, sizeof (char), (DWORD*) &rc, ovl))
        {
          if (GetLastError () != ERROR_IO_PENDING)
-           return STATUS_READ_ERROR;
+           {
+             cp->status = STATUS_READ_ERROR;
+             return STATUS_READ_ERROR;
+           }
          if (!GetOverlappedResult (hnd, ovl, (DWORD*) &rc, TRUE))
-           return STATUS_READ_ERROR;
+           {
+             cp->status = STATUS_READ_ERROR;
+             return STATUS_READ_ERROR;
+           }
        }
     }
   else if (fd_info[fd].flags & FILE_SOCKET)

=== modified file 'src/w32proc.c'
--- a/src/w32proc.c     2013-02-02 17:14:24 +0000
+++ b/src/w32proc.c     2013-02-15 06:35:54 +0000
@@ -803,6 +803,33 @@
     if (!CHILD_ACTIVE (cp) && cp->procinfo.hProcess == NULL)
       goto Initialize;
   if (child_proc_count == MAX_CHILDREN)
+    {
+      DebPrint (("new_child: No vacant slots, looking for dead processes\n"));
+      for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--)
+       if (!CHILD_ACTIVE (cp) && cp->procinfo.hProcess)
+         {
+           DWORD status = 0;
+
+           if (!GetExitCodeProcess (cp->procinfo.hProcess, &status))
+             {
+               DebPrint (("new_child.GetExitCodeProcess: error %lu for PID 
%lu\n",
+                          GetLastError (), cp->procinfo.dwProcessId));
+               status = STILL_ACTIVE;
+             }
+           if (status != STILL_ACTIVE
+               || WaitForSingleObject (cp->procinfo.hProcess, 0) == 
WAIT_OBJECT_0)
+             {
+               DebPrint (("new_child: Freeing slot of dead process %d\n",
+                          cp->procinfo.dwProcessId));
+               CloseHandle (cp->procinfo.hProcess);
+               cp->procinfo.hProcess = NULL;
+               CloseHandle (cp->procinfo.hThread);
+               cp->procinfo.hThread = NULL;
+               goto Initialize;
+             }
+         }
+    }
+  if (child_proc_count == MAX_CHILDREN)
     return NULL;
   cp = &child_procs[child_proc_count++];
 


reply via email to

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