Now on revision 109817. ------------------------------------------------------------ revno: 109817 committer: Chong Yidong branch nick: trunk timestamp: Thu 2012-08-30 11:45:51 +0800 message: Improve obsolescence message of display-buffer-reuse-frames. * lisp/window.el (display-buffer-reuse-frames): Make the obsolescence message more informative. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-30 01:44:11 +0000 +++ lisp/ChangeLog 2012-08-30 03:45:51 +0000 @@ -1,3 +1,8 @@ +2012-08-30 Chong Yidong + + * window.el (display-buffer-reuse-frames): Make the obsolescence + message more informative. + 2012-08-30 Glenn Morris * paren.el (show-paren-delay): === modified file 'lisp/window.el' --- lisp/window.el 2012-08-26 13:42:18 +0000 +++ lisp/window.el 2012-08-30 03:45:51 +0000 @@ -4710,7 +4710,11 @@ :type 'boolean :version "21.1" :group 'windows) -(make-obsolete-variable 'display-buffer-reuse-frames 'display-buffer-alist "24.3") + +(make-obsolete-variable + 'display-buffer-reuse-frames + "use a `reusable-frames' alist entry in `display-buffer-alist'." + "24.3") (defcustom pop-up-windows t "Non-nil means `display-buffer' should make a new window." ------------------------------------------------------------ revno: 109816 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-08-29 21:44:11 -0400 message: * lisp/paren.el (show-paren-delay): Add a :set function. Doc fix. (Bug#12297) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-29 18:15:12 +0000 +++ lisp/ChangeLog 2012-08-30 01:44:11 +0000 @@ -1,3 +1,8 @@ +2012-08-30 Glenn Morris + + * paren.el (show-paren-delay): + Add a :set function. Doc fix. (Bug#12297) + 2012-08-29 Martin Blais (tiny change) * progmodes/compile.el (compilation-always-kill): New var. === modified file 'lisp/paren.el' --- lisp/paren.el 2012-04-09 13:05:48 +0000 +++ lisp/paren.el 2012-08-30 01:44:11 +0000 @@ -52,8 +52,17 @@ :group 'paren-showing) (defcustom show-paren-delay 0.125 - "Time in seconds to delay before showing a matching paren." + "Time in seconds to delay before showing a matching paren. +If you change this without using customize while `show-paren-mode' is +active, you must toggle the mode off and on again for this to take effect." :type '(number :tag "seconds") + :initialize 'custom-initialize-default + :set (lambda (sym val) + (if (not show-paren-mode) + (set sym val) + (show-paren-mode -1) + (set sym val) + (show-paren-mode 1))) :group 'paren-showing) (defcustom show-paren-priority 1000 ------------------------------------------------------------ revno: 109815 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-08-29 20:47:33 -0400 message: init_lread fix for bug#12302 * src/lread.c (init_lread): For out-of-tree builds, only add the source directory's site-lisp dir to the load-path if it exists, consistent with in-tree builds. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-08-28 16:05:17 +0000 +++ src/ChangeLog 2012-08-30 00:47:33 +0000 @@ -1,3 +1,9 @@ +2012-08-30 Glenn Morris + + * lread.c (init_lread): For out-of-tree builds, only add the + source directory's site-lisp dir to the load-path if it exists, + consistent with in-tree builds. (Bug#12302) + 2012-08-28 Jan Djärv * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize === modified file 'src/lread.c' --- src/lread.c 2012-08-21 23:39:56 +0000 +++ src/lread.c 2012-08-30 00:47:33 +0000 @@ -4253,9 +4253,12 @@ { tem = Fexpand_file_name (build_string ("site-lisp"), Vsource_directory); - - if (NILP (Fmember (tem, Vload_path))) - Vload_path = Fcons (tem, Vload_path); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1)) + { + if (NILP (Fmember (tem, Vload_path))) + Vload_path = Fcons (tem, Vload_path); + } } } } /* Vinstallation_directory != Vsource_directory */ ------------------------------------------------------------ revno: 109814 author: Julien Danjou committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2012-08-29 22:04:05 +0000 message: Add gnus-notifications.el diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-08-28 09:40:11 +0000 +++ lisp/gnus/ChangeLog 2012-08-29 22:04:05 +0000 @@ -1,3 +1,9 @@ +2012-08-29 Julien Danjou + + * gnus-notifications.el: New file. + (gnus-notifications-notify): New function. + (gnus-notifications): Use `gnus-notifications-notify'. + 2012-08-28 Katsumi Yamaoka * gnus-sum.el (gnus-summary-enter-digest-group): Decode content === added file 'lisp/gnus/gnus-notifications.el' --- lisp/gnus/gnus-notifications.el 1970-01-01 00:00:00 +0000 +++ lisp/gnus/gnus-notifications.el 2012-08-29 22:04:05 +0000 @@ -0,0 +1,157 @@ +;; gnus-notifications.el -- Send notification on new message in Gnus + +;; Copyright (C) 2012 Free Software Foundation, Inc. + +;; Author: Julien Danjou +;; Keywords: news + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This implements notifications using `notifications-notify' on new +;; messages received. +;; Use (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications) +;; to get notifications just after getting the new news. + +;;; Code: + +(require 'notifications nil t) +(require 'gnus-sum) +(require 'gnus-group) +(require 'gnus-int) +(require 'gnus-art) +(require 'gnus-util) +(require 'google-contacts nil t) ; Optional + +(defgroup gnus-notifications nil + "Send notifications on new message in Gnus." + :group 'gnus) + +(defcustom gnus-notifications-use-google-contacts t + "Use Google Contacts to retrieve photo." + :type 'boolean + :group 'gnus-notifications) + +(defcustom gnus-notifications-use-gravatar t + "Use Gravatar to retrieve photo." + :type 'boolean + :group 'gnus-notifications) + +(defcustom gnus-notifications-minimum-level 1 + "Minimum group level the message should have to be notified. +Any message in a group that has a greater value than this will +not get notifications." + :type 'integer + :group 'gnus-notifications) + +(defvar gnus-notifications-sent nil + "Notifications already sent.") + +(defun gnus-notifications-notify (from subject photo-file) + "Send a notification about a new mail." + (if (fboundp 'notifications-notify) + (notifications-notify + :title from + :body subject + :app-icon (image-search-load-path "gnus/gnus.png") + :app-name "Gnus" + :category "email.arrived" + :image-path photo-file) + (message "New message from %s: %s" from subject))) + +(defun gnus-notifications-get-photo (mail-address) + "Get photo for mail address." + (let ((google-photo (when (and gnus-notifications-use-google-contacts + (fboundp 'google-contacts-get-photo)) + (ignore-errors + (google-contacts-get-photo mail-address))))) + (if google-photo + google-photo + (when gnus-notifications-use-gravatar + (let ((gravatar (ignore-errors + (gravatar-retrieve-synchronously mail-address)))) + (if (eq gravatar 'error) + nil + (plist-get (cdr gravatar) :data))))))) + +(defun gnus-notifications-get-photo-file (mail-address) + "Get a temporary file with an image for MAIL-ADDRESS. +You have to delete the temporary image yourself using +`delete-image'. + +Returns nil if no image found." + (let ((photo (gnus-notifications-get-photo mail-address))) + (when photo + (let ((photo-file (make-temp-file "gnus-notifications-photo-")) + (coding-system-for-write 'binary)) + (with-temp-file photo-file + (insert photo)) + photo-file)))) + +;;;###autoload +(defun gnus-notifications () + "Send a notification on new message. +This check for new messages that are in group with a level lower +or equal to `gnus-notifications-minimum-level' and send a +notification using `notifications-notify' for it. + +This is typically a function to add in +`gnus-after-getting-new-news-hook'" + (dolist (entry gnus-newsrc-alist) + (let ((group (car entry))) + ;; Check that the group level is less than + ;; `gnus-notifications-minimum-level' and the the group has unread + ;; messages. + (when (and (<= (gnus-group-level group) gnus-notifications-minimum-level) + (let ((unread (gnus-group-unread group))) + (and (numberp unread) + (> unread 0)))) + ;; Each group should have an entry in the `gnus-notifications-sent' + ;; alist. If not, we add one at this time. + (let ((group-notifications (or (assoc group gnus-notifications-sent) + ;; Nothing, add one and return it. + (assoc group + (add-to-list + 'gnus-notifications-sent + (cons group nil)))))) + (dolist (article (gnus-list-of-unread-articles group)) + ;; Check if the article already has been notified + (unless (memq article (cdr group-notifications)) + (with-current-buffer nntp-server-buffer + (gnus-request-head article group) + (article-decode-encoded-words) ; to decode mail addresses, subjects, etc + (let* ((address-components (mail-extract-address-components + (or (mail-fetch-field "From") ""))) + (address (cadr address-components)) + (photo-file (gnus-notifications-get-photo-file + address))) + (when (or + ;; Ignore mails from ourselves + (gnus-string-match-p gnus-ignored-from-addresses + address) + (gnus-notifications-notify + (or (car address-components) address) + (mail-fetch-field "Subject") + photo-file)) + ;; Register that we did notify this message + (setcdr group-notifications (cons article (cdr group-notifications)))) + (when photo-file + (delete-file photo-file))))))))))) + +(provide 'gnus-notifications) + +;;; gnus-notifications.el ends here ------------------------------------------------------------ revno: 109813 author: Martin Blais committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-08-29 14:15:12 -0400 message: * lisp/progmodes/compile.el (compilation-always-kill): New var. (compilation-start): Use it. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-08-29 15:11:51 +0000 +++ etc/NEWS 2012-08-29 18:15:12 +0000 @@ -207,6 +207,8 @@ * Changes in Specialized Modes and Packages in Emacs 24.3 +** Compilation has a new `compilation-always-kill' configuration variable. + ** Term changes The variables `term-default-fg-color' and `term-default-bg-color' are === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-29 17:36:49 +0000 +++ lisp/ChangeLog 2012-08-29 18:15:12 +0000 @@ -1,3 +1,8 @@ +2012-08-29 Martin Blais (tiny change) + + * progmodes/compile.el (compilation-always-kill): New var. + (compilation-start): Use it. + 2012-08-29 Stefan Monnier * simple.el (read-only-mode): Move from files.el for bootstrapping. === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2012-08-26 13:42:18 +0000 +++ lisp/progmodes/compile.el 2012-08-29 18:15:12 +0000 @@ -1503,6 +1503,13 @@ (compilation-start command nil name-function highlight-regexp))) (make-obsolete 'compile-internal 'compilation-start "22.1") +(defcustom compilation-always-kill nil + "If nil, ask to kill compilation. If 't, always kill an +incomplete compilation before starting a new one." + :type 'boolean + :version "24.3" + :group 'compilation) + ;;;###autoload (defun compilation-start (command &optional mode name-function highlight-regexp) "Run compilation command COMMAND (low level interface). @@ -1537,6 +1544,7 @@ (let ((comp-proc (get-buffer-process (current-buffer)))) (if comp-proc (if (or (not (eq (process-status comp-proc) 'run)) + compilation-always-kill (yes-or-no-p (format "A %s process is running; kill it? " name-of-mode))) ------------------------------------------------------------ revno: 109812 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-08-29 13:36:49 -0400 message: * lisp/simple.el (read-only-mode): Move from lisp/files.el for bootstrapping. * files.el (read-only-mode): Move to simple.el. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-29 15:11:51 +0000 +++ lisp/ChangeLog 2012-08-29 17:36:49 +0000 @@ -1,5 +1,8 @@ 2012-08-29 Stefan Monnier + * simple.el (read-only-mode): Move from files.el for bootstrapping. + * files.el (read-only-mode): Move to simple.el. + * files.el (read-only-mode): New minor mode. (toggle-read-only): Use it and mark obsolete. (find-file--read-only): === modified file 'lisp/files.el' --- lisp/files.el 2012-08-29 15:11:51 +0000 +++ lisp/files.el 2012-08-29 17:36:49 +0000 @@ -4818,32 +4818,6 @@ "Modification-flag cleared")) (set-buffer-modified-p arg)) -(define-minor-mode read-only-mode - "Change whether the current buffer is read-only. -With prefix argument ARG, make the buffer read-only if ARG is -positive, otherwise make it writable. If buffer is read-only -and `view-read-only' is non-nil, enter view mode. - -Do not call this from a Lisp program unless you really intend to -do the same thing as the \\[toggle-read-only] command, including -possibly enabling or disabling View mode. Also, note that this -command works by setting the variable `buffer-read-only', which -does not affect read-only regions caused by text properties. To -ignore read-only status in a Lisp program (whether due to text -properties or buffer state), bind `inhibit-read-only' temporarily -to a non-nil value." - :variable buffer-read-only - (cond - ((and (not buffer-read-only) view-mode) - (View-exit-and-edit) - (make-local-variable 'view-read-only) - (setq view-read-only t)) ; Must leave view mode. - ((and buffer-read-only view-read-only - ;; If view-mode is already active, `view-mode-enter' is a nop. - (not view-mode) - (not (eq (get major-mode 'mode-class) 'special))) - (view-mode-enter)))) - (defun toggle-read-only (&optional arg interactive) (declare (obsolete read-only-mode "24.3")) (interactive (list current-prefix-arg t)) === modified file 'lisp/simple.el' --- lisp/simple.el 2012-08-18 05:11:38 +0000 +++ lisp/simple.el 2012-08-29 17:36:49 +0000 @@ -6961,6 +6961,32 @@ (defvar vis-mode-saved-buffer-invisibility-spec nil "Saved value of `buffer-invisibility-spec' when Visible mode is on.") +(define-minor-mode read-only-mode + "Change whether the current buffer is read-only. +With prefix argument ARG, make the buffer read-only if ARG is +positive, otherwise make it writable. If buffer is read-only +and `view-read-only' is non-nil, enter view mode. + +Do not call this from a Lisp program unless you really intend to +do the same thing as the \\[toggle-read-only] command, including +possibly enabling or disabling View mode. Also, note that this +command works by setting the variable `buffer-read-only', which +does not affect read-only regions caused by text properties. To +ignore read-only status in a Lisp program (whether due to text +properties or buffer state), bind `inhibit-read-only' temporarily +to a non-nil value." + :variable buffer-read-only + (cond + ((and (not buffer-read-only) view-mode) + (View-exit-and-edit) + (make-local-variable 'view-read-only) + (setq view-read-only t)) ; Must leave view mode. + ((and buffer-read-only view-read-only + ;; If view-mode is already active, `view-mode-enter' is a nop. + (not view-mode) + (not (eq (get major-mode 'mode-class) 'special))) + (view-mode-enter)))) + (define-minor-mode visible-mode "Toggle making all invisible text temporarily visible (Visible mode). With a prefix argument ARG, enable Visible mode if ARG is ------------------------------------------------------------ revno: 109811 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-08-29 11:11:51 -0400 message: * lisp/files.el (read-only-mode): New minor mode. (toggle-read-only): Use it and mark obsolete. (find-file--read-only): * lisp/vc/vc.el (vc-next-action, vc-checkout): * lisp/vc/vc-cvs.el (vc-cvs-checkout): * lisp/obsolete/vc-mcvs.el (vc-mcvs-update): * lisp/ffap.el (ffap--toggle-read-only): Update callers. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-08-28 16:01:59 +0000 +++ etc/NEWS 2012-08-29 15:11:51 +0000 @@ -588,6 +588,8 @@ * Lisp changes in Emacs 24.3 +** New minor mode `read-only-mode' to replace toggle-read-only (now obsolete). + ** New functions `autoloadp' and `autoload-do-load'. ** New function `posnp' to test if an object is a `posn'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-29 12:49:44 +0000 +++ lisp/ChangeLog 2012-08-29 15:11:51 +0000 @@ -1,3 +1,13 @@ +2012-08-29 Stefan Monnier + + * files.el (read-only-mode): New minor mode. + (toggle-read-only): Use it and mark obsolete. + (find-file--read-only): + * vc/vc.el (vc-next-action, vc-checkout): + * vc/vc-cvs.el (vc-cvs-checkout): + * obsolete/vc-mcvs.el (vc-mcvs-update): + * ffap.el (ffap--toggle-read-only): Update callers. + 2012-08-29 Michael Albinus * eshell/esh-ext.el (eshell-external-command): Do not examine === modified file 'lisp/emacs-lisp/gv.el' --- lisp/emacs-lisp/gv.el 2012-07-26 01:27:33 +0000 +++ lisp/emacs-lisp/gv.el 2012-08-29 15:11:51 +0000 @@ -191,8 +191,9 @@ Assignments of VAL to (NAME ARGS...) are expanded by binding the argument forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must return a Lisp form that does the assignment. -Actually, ARGLIST may be bound to temporary variables which are introduced -automatically to preserve proper execution order of the arguments. Example: +The first arg in ARLIST (the one that receives VAL) receives an expression +which can do arbitrary things, whereas the other arguments are all guaranteed +to be pure and copyable. Example use: (gv-define-setter aref (v a i) `(aset ,a ,i ,v))" (declare (indent 2) (debug (&define name sexp body))) `(gv-define-expander ,name === modified file 'lisp/ffap.el' --- lisp/ffap.el 2012-08-15 16:29:11 +0000 +++ lisp/ffap.el 2012-08-29 15:11:51 +0000 @@ -1703,7 +1703,7 @@ buffer-or-list (list buffer-or-list))) (with-current-buffer buffer - (toggle-read-only 1)))) + (read-only-mode 1)))) (defun ffap-read-only () "Like `ffap', but mark buffer as read-only. === modified file 'lisp/files.el' --- lisp/files.el 2012-08-28 16:01:59 +0000 +++ lisp/files.el 2012-08-29 15:11:51 +0000 @@ -1456,7 +1456,7 @@ (file-exists-p filename)) (error "%s does not exist" filename)) (let ((value (funcall fun filename wildcards))) - (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) + (mapc (lambda (b) (with-current-buffer b (read-only-mode 1))) (if (listp value) value (list value))) value)) @@ -4818,18 +4818,11 @@ "Modification-flag cleared")) (set-buffer-modified-p arg)) -(defun toggle-read-only (&optional arg message) - "Toggle the read-only state of the current buffer. +(define-minor-mode read-only-mode + "Change whether the current buffer is read-only. With prefix argument ARG, make the buffer read-only if ARG is -positive; otherwise make it writable. - -When making the buffer read-only, enable View mode if -`view-read-only' is non-nil. When making the buffer writable, -disable View mode if View mode is enabled. - -If called interactively, or if called from Lisp with MESSAGE -non-nil, print a message reporting the buffer's new read-only -status. +positive, otherwise make it writable. If buffer is read-only +and `view-read-only' is non-nil, enter view mode. Do not call this from a Lisp program unless you really intend to do the same thing as the \\[toggle-read-only] command, including @@ -4839,30 +4832,24 @@ ignore read-only status in a Lisp program (whether due to text properties or buffer state), bind `inhibit-read-only' temporarily to a non-nil value." - (interactive "P") + :variable buffer-read-only (cond - ;; Do nothing if `buffer-read-only' already matches the state - ;; specified by ARG. - ((and arg - (if (> (prefix-numeric-value arg) 0) - buffer-read-only - (not buffer-read-only)))) - ;; If View mode is enabled, exit it. - ((and buffer-read-only view-mode) + ((and (not buffer-read-only) view-mode) (View-exit-and-edit) - (set (make-local-variable 'view-read-only) t)) - ;; If `view-read-only' is non-nil, enable View mode. - ((and view-read-only - (not buffer-read-only) - (not view-mode) - (not (eq (get major-mode 'mode-class) 'special))) - (view-mode-enter)) - ;; The usual action: flip `buffer-read-only'. - (t (setq buffer-read-only (not buffer-read-only)) - (force-mode-line-update))) - (if (or message (called-interactively-p 'interactive)) - (message "Read-only %s for this buffer" - (if buffer-read-only "enabled" "disabled")))) + (make-local-variable 'view-read-only) + (setq view-read-only t)) ; Must leave view mode. + ((and buffer-read-only view-read-only + ;; If view-mode is already active, `view-mode-enter' is a nop. + (not view-mode) + (not (eq (get major-mode 'mode-class) 'special))) + (view-mode-enter)))) + +(defun toggle-read-only (&optional arg interactive) + (declare (obsolete read-only-mode "24.3")) + (interactive (list current-prefix-arg t)) + (if interactive + (call-interactively 'read-only-mode) + (read-only-mode (or arg 'toggle)))) (defun insert-file (filename) "Insert contents of file FILENAME into buffer after point. === modified file 'lisp/ibuffer.el' --- lisp/ibuffer.el 2012-08-12 17:29:53 +0000 +++ lisp/ibuffer.el 2012-08-29 15:11:51 +0000 @@ -2401,7 +2401,7 @@ buffer's file as an argument. '\\[ibuffer-do-eval]' - Evaluate a form in each of the marked buffers. This is a very flexible command. For example, if you want to make all - of the marked buffers read only, try using (toggle-read-only 1) as + of the marked buffers read only, try using (read-only-mode 1) as the input form. '\\[ibuffer-do-view-and-eval]' - As above, but view each buffer while the form is evaluated. === modified file 'lisp/obsolete/vc-mcvs.el' --- lisp/obsolete/vc-mcvs.el 2012-01-19 07:21:25 +0000 +++ lisp/obsolete/vc-mcvs.el 2012-08-29 15:11:51 +0000 @@ -329,7 +329,7 @@ (if vc-mcvs-use-edit (vc-mcvs-command nil 0 file "edit") (set-file-modes file (logior (file-modes file) 128)) - (if (equal file buffer-file-name) (toggle-read-only -1)))) + (if (equal file buffer-file-name) (read-only-mode -1)))) ;; Check out a particular revision (or recreate the file). (vc-file-setprop file 'vc-working-revision nil) (apply 'vc-mcvs-command nil 0 file === modified file 'lisp/vc/vc-cvs.el' --- lisp/vc/vc-cvs.el 2012-08-24 04:05:25 +0000 +++ lisp/vc/vc-cvs.el 2012-08-29 15:11:51 +0000 @@ -394,7 +394,7 @@ (if vc-cvs-use-edit (vc-cvs-command nil 0 file "edit") (set-file-modes file (logior (file-modes file) 128)) - (if (equal file buffer-file-name) (toggle-read-only -1)))) + (if (equal file buffer-file-name) (read-only-mode -1)))) ;; Check out a particular revision (or recreate the file). (vc-file-setprop file 'vc-working-revision nil) (apply 'vc-cvs-command nil 0 file === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2012-08-15 19:20:26 +0000 +++ lisp/vc/vc.el 2012-08-29 15:11:51 +0000 @@ -1133,7 +1133,7 @@ (let ((visited (get-file-buffer file))) (when visited (with-current-buffer visited - (toggle-read-only -1)))))) + (read-only-mode -1)))))) ;; Allow user to revert files with no changes (save-excursion (dolist (file files) @@ -1344,7 +1344,7 @@ ;; Maybe the backend is not installed ;-( (when writable (let ((buf (get-file-buffer file))) - (when buf (with-current-buffer buf (toggle-read-only -1))))) + (when buf (with-current-buffer buf (read-only-mode -1))))) (signal (car err) (cdr err)))) `((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit) (not writable)) ------------------------------------------------------------ revno: 109810 committer: Michael Albinus . * net/tramp-sh.el (tramp-remote-path): Add "/sbin" and "/usr/local/sbin". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-28 19:35:35 +0000 +++ lisp/ChangeLog 2012-08-29 12:49:44 +0000 @@ -1,3 +1,12 @@ +2012-08-29 Michael Albinus + + * eshell/esh-ext.el (eshell-external-command): Do not examine + remote shell scripts. See + . + + * net/tramp-sh.el (tramp-remote-path): Add "/sbin" and + "/usr/local/sbin". + 2012-08-28 Stefan Monnier * emacs-lisp/cl-lib.el (buffer-string): Fix setter macro (bug#12293). === modified file 'lisp/eshell/esh-ext.el' --- lisp/eshell/esh-ext.el 2012-08-06 07:10:27 +0000 +++ lisp/eshell/esh-ext.el 2012-08-29 12:49:44 +0000 @@ -209,7 +209,11 @@ (setq args (eshell-stringify-list (eshell-flatten-list args))) ;; (if (file-remote-p default-directory) ;; (eshell-remote-command command args)) - (let ((interp (eshell-find-interpreter command))) + (let ((interp (eshell-find-interpreter + command + ;; Do not examine remote shell scripts. + (or (and (stringp command) (file-remote-p command)) + (file-remote-p default-directory))))) (cl-assert interp) (if (functionp (car interp)) (apply (car interp) (append (cdr interp) args)) === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2012-08-17 09:18:18 +0000 +++ lisp/net/tramp-sh.el 2012-08-29 12:49:44 +0000 @@ -512,9 +512,9 @@ ;; IRIX64: /usr/bin ;;;###tramp-autoload (defcustom tramp-remote-path - '(tramp-default-remote-path "/bin" "/usr/bin" "/usr/sbin" - "/usr/local/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" - "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" + '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin" + "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin" + "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin" "/opt/sbin" "/opt/local/bin") "List of directories to search for executables on remote host. For every remote host, this variable will be set buffer local, ------------------------------------------------------------ revno: 109809 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12293 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-08-28 16:14:21 -0400 message: * cl-lib.el (buffer-string): Simplify last change. diff: === modified file 'lisp/emacs-lisp/cl-lib.el' --- lisp/emacs-lisp/cl-lib.el 2012-08-28 19:35:35 +0000 +++ lisp/emacs-lisp/cl-lib.el 2012-08-28 20:14:21 +0000 @@ -635,8 +635,7 @@ (set-buffer-modified-p ,flag))) (gv-define-simple-setter buffer-name rename-buffer t) (gv-define-setter buffer-string (store) - ;; Eval `store' first since it may look at the buffer. - (macroexp-let2 nil s store `(progn (erase-buffer) (insert ,s)))) + `(insert (prog1 ,store (erase-buffer)))) (gv-define-simple-setter buffer-substring cl--set-buffer-substring) (gv-define-simple-setter current-buffer set-buffer) (gv-define-simple-setter current-case-table set-case-table)