emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r118321: Merge from emacs-24; up to 117687


From: Glenn Morris
Subject: [Emacs-diffs] trunk r118321: Merge from emacs-24; up to 117687
Date: Sat, 08 Nov 2014 18:22:20 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118321 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2014-11-08 10:21:38 -0800
message:
  Merge from emacs-24; up to 117687
modified:
  doc/misc/eww.texi              
docmisceww.texi-20140109232239-pttr8zbv7tu1waay-1
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emulation/cua-base.el     cuabase.el-20091113204419-o5vbwnq5f7feedwu-2415
  lisp/emulation/cua-gmrk.el     cuagmrk.el-20091113204419-o5vbwnq5f7feedwu-2416
  lisp/files.el                  files.el-20091113204419-o5vbwnq5f7feedwu-265
  lisp/net/tramp-adb.el          trampadb.el-20121204164216-03wyr5miam215d7f-1
  lisp/net/tramp-gvfs.el         
trampgvfs.el-20091113204419-o5vbwnq5f7feedwu-10898
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
  lisp/net/tramp.el              tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
  lisp/progmodes/cc-fonts.el     ccfonts.el-20091113204419-o5vbwnq5f7feedwu-2930
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/callproc.c                 callproc.c-20091113204419-o5vbwnq5f7feedwu-248
  src/dired.c                    dired.c-20091113204419-o5vbwnq5f7feedwu-171
  src/nsterm.m                   nsterm.m-20091113204419-o5vbwnq5f7feedwu-8747
  src/syntax.c                   syntax.c-20091113204419-o5vbwnq5f7feedwu-180
  src/xgselect.c                 xgselect.c-20091121171556-bypaf8oo9ygoo13w-2
=== modified file 'doc/misc/eww.texi'
--- a/doc/misc/eww.texi 2014-11-07 07:39:00 +0000
+++ b/doc/misc/eww.texi 2014-11-08 18:21:38 +0000
@@ -198,11 +198,11 @@
 @vindex shr-color-visible-distance-min
 @vindex shr-color-visible-luminance-min
 @cindex Contrast
-  EWW (or rather its HTML renderer @code{shr}) use the colors declared
-in the HTML page but adjust them if needed to keep a certain minimum
-contrast.  If that is still to low for you, have a look at the
+  EWW (or rather its HTML renderer @code{shr}) uses the colors declared
+in the HTML page, but adjusts them if needed to keep a certain minimum
+contrast.  If that is still too low for you, you can customize the
 variables @code{shr-color-visible-distance-min} and
address@hidden
address@hidden to get a better contrast.
 
 @node History and Acknowledgments
 @appendix History and Acknowledgments

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-08 17:46:21 +0000
+++ b/lisp/ChangeLog    2014-11-08 18:21:38 +0000
@@ -1,3 +1,39 @@
+2014-11-08  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-check-cached-permissions): Include hop in
+       the constructed Tramp file name.  (Bug#18943)
+
+2014-11-08  Stefan Monnier  <address@hidden>
+
+       * emulation/cua-base.el (cua--select-keymaps): Use region-active-p
+       (bug#18952).
+       (cua-set-mark, cua--post-command-handler-1):
+       * emulation/cua-gmrk.el (cua-cancel-global-mark): Same.
+
+2014-11-08  Michael Albinus  <address@hidden>
+
+       * files.el (file-name-non-special): Wrap the call of
+       `insert-file-contents' by `unwind-protect', in order to set the
+       buffer's file name anyway.  (Bug#18891)
+
+2014-11-08  Alan Mackenzie  <address@hidden>
+
+       Fix wrong bound to c-font-lock-declarators.  Fixes bug #18948.
+       * progmodes/cc-fonts.el (c-font-lock-declarations): Pass
+       "(point-max)" as bound to c-font-lock-declarators, not "limit", as
+       the buffer is sometimes narrowed to less than "limit" (e.g., in
+       the presence of macros).
+
+2014-11-08  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-error-with-buffer): Show connection buffer
+       only when message appeared in minibuffer.  (Bug#18891)
+
+       * net/tramp-adb.el (tramp-adb-handle-file-attributes):
+       * net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
+       * net/tramp-sh.el (tramp-sh-handle-file-attributes): Return nil in
+       case of errors.
+
 2014-11-08  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):

=== modified file 'lisp/emulation/cua-base.el'
--- a/lisp/emulation/cua-base.el        2014-11-01 18:05:30 +0000
+++ b/lisp/emulation/cua-base.el        2014-11-08 18:21:38 +0000
@@ -1015,7 +1015,7 @@
     (or (and cua-auto-mark-last-change
             (cua-pop-to-last-change))
        (pop-to-mark-command)))
-   ((and cua-toggle-set-mark mark-active)
+   ((and cua-toggle-set-mark (region-active-p))
     (cua--deactivate)
     (message "Mark cleared"))
    (t
@@ -1127,7 +1127,7 @@
   (if cua--debug
       (cond
        (cua--rectangle (cua--rectangle-assert))
-       (mark-active (message "Mark=%d Point=%d" (mark t) (point)))))
+       ((region-active-p) (message "Mark=%d Point=%d" (mark t) (point)))))
 
   (if cua-enable-cursor-indications
       (cua--update-indications))
@@ -1186,7 +1186,7 @@
 (defun cua--select-keymaps ()
   ;; Setup conditions for selecting the proper keymaps in cua--keymap-alist.
   (setq cua--ena-region-keymap
-       (and mark-active (not deactivate-mark)))
+       (and (region-active-p) (not deactivate-mark)))
   (setq cua--ena-prefix-override-keymap
        (and cua--ena-region-keymap
             cua-enable-cua-keys

=== modified file 'lisp/emulation/cua-gmrk.el'
--- a/lisp/emulation/cua-gmrk.el        2014-01-01 07:43:34 +0000
+++ b/lisp/emulation/cua-gmrk.el        2014-11-07 19:55:39 +0000
@@ -321,7 +321,7 @@
 (defun cua-cancel-global-mark ()
   "Cancel the global mark."
   (interactive)
-  (if mark-active
+  (if (region-active-p)
       (cua-cancel)
     (if (cua--global-mark-active)
        (cua--deactivate-global-mark t)))

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2014-10-16 19:56:43 +0000
+++ b/lisp/files.el     2014-11-08 18:21:38 +0000
@@ -6670,7 +6670,7 @@
       (`add (concat "/:" (apply operation arguments)))
       (`insert-file-contents
        (let ((visit (nth 1 arguments)))
-         (prog1
+         (unwind-protect
              (apply operation arguments)
            (when (and visit buffer-file-name)
              (setq buffer-file-name (concat "/:" buffer-file-name))))))

=== modified file 'lisp/net/tramp-adb.el'
--- a/lisp/net/tramp-adb.el     2014-11-03 21:49:37 +0000
+++ b/lisp/net/tramp-adb.el     2014-11-08 18:21:38 +0000
@@ -316,17 +316,18 @@
 (defun tramp-adb-handle-file-attributes (filename &optional id-format)
   "Like `file-attributes' for Tramp files."
   (unless id-format (setq id-format 'integer))
-  (with-parsed-tramp-file-name filename nil
-    (with-tramp-file-property
-       v localname (format "file-attributes-%s" id-format)
-      (and
-       (tramp-adb-send-command-and-check
-       v (format "%s -d -l %s"
-                 (tramp-adb-get-ls-command v)
-                 (tramp-shell-quote-argument localname)))
-       (with-current-buffer (tramp-get-buffer v)
-        (tramp-adb-sh-fix-ls-output)
-        (cdar (tramp-do-parse-file-attributes-with-ls v id-format)))))))
+  (ignore-errors
+    (with-parsed-tramp-file-name filename nil
+      (with-tramp-file-property
+         v localname (format "file-attributes-%s" id-format)
+       (and
+        (tramp-adb-send-command-and-check
+         v (format "%s -d -l %s"
+                   (tramp-adb-get-ls-command v)
+                   (tramp-shell-quote-argument localname)))
+        (with-current-buffer (tramp-get-buffer v)
+          (tramp-adb-sh-fix-ls-output)
+          (cdar (tramp-do-parse-file-attributes-with-ls v id-format))))))))
 
 (defun tramp-do-parse-file-attributes-with-ls (vec &optional id-format)
   "Parse `file-attributes' for Tramp files using the ls(1) command."

=== modified file 'lisp/net/tramp-gvfs.el'
--- a/lisp/net/tramp-gvfs.el    2014-11-01 18:05:30 +0000
+++ b/lisp/net/tramp-gvfs.el    2014-11-08 18:21:38 +0000
@@ -720,124 +720,128 @@
 (defun tramp-gvfs-handle-file-attributes (filename &optional id-format)
   "Like `file-attributes' for Tramp files."
   (unless id-format (setq id-format 'integer))
-  ;; Don't modify `last-coding-system-used' by accident.
-  (let ((last-coding-system-used last-coding-system-used)
-       dirp res-symlink-target res-numlinks res-uid res-gid res-access
-       res-mod res-change res-size res-filemodes res-inode res-device)
-    (with-parsed-tramp-file-name filename nil
-      (with-tramp-file-property
-         v localname (format "file-attributes-%s" id-format)
-       (tramp-message v 5 "file attributes: %s" localname)
-       (tramp-gvfs-send-command
-        v "gvfs-info" (tramp-gvfs-url-file-name filename))
-       ;; Parse output ...
-       (with-current-buffer (tramp-get-connection-buffer v)
-         (goto-char (point-min))
-         (when (re-search-forward "attributes:" nil t)
-           ;; ... directory or symlink
-           (goto-char (point-min))
-           (setq dirp (if (re-search-forward "type:\\s-+directory" nil t) t))
-           (goto-char (point-min))
-           (setq res-symlink-target
-                 (if (re-search-forward
-                      "standard::symlink-target:\\s-+\\(\\S-+\\)" nil t)
-                     (match-string 1)))
-           ;; ... number links
-           (goto-char (point-min))
-           (setq res-numlinks
-                 (if (re-search-forward "unix::nlink:\\s-+\\([0-9]+\\)" nil t)
-                     (string-to-number (match-string 1)) 0))
-           ;; ... uid and gid
-           (goto-char (point-min))
-           (setq res-uid
-                 (or (if (eq id-format 'integer)
-                         (if (re-search-forward
-                              "unix::uid:\\s-+\\([0-9]+\\)" nil t)
-                             (string-to-number (match-string 1)))
-                       (if (re-search-forward
-                            "owner::user:\\s-+\\(\\S-+\\)" nil t)
-                           (match-string 1)))
-                     (tramp-get-local-uid id-format)))
-           (setq res-gid
-                 (or (if (eq id-format 'integer)
-                         (if (re-search-forward
-                              "unix::gid:\\s-+\\([0-9]+\\)" nil t)
-                             (string-to-number (match-string 1)))
-                       (if (re-search-forward
-                            "owner::group:\\s-+\\(\\S-+\\)" nil t)
-                           (match-string 1)))
-                     (tramp-get-local-gid id-format)))
-           ;; ... last access, modification and change time
-           (goto-char (point-min))
-           (setq res-access
-                 (if (re-search-forward
-                      "time::access:\\s-+\\([0-9]+\\)" nil t)
-                     (seconds-to-time (string-to-number (match-string 1)))
-                   '(0 0)))
-           (goto-char (point-min))
-           (setq res-mod
-                 (if (re-search-forward
-                      "time::modified:\\s-+\\([0-9]+\\)" nil t)
-                     (seconds-to-time (string-to-number (match-string 1)))
-                   '(0 0)))
-           (goto-char (point-min))
-           (setq res-change
-                 (if (re-search-forward
-                      "time::changed:\\s-+\\([0-9]+\\)" nil t)
-                     (seconds-to-time (string-to-number (match-string 1)))
-                   '(0 0)))
-           ;; ... size
-           (goto-char (point-min))
-           (setq res-size
-                 (if (re-search-forward
-                      "standard::size:\\s-+\\([0-9]+\\)" nil t)
-                     (string-to-number (match-string 1)) 0))
-           ;; ... file mode flags
-           (goto-char (point-min))
-           (setq res-filemodes
-                 (if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t)
-                     (tramp-file-mode-from-int
-                      (string-to-number (match-string 1)))
-                   (if dirp "drwx------" "-rwx------")))
-           ;; ... inode and device
-           (goto-char (point-min))
-           (setq res-inode
-                 (if (re-search-forward "unix::inode:\\s-+\\([0-9]+\\)" nil t)
-                     (string-to-number (match-string 1))
-                   (tramp-get-inode v)))
-           (goto-char (point-min))
-           (setq res-device
-                 (if (re-search-forward "unix::device:\\s-+\\([0-9]+\\)" nil t)
-                     (string-to-number (match-string 1))
-                   (tramp-get-device v)))
+  (ignore-errors
+    ;; Don't modify `last-coding-system-used' by accident.
+    (let ((last-coding-system-used last-coding-system-used)
+         dirp res-symlink-target res-numlinks res-uid res-gid res-access
+         res-mod res-change res-size res-filemodes res-inode res-device)
+      (with-parsed-tramp-file-name filename nil
+       (with-tramp-file-property
+           v localname (format "file-attributes-%s" id-format)
+         (tramp-message v 5 "file attributes: %s" localname)
+         (tramp-gvfs-send-command
+          v "gvfs-info" (tramp-gvfs-url-file-name filename))
+         ;; Parse output ...
+         (with-current-buffer (tramp-get-connection-buffer v)
+           (goto-char (point-min))
+           (when (re-search-forward "attributes:" nil t)
+             ;; ... directory or symlink
+             (goto-char (point-min))
+             (setq dirp (if (re-search-forward "type:\\s-+directory" nil t) t))
+             (goto-char (point-min))
+             (setq res-symlink-target
+                   (if (re-search-forward
+                        "standard::symlink-target:\\s-+\\(\\S-+\\)" nil t)
+                       (match-string 1)))
+             ;; ... number links
+             (goto-char (point-min))
+             (setq res-numlinks
+                   (if (re-search-forward
+                        "unix::nlink:\\s-+\\([0-9]+\\)" nil t)
+                       (string-to-number (match-string 1)) 0))
+             ;; ... uid and gid
+             (goto-char (point-min))
+             (setq res-uid
+                   (or (if (eq id-format 'integer)
+                           (if (re-search-forward
+                                "unix::uid:\\s-+\\([0-9]+\\)" nil t)
+                               (string-to-number (match-string 1)))
+                         (if (re-search-forward
+                              "owner::user:\\s-+\\(\\S-+\\)" nil t)
+                             (match-string 1)))
+                       (tramp-get-local-uid id-format)))
+             (setq res-gid
+                   (or (if (eq id-format 'integer)
+                           (if (re-search-forward
+                                "unix::gid:\\s-+\\([0-9]+\\)" nil t)
+                               (string-to-number (match-string 1)))
+                         (if (re-search-forward
+                              "owner::group:\\s-+\\(\\S-+\\)" nil t)
+                             (match-string 1)))
+                       (tramp-get-local-gid id-format)))
+             ;; ... last access, modification and change time
+             (goto-char (point-min))
+             (setq res-access
+                   (if (re-search-forward
+                        "time::access:\\s-+\\([0-9]+\\)" nil t)
+                       (seconds-to-time (string-to-number (match-string 1)))
+                     '(0 0)))
+             (goto-char (point-min))
+             (setq res-mod
+                   (if (re-search-forward
+                        "time::modified:\\s-+\\([0-9]+\\)" nil t)
+                       (seconds-to-time (string-to-number (match-string 1)))
+                     '(0 0)))
+             (goto-char (point-min))
+             (setq res-change
+                   (if (re-search-forward
+                        "time::changed:\\s-+\\([0-9]+\\)" nil t)
+                       (seconds-to-time (string-to-number (match-string 1)))
+                     '(0 0)))
+             ;; ... size
+             (goto-char (point-min))
+             (setq res-size
+                   (if (re-search-forward
+                        "standard::size:\\s-+\\([0-9]+\\)" nil t)
+                       (string-to-number (match-string 1)) 0))
+             ;; ... file mode flags
+             (goto-char (point-min))
+             (setq res-filemodes
+                   (if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t)
+                       (tramp-file-mode-from-int
+                        (string-to-number (match-string 1)))
+                     (if dirp "drwx------" "-rwx------")))
+             ;; ... inode and device
+             (goto-char (point-min))
+             (setq res-inode
+                   (if (re-search-forward
+                        "unix::inode:\\s-+\\([0-9]+\\)" nil t)
+                       (string-to-number (match-string 1))
+                     (tramp-get-inode v)))
+             (goto-char (point-min))
+             (setq res-device
+                   (if (re-search-forward
+                        "unix::device:\\s-+\\([0-9]+\\)" nil t)
+                       (string-to-number (match-string 1))
+                     (tramp-get-device v)))
 
-           ;; Return data gathered.
-           (list
-            ;; 0. t for directory, string (name linked to) for
-            ;; symbolic link, or nil.
-            (or dirp res-symlink-target)
-            ;; 1. Number of links to file.
-            res-numlinks
-            ;; 2. File uid.
-            res-uid
-            ;; 3. File gid.
-            res-gid
-            ;; 4. Last access time, as a list of integers.
-            ;; 5. Last modification time, likewise.
-            ;; 6. Last status change time, likewise.
-            res-access res-mod res-change
-            ;; 7. Size in bytes (-1, if number is out of range).
-            res-size
-            ;; 8. File modes.
-            res-filemodes
-            ;; 9. t if file's gid would change if file were deleted
-            ;; and recreated.
-            nil
-            ;; 10. Inode number.
-            res-inode
-            ;; 11. Device number.
-            res-device
-            )))))))
+             ;; Return data gathered.
+             (list
+              ;; 0. t for directory, string (name linked to) for
+              ;; symbolic link, or nil.
+              (or dirp res-symlink-target)
+              ;; 1. Number of links to file.
+              res-numlinks
+              ;; 2. File uid.
+              res-uid
+              ;; 3. File gid.
+              res-gid
+              ;; 4. Last access time, as a list of integers.
+              ;; 5. Last modification time, likewise.
+              ;; 6. Last status change time, likewise.
+              res-access res-mod res-change
+              ;; 7. Size in bytes (-1, if number is out of range).
+              res-size
+              ;; 8. File modes.
+              res-filemodes
+              ;; 9. t if file's gid would change if file were deleted
+              ;; and recreated.
+              nil
+              ;; 10. Inode number.
+              res-inode
+              ;; 11. Device number.
+              res-device
+              ))))))))
 
 (defun tramp-gvfs-handle-file-directory-p (filename)
   "Like `file-directory-p' for Tramp files."

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-11-05 05:08:57 +0000
+++ b/lisp/net/tramp-sh.el      2014-11-08 18:21:38 +0000
@@ -1103,23 +1103,24 @@
 (defun tramp-sh-handle-file-attributes (filename &optional id-format)
   "Like `file-attributes' for Tramp files."
   (unless id-format (setq id-format 'integer))
-  ;; Don't modify `last-coding-system-used' by accident.
-  (let ((last-coding-system-used last-coding-system-used))
-    (with-parsed-tramp-file-name (expand-file-name filename) nil
-      (with-tramp-file-property
-         v localname (format "file-attributes-%s" id-format)
-       (save-excursion
-         (tramp-convert-file-attributes
-          v
-          (or
-           (cond
-            ((tramp-get-remote-stat v)
-             (tramp-do-file-attributes-with-stat v localname id-format))
-            ((tramp-get-remote-perl v)
-             (tramp-do-file-attributes-with-perl v localname id-format))
-            (t nil))
-           ;; The scripts could fail, for example with huge file size.
-           (tramp-do-file-attributes-with-ls v localname id-format))))))))
+  (ignore-errors
+    ;; Don't modify `last-coding-system-used' by accident.
+    (let ((last-coding-system-used last-coding-system-used))
+      (with-parsed-tramp-file-name (expand-file-name filename) nil
+       (with-tramp-file-property
+           v localname (format "file-attributes-%s" id-format)
+         (save-excursion
+           (tramp-convert-file-attributes
+            v
+            (or
+             (cond
+              ((tramp-get-remote-stat v)
+               (tramp-do-file-attributes-with-stat v localname id-format))
+              ((tramp-get-remote-perl v)
+               (tramp-do-file-attributes-with-perl v localname id-format))
+              (t nil))
+             ;; The scripts could fail, for example with huge file size.
+             (tramp-do-file-attributes-with-ls v localname id-format)))))))))
 
 (defun tramp-do-file-attributes-with-ls (vec localname &optional id-format)
   "Implement `file-attributes' for Tramp files using the ls(1) command."

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2014-11-01 18:05:30 +0000
+++ b/lisp/net/tramp.el 2014-11-08 18:21:38 +0000
@@ -1604,7 +1604,9 @@
        (when (and buf
                   tramp-message-show-message
                   (not (zerop tramp-verbose))
-                  (not (tramp-completion-mode-p)))
+                  (not (tramp-completion-mode-p))
+                  ;; Show only when Emacs has started already.
+                  (current-message))
          (let ((enable-recursive-minibuffers t))
            ;; `tramp-error' does not show messages.  So we must do it
            ;; ourselves.
@@ -3917,7 +3919,8 @@
                  (tramp-file-name-method vec)
                  (tramp-file-name-user vec)
                  (tramp-file-name-host vec)
-                 (tramp-file-name-localname vec))
+                 (tramp-file-name-localname vec)
+                 (tramp-file-name-hop vec))
                 (intern suffix))))
               (remote-uid
                (tramp-get-connection-property

=== modified file 'lisp/progmodes/cc-fonts.el'
--- a/lisp/progmodes/cc-fonts.el        2014-10-04 04:03:49 +0000
+++ b/lisp/progmodes/cc-fonts.el        2014-11-08 18:21:38 +0000
@@ -1255,6 +1255,8 @@
        c-font-lock-maybe-decl-faces
 
        (lambda (match-pos inside-macro)
+        ;; Note to maintainers: don't use `limit' inside this lambda form;
+        ;; c-find-decl-spots sometimes narrows to less than `limit'.
         (setq start-pos (point))
         (when
          ;; The result of the form below is true when we don't recognize a
@@ -1487,7 +1489,7 @@
                        ;; At a real declaration?
                        (if (memq (c-forward-type t) '(t known found decltype))
                            (progn
-                             (c-font-lock-declarators limit t is-typedef)
+                             (c-font-lock-declarators (point-max) t is-typedef)
                              nil)
                          ;; False alarm.  Return t to go on to the next check.
                          (goto-char start-pos)

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-11-08 11:11:50 +0000
+++ b/src/ChangeLog     2014-11-08 18:21:38 +0000
@@ -1,3 +1,26 @@
+2014-11-08  Jan Djärv  <address@hidden>
+
+       * nsterm.m (run): Only use non-system event loop if OSX version is
+       exactly 10.9 (Bug#18993).
+
+2014-11-08  Michael Albinus  <address@hidden>
+
+       * callproc.c (encode_current_directory): Support handling of file
+       names prepended by "/:".  (Bug#18891)
+
+2014-11-08  Alan Mackenzie  <address@hidden>
+
+       * syntax.c (back_comment): Fix off-by-one error (bug#18022).
+
+2014-11-08  Dima Kogan  <address@hidden>
+
+       * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
+
+2014-11-08  Michael Albinus  <address@hidden>
+
+       * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
+       raises an error.  (Bug#18891)
+
 2014-11-08  Martin Rudalics  <address@hidden>
 
        * frame.c (adjust_frame_size): Call x_set_window_size only if

=== modified file 'src/callproc.c'
--- a/src/callproc.c    2014-09-23 17:03:48 +0000
+++ b/src/callproc.c    2014-11-08 18:21:38 +0000
@@ -127,6 +127,14 @@
 
   dir = expand_and_dir_to_file (dir, Qnil);
 
+  if (NILP (Ffile_accessible_directory_p (dir)))
+    report_file_error ("Setting current directory",
+                      BVAR (current_buffer, directory));
+
+  /* Remove "/:" from dir.  */
+  if (! NILP (Fstring_match (build_string ("^/:"), dir, Qnil)))
+    dir = Fsubstring (dir, make_number (2), Qnil);
+
   if (STRING_MULTIBYTE (dir))
     dir = ENCODE_FILE (dir);
   if (! file_accessible_directory_p (dir))

=== modified file 'src/dired.c'
--- a/src/dired.c       2014-08-03 20:34:33 +0000
+++ b/src/dired.c       2014-11-08 18:21:38 +0000
@@ -909,7 +909,10 @@
   Lisp_Object encoded;
   Lisp_Object handler;
 
-  filename = Fexpand_file_name (filename, Qnil);
+  filename = internal_condition_case_2 (Fexpand_file_name, filename, Qnil,
+                                       Qt, Fidentity);
+  if (!STRINGP (filename))
+    return Qnil;
 
   /* If the file name has special constructs in it,
      call the corresponding file handler.  */

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2014-11-08 08:47:45 +0000
+++ b/src/nsterm.m      2014-11-08 18:21:38 +0000
@@ -4501,15 +4501,15 @@
 #ifdef NS_IMPL_COCOA
 - (void)run
 {
-#ifndef NSAppKitVersionNumber10_8
-#define NSAppKitVersionNumber10_8 1187
+#ifndef NSAppKitVersionNumber10_9
+#define NSAppKitVersionNumber10_9 1265
 #endif
 
-  if (NSAppKitVersionNumber <= NSAppKitVersionNumber10_8)
-    {
-      [super run];
-      return;
-    }
+    if ((int)NSAppKitVersionNumber != NSAppKitVersionNumber10_9)
+      {
+        [super run];
+        return;
+      }
 
   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 

=== modified file 'src/syntax.c'
--- a/src/syntax.c      2014-09-07 07:04:01 +0000
+++ b/src/syntax.c      2014-11-08 18:21:38 +0000
@@ -825,7 +825,7 @@
     {
       from = comment_end;
       from_byte = comment_end_byte;
-      UPDATE_SYNTAX_TABLE_FORWARD (comment_end - 1);
+      UPDATE_SYNTAX_TABLE_FORWARD (comment_end);
     }
   /* If comstart_pos is set and we get here (ie. didn't jump to `lossage'
      or `done'), then we've found the beginning of the non-nested comment.  */

=== modified file 'src/xgselect.c'
--- a/src/xgselect.c    2014-04-22 21:32:51 +0000
+++ b/src/xgselect.c    2014-11-08 18:21:38 +0000
@@ -55,19 +55,28 @@
   GPollFD *gfds = gfds_buf;
   int gfds_size = ARRAYELTS (gfds_buf);
   int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1;
-  int i, nfds, tmo_in_millisec;
+  bool context_acquired = false;
+  int i, nfds, tmo_in_millisec = -1;
   bool need_to_dispatch;
   USE_SAFE_ALLOCA;
 
   context = g_main_context_default ();
+  context_acquired = g_main_context_acquire (context);
+  /* FIXME: If we couldn't acquire the context, we just silently proceed
+     because this function handles more than just glib file descriptors.
+     Note that, as implemented, this failure is completely silent: there is
+     no feedback to the caller.  */
 
   if (rfds) all_rfds = *rfds;
   else FD_ZERO (&all_rfds);
   if (wfds) all_wfds = *wfds;
   else FD_ZERO (&all_wfds);
 
-  n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec,
-                                gfds, gfds_size);
+  n_gfds = (context_acquired
+           ? g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec,
+                                   gfds, gfds_size)
+           : -1);
+
   if (gfds_size < n_gfds)
     {
       SAFE_NALLOCA (gfds, sizeof *gfds, n_gfds);
@@ -152,6 +161,9 @@
       errno = pselect_errno;
     }
 
+  if (context_acquired)
+    g_main_context_release (context);
+
   /* To not have to recalculate timeout, return like this.  */
   if ((our_fds > 0 || (nfds == 0 && tmop == &tmo)) && (retval == 0))
     {


reply via email to

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