Now on revision 110494. ------------------------------------------------------------ revno: 110494 committer: Paul Eggert branch nick: trunk timestamp: Tue 2012-10-09 23:39:16 -0700 message: * commands.h (immediate_quit): Remove duplicate decl. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-09 18:33:01 +0000 +++ src/ChangeLog 2012-10-10 06:39:16 +0000 @@ -1,3 +1,7 @@ +2012-10-10 Paul Eggert + + * commands.h (immediate_quit): Remove duplicate decl. + 2012-10-09 Jan Djärv * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles === modified file 'src/commands.h' --- src/commands.h 2012-01-19 07:21:25 +0000 +++ src/commands.h 2012-10-10 06:39:16 +0000 @@ -36,9 +36,6 @@ events until a non-ASCII event is acceptable as input. */ extern Lisp_Object unread_switch_frame; -/* Nonzero means ^G can quit instantly */ -extern int immediate_quit; - /* Nonzero if input is coming from the keyboard */ #define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive) ------------------------------------------------------------ revno: 110493 author: Dani Moncayo committer: Chong Yidong branch nick: trunk timestamp: Wed 2012-10-10 10:52:55 +0800 message: * doc/emacs/basic.texi (Arguments): Fix typos. Also, remove "tiny change" tags from ChangeLogs; Dani Moncayo now has a copyright assignment. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-10-08 07:06:36 +0000 +++ doc/emacs/ChangeLog 2012-10-10 02:52:55 +0000 @@ -1,3 +1,7 @@ +2012-10-10 Dani Moncayo + + * basic.texi (Arguments): Fix typos. + 2012-10-08 Glenn Morris * cal-xtra.texi (Calendar Customizing): Mention calendar-month-header. @@ -425,7 +429,7 @@ * misc.texi (emacsclient Options): Add cross-reference to "Windows Startup". (Bug#11091) -2012-04-02 Dani Moncayo (tiny change) +2012-04-02 Dani Moncayo * custom.texi (Changing a Variable): Fix example. @@ -458,7 +462,7 @@ * mule.texi (International Chars): etc/HELLO is for character demonstration. -2012-03-15 Dani Moncayo (tiny change) +2012-03-15 Dani Moncayo * dired.texi (Shell Commands in Dired): Fix typo. @@ -485,7 +489,7 @@ * macos.texi (Mac / GNUstep Customization): Remove text about ns-find-file and ns-drag-file (Bug#5855, Bug#10050). -2012-02-25 Dani Moncayo (tiny change) +2012-02-25 Dani Moncayo * buffers.texi (Select Buffer): Mention that saving in a new file name can switch to a different major mode. === modified file 'doc/emacs/basic.texi' --- doc/emacs/basic.texi 2012-09-30 09:18:38 +0000 +++ doc/emacs/basic.texi 2012-10-10 02:52:55 +0000 @@ -757,7 +757,8 @@ value. For example, the command @kbd{M-q} (@code{fill-paragraph}) fills text; with an argument, it justifies the text as well. (@xref{Filling}, for more information on @kbd{M-q}.) For these -commands, it is enough to the argument with a single @kbd{C-u}. +commands, it is enough to specify the argument with a single +@kbd{C-u}. Some commands use the value of the argument as a repeat count, but do something special when there is no argument. For example, the @@ -776,10 +777,10 @@ more convenient, and they are documented in that command's documentation string. - We use the term ``prefix argument'' as well as ``numeric argument'', -to emphasize that you type these argument before the command, and to -distinguish them from minibuffer arguments that come after the -command. + We use the term @dfn{prefix argument} to emphasize that you type +such arguments before the command, and to distinguish them from +minibuffer arguments (@pxref{Minibuffer}), which are entered after +invoking the command. @node Repeating @section Repeating a Command === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-10-05 07:48:25 +0000 +++ doc/lispref/ChangeLog 2012-10-10 02:52:55 +0000 @@ -1978,7 +1978,7 @@ * numbers.texi (Integer Basics): Add indexing for most-positive-fixnum and most-negative-fixnum. (Bug#9525) -2011-09-14 Dani Moncayo (tiny change) +2011-09-14 Dani Moncayo * lists.texi (Sets And Lists): Fix typo. (Bug#9393) @@ -1987,7 +1987,7 @@ * processes.texi (Network Servers): Clarify what the process buffer is used for (bug#9233). -2011-08-30 Dani Moncayo (tiny change) +2011-08-30 Dani Moncayo * lists.texi (Building Lists): Fix typo. ------------------------------------------------------------ revno: 110492 committer: Jan D. branch nick: trunk timestamp: Tue 2012-10-09 20:33:01 +0200 message: Remove caching in nsfont.m, the general code does it (I misunderstood). * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles caching. (nsfont_open): Remove setting of Vfonts_in_cache. (syms_of_nsfont): Remove initialization of Vfonts_in_cache diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-09 18:10:16 +0000 +++ src/ChangeLog 2012-10-09 18:33:01 +0000 @@ -1,3 +1,10 @@ +2012-10-09 Jan Djärv + + * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles + caching. + (nsfont_open): Remove setting of Vfonts_in_cache. + (syms_of_nsfont): Remove initialization of Vfonts_in_cache + 2012-10-09 Eli Zaretskii * w32fns.c (w32_last_error): Change the return value to DWORD, to === modified file 'src/nsfont.m' --- src/nsfont.m 2012-10-08 18:31:39 +0000 +++ src/nsfont.m 2012-10-09 18:33:01 +0000 @@ -53,8 +53,6 @@ extern int ns_tmp_flags; extern struct nsfont_info *ns_tmp_font; -static Lisp_Object Vfonts_in_cache; - /* font glyph and metrics caching functions, implemented at end */ static void ns_uni_to_glyphs (struct nsfont_info *font_info, @@ -815,7 +813,6 @@ numberWithUnsignedLongLong: (unsigned long long) XHASH (font_object)] forKey: nsfont]; - Vfonts_in_cache = Fcons (font_object, Vfonts_in_cache); } } @@ -1535,7 +1532,4 @@ doc: /* Internal use: maps font registry to Unicode script. */); ascii_printable = NULL; - - Vfonts_in_cache = Qnil; - staticpro (&Vfonts_in_cache); } ------------------------------------------------------------ revno: 110491 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2012-10-09 20:10:16 +0200 message: Fix return type of w32_last_error. src/w32fns.c (w32_last_error): Change the return value to DWORD, to match what GetLastError returns. Explain better why the function is needed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-09 17:58:18 +0000 +++ src/ChangeLog 2012-10-09 18:10:16 +0000 @@ -1,5 +1,9 @@ 2012-10-09 Eli Zaretskii + * w32fns.c (w32_last_error): Change the return value to DWORD, to + match what GetLastError returns. Explain why the function is + needed. + * frame.c (delete_frame): Rename local variable 'tooltip_frame' to 'is_tooltip_frame', to avoid confusion with its global namesake. === modified file 'src/w32fns.c' --- src/w32fns.c 2012-10-08 18:44:42 +0000 +++ src/w32fns.c 2012-10-09 18:10:16 +0000 @@ -6983,8 +6983,10 @@ return buf; } -/* For convenience when debugging. */ -int +/* For convenience when debugging. (You cannot call GetLastError + directly from GDB: it will crash, because it uses the __stdcall + calling convention, not the _cdecl convention assumed by GDB.) */ +DWORD w32_last_error (void) { return GetLastError (); ------------------------------------------------------------ revno: 110490 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2012-10-09 19:58:18 +0200 message: Avoid shadowing a global variable by a local one in frame.c. src/frame.c (delete_frame): Rename local variable 'tooltip_frame' to 'is_tooltip_frame', to avoid confusion with its global namesake. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-09 06:33:51 +0000 +++ src/ChangeLog 2012-10-09 17:58:18 +0000 @@ -1,3 +1,8 @@ +2012-10-09 Eli Zaretskii + + * frame.c (delete_frame): Rename local variable 'tooltip_frame' to + 'is_tooltip_frame', to avoid confusion with its global namesake. + 2012-10-08 Daniel Colascione * xdisp.c (start_hourglass): Call w32_note_current_window when === modified file 'src/frame.c' --- src/frame.c 2012-10-07 22:31:58 +0000 +++ src/frame.c 2012-10-09 17:58:18 +0000 @@ -1124,7 +1124,7 @@ struct frame *sf = SELECTED_FRAME (); struct kboard *kb; - int minibuffer_selected, tooltip_frame; + int minibuffer_selected, is_tooltip_frame; if (EQ (frame, Qnil)) { @@ -1176,13 +1176,13 @@ } } - tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); + is_tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); /* Run `delete-frame-functions' unless FORCE is `noelisp' or frame is a tooltip. FORCE is set to `noelisp' when handling a disconnect from the terminal, so we don't dare call Lisp code. */ - if (NILP (Vrun_hooks) || tooltip_frame) + if (NILP (Vrun_hooks) || is_tooltip_frame) ; else if (EQ (force, Qnoelisp)) pending_funcalls @@ -1461,7 +1461,7 @@ } /* Cause frame titles to update--necessary if we now have just one frame. */ - if (!tooltip_frame) + if (!is_tooltip_frame) update_mode_lines = 1; return Qnil; ------------------------------------------------------------ revno: 110489 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12583 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-09 12:37:51 -0400 message: * lisp/newcomment.el (comment-start-skip, comment-end-skip, comment-end): Don't document nil as a useful value. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-09 16:30:12 +0000 +++ lisp/ChangeLog 2012-10-09 16:37:51 +0000 @@ -1,11 +1,16 @@ +2012-10-09 Stefan Monnier + + * newcomment.el (comment-start-skip, comment-end-skip, comment-end): + Don't document nil as a useful value (bug#12583). + 2012-10-09 Michael Albinus - * net/tramp.el (tramp-debug-message): Remove - "tramp-with-progress-reporter" from regexp of ignored functions. + * net/tramp.el (tramp-debug-message): + Remove "tramp-with-progress-reporter" from regexp of ignored functions. (with-tramp-progress-reporter): Rename from `tramp-with-progress-reporter'. - (with-tramp-file-property, with-tramp-connection-property): Move - from tramp-cache.el, rename from `with-file-property' and + (with-tramp-file-property, with-tramp-connection-property): + Move from tramp-cache.el, rename from `with-file-property' and `with-connection-property', respectively. * net/tramp-cache.el: Remove `with-file-property' and === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2012-10-09 16:30:12 +0000 +++ lisp/newcomment.el 2012-10-09 16:37:51 +0000 @@ -117,20 +117,20 @@ If there are any \\(...\\) pairs, the comment delimiter text is held to begin at the place matched by the close of the first pair.") ;;;###autoload -(put 'comment-start-skip 'safe-local-variable 'string-or-null-p) +(put 'comment-start-skip 'safe-local-variable 'stringp) ;;;###autoload (defvar comment-end-skip nil "Regexp to match the end of a comment plus everything back to its body.") ;;;###autoload -(put 'comment-end-skip 'safe-local-variable 'string-or-null-p) +(put 'comment-end-skip 'safe-local-variable 'stringp) ;;;###autoload (defvar comment-end (purecopy "") "String to insert to end a new comment. Should be an empty string if comments are terminated by end-of-line.") ;;;###autoload -(put 'comment-end 'safe-local-variable 'string-or-null-p) +(put 'comment-end 'safe-local-variable 'stringp) ;;;###autoload (defvar comment-indent-function 'comment-indent-default @@ -327,9 +327,9 @@ ;;;###autoload (defun comment-normalize-vars (&optional noerror) "Check and setup the variables needed by other commenting functions. -Any command calling functions from newcomment.el, being entry points, should -call this function before any other, so the rest of the code can assume that -the variables are properly set." +Any command calling functions from newcomment.el should call this function +before any other, so the rest of the code can assume that the variables are +properly set." (unless (and (not comment-start) noerror) (unless comment-start (let ((cs (read-string "No comment syntax is defined. Use: "))) ------------------------------------------------------------ revno: 110488 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-09 09:30:12 -0700 message: Revert incorrect doc fix from r110483 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-09 12:49:02 +0000 +++ lisp/ChangeLog 2012-10-09 16:30:12 +0000 @@ -23,8 +23,6 @@ * w32-fns.el (set-message-beep): * term/w32-win.el (set-message-beep): Update declarations. - * newcomment.el (comment-normalize-vars): Doc fix (presumably). - 2012-10-09 Stefan Monnier * bindings.el (mode-line-toggle-read-only, mode-line-toggle-modified) === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2012-10-09 07:06:54 +0000 +++ lisp/newcomment.el 2012-10-09 16:30:12 +0000 @@ -327,7 +327,7 @@ ;;;###autoload (defun comment-normalize-vars (&optional noerror) "Check and setup the variables needed by other commenting functions. -Any command calling functions from newcomment.el, besides entry points, should +Any command calling functions from newcomment.el, being entry points, should call this function before any other, so the rest of the code can assume that the variables are properly set." (unless (and (not comment-start) noerror) ------------------------------------------------------------ revno: 110487 committer: Michael Albinus + + * trampver.texi: Update release number. + 2012-10-06 Glenn Morris * erc.texi: Include emacsver.texi, and use EMACSVER rather than === modified file 'doc/misc/trampver.texi' --- doc/misc/trampver.texi 2012-09-12 16:39:10 +0000 +++ doc/misc/trampver.texi 2012-10-09 12:51:21 +0000 @@ -8,7 +8,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.6 +@set trampver 2.2.7-pre @c Other flags from configuration @set instprefix /usr/local ------------------------------------------------------------ revno: 110486 committer: Michael Albinus + + * net/tramp.el (tramp-debug-message): Remove + "tramp-with-progress-reporter" from regexp of ignored functions. + (with-tramp-progress-reporter): Rename from + `tramp-with-progress-reporter'. + (with-tramp-file-property, with-tramp-connection-property): Move + from tramp-cache.el, rename from `with-file-property' and + `with-connection-property', respectively. + + * net/tramp-cache.el: Remove `with-file-property' and + `with-connection-property'. + + * net/tramp.el: + * net/tramp-gvfs.el: + * net/tramp-sh.el: + * net/tramp-smb.el: Adapt callees. + + * net/trampver.el: Update release number. + 2012-10-09 Glenn Morris * w32-fns.el (set-message-beep): === modified file 'lisp/net/tramp-cache.el' --- lisp/net/tramp-cache.el 2012-06-11 10:30:07 +0000 +++ lisp/net/tramp-cache.el 2012-10-09 12:49:02 +0000 @@ -139,27 +139,6 @@ value)) ;;;###tramp-autoload -(defmacro with-file-property (vec file property &rest body) - "Check in Tramp cache for PROPERTY, otherwise execute BODY and set cache. -FILE must be a local file name on a connection identified via VEC." - `(if (file-name-absolute-p ,file) - (let ((value (tramp-get-file-property ,vec ,file ,property 'undef))) - (when (eq value 'undef) - ;; We cannot pass @body as parameter to - ;; `tramp-set-file-property' because it mangles our - ;; debug messages. - (setq value (progn ,@body)) - (tramp-set-file-property ,vec ,file ,property value)) - value) - ,@body)) - -;;;###tramp-autoload -(put 'with-file-property 'lisp-indent-function 3) -(put 'with-file-property 'edebug-form-spec t) -(tramp-compat-font-lock-add-keywords - 'emacs-lisp-mode '("\\")) - -;;;###tramp-autoload (defun tramp-flush-file-property (vec file) "Remove all properties of FILE in the cache context of VEC." ;; Remove file property of symlinks. @@ -250,24 +229,6 @@ value)) ;;;###tramp-autoload -(defmacro with-connection-property (key property &rest body) - "Check in Tramp for property PROPERTY, otherwise executes BODY and set." - `(let ((value (tramp-get-connection-property ,key ,property 'undef))) - (when (eq value 'undef) - ;; We cannot pass ,@body as parameter to - ;; `tramp-set-connection-property' because it mangles our debug - ;; messages. - (setq value (progn ,@body)) - (tramp-set-connection-property ,key ,property value)) - value)) - -;;;###tramp-autoload -(put 'with-connection-property 'lisp-indent-function 2) -(put 'with-connection-property 'edebug-form-spec t) -(tramp-compat-font-lock-add-keywords - 'emacs-lisp-mode '("\\")) - -;;;###tramp-autoload (defun tramp-flush-connection-property (key) "Remove all properties identified by KEY. KEY identifies the connection, it is either a process or a vector." === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2012-06-30 21:22:18 +0000 +++ lisp/net/tramp-gvfs.el 2012-10-09 12:49:02 +0000 @@ -537,7 +537,7 @@ "Like `copy-file' for Tramp files." (with-parsed-tramp-file-name (if (tramp-tramp-file-p filename) filename newname) nil - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 0 (format "Copying %s to %s" filename newname) (condition-case err (let ((args @@ -741,7 +741,7 @@ "Like `rename-file' for Tramp files." (with-parsed-tramp-file-name (if (tramp-tramp-file-p filename) filename newname) nil - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 0 (format "Renaming %s to %s" filename newname) (condition-case err (rename-file @@ -1056,7 +1056,7 @@ (catch 'mounted (dolist (elt - (with-file-property vec "/" "list-mounts" + (with-tramp-file-property vec "/" "list-mounts" (with-tramp-dbus-call-method vec t :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker tramp-gvfs-interface-mounttracker "listMounts")) @@ -1199,7 +1199,7 @@ (tramp-gvfs-object-path (tramp-make-tramp-file-name method user host "")))) - (tramp-with-progress-reporter + (with-tramp-progress-reporter vec 3 (if (zerop (length user)) (format "Opening connection for %s using %s" host method) === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2012-08-29 12:49:44 +0000 +++ lisp/net/tramp-sh.el 2012-10-09 12:49:02 +0000 @@ -1058,7 +1058,7 @@ "Like `file-truename' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (tramp-make-tramp-file-name method user host - (with-file-property v localname "file-truename" + (with-tramp-file-property v localname "file-truename" (let ((result nil)) ; result steps in reverse order (tramp-message v 4 "Finding true name for `%s'" filename) (cond @@ -1167,7 +1167,7 @@ (defun tramp-sh-handle-file-exists-p (filename) "Like `file-exists-p' for Tramp files." (with-parsed-tramp-file-name filename nil - (with-file-property v localname "file-exists-p" + (with-tramp-file-property v localname "file-exists-p" (or (not (null (tramp-get-file-property v localname "file-attributes-integer" nil))) (not (null (tramp-get-file-property @@ -1185,7 +1185,8 @@ ;; 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-file-property v localname (format "file-attributes-%s" id-format) + (with-tramp-file-property + v localname (format "file-attributes-%s" id-format) (save-excursion (tramp-convert-file-attributes v @@ -1481,7 +1482,8 @@ (defun tramp-remote-selinux-p (vec) "Check, whether SELINUX is enabled on the remote host." - (with-connection-property (tramp-get-connection-process vec) "selinux-p" + (with-tramp-connection-property + (tramp-get-connection-process vec) "selinux-p" (let ((result (tramp-find-executable vec "getenforce" (tramp-get-remote-path vec) t t))) (and result @@ -1493,7 +1495,7 @@ (defun tramp-sh-handle-file-selinux-context (filename) "Like `file-selinux-context' for Tramp files." (with-parsed-tramp-file-name filename nil - (with-file-property v localname "file-selinux-context" + (with-tramp-file-property v localname "file-selinux-context" (let ((context '(nil nil nil nil)) (regexp (concat "\\([a-z0-9_]+\\):" "\\([a-z0-9_]+\\):" "\\([a-z0-9_]+\\):" "\\([a-z0-9_]+\\)"))) @@ -1537,7 +1539,7 @@ (defun tramp-sh-handle-file-executable-p (filename) "Like `file-executable-p' for Tramp files." (with-parsed-tramp-file-name filename nil - (with-file-property v localname "file-executable-p" + (with-tramp-file-property v localname "file-executable-p" ;; Examine `file-attributes' cache to see if request can be ;; satisfied without remote operation. (or (tramp-check-cached-permissions v ?x) @@ -1546,7 +1548,7 @@ (defun tramp-sh-handle-file-readable-p (filename) "Like `file-readable-p' for Tramp files." (with-parsed-tramp-file-name filename nil - (with-file-property v localname "file-readable-p" + (with-tramp-file-property v localname "file-readable-p" ;; Examine `file-attributes' cache to see if request can be ;; satisfied without remote operation. (or (tramp-check-cached-permissions v ?r) @@ -1600,13 +1602,13 @@ ;; desirable to return t immediately for "/method:foo:". It can ;; be expected that this is always a directory. (or (zerop (length localname)) - (with-file-property v localname "file-directory-p" + (with-tramp-file-property v localname "file-directory-p" (tramp-run-test "-d" filename))))) (defun tramp-sh-handle-file-writable-p (filename) "Like `file-writable-p' for Tramp files." (with-parsed-tramp-file-name filename nil - (with-file-property v localname "file-writable-p" + (with-tramp-file-property v localname "file-writable-p" (if (file-exists-p filename) ;; Examine `file-attributes' cache to see if request can be ;; satisfied without remote operation. @@ -1619,7 +1621,7 @@ (defun tramp-sh-handle-file-ownership-preserved-p (filename) "Like `file-ownership-preserved-p' for Tramp files." (with-parsed-tramp-file-name filename nil - (with-file-property v localname "file-ownership-preserved-p" + (with-tramp-file-property v localname "file-ownership-preserved-p" (let ((attributes (file-attributes filename))) ;; Return t if the file doesn't exist, since it's true that no ;; information would be lost by an (attempted) delete and create. @@ -1637,7 +1639,7 @@ (let* ((temp (copy-tree (with-parsed-tramp-file-name directory nil - (with-file-property + (with-tramp-file-property v localname (format "directory-files-and-attributes-%s" id-format) (save-excursion @@ -1987,7 +1989,7 @@ (tramp-error v 'file-already-exists "File %s already exists" newname)) - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 0 (format "%s %s to %s" (if (eq op 'copy) "Copying" "Renaming") filename newname) @@ -2505,7 +2507,7 @@ nil) ((and suffix (nth 2 suffix)) ;; We found an uncompression rule. - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 0 (format "Uncompressing %s" file) (when (tramp-send-command-and-check v (concat (nth 2 suffix) " " @@ -2517,7 +2519,7 @@ (t ;; We don't recognize the file as compressed, so compress it. ;; Try gzip. - (tramp-with-progress-reporter v 0 (format "Compressing %s" file) + (with-tramp-progress-reporter v 0 (format "Compressing %s" file) (when (tramp-send-command-and-check v (concat "gzip -f " (tramp-shell-quote-argument localname))) @@ -2673,7 +2675,7 @@ (string-match "\\`su\\(do\\)?\\'" method)) (setq uname (concat uname user))) (setq uname - (with-connection-property v uname + (with-tramp-connection-property v uname (tramp-send-command v (format "cd %s; pwd" (tramp-shell-quote-argument uname))) (with-current-buffer (tramp-get-buffer v) @@ -2943,7 +2945,7 @@ ;; Use inline encoding for file transfer. (rem-enc (save-excursion - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Encoding remote file %s" filename) (tramp-barf-unless-okay v (format rem-enc (tramp-shell-quote-argument localname)) @@ -2957,7 +2959,7 @@ (with-temp-buffer (set-buffer-multibyte nil) (insert-buffer-substring (tramp-get-buffer v)) - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Decoding remote file %s with function %s" filename loc-dec) (funcall loc-dec (point-min) (point-max)) @@ -2975,7 +2977,7 @@ (let (file-name-handler-alist (coding-system-for-write 'binary)) (write-region (point-min) (point-max) tmpfile2)) - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Decoding remote file %s with command %s" filename loc-dec) (unwind-protect @@ -3203,7 +3205,7 @@ (set-buffer-multibyte nil) ;; Use encoding function or command. (if (functionp loc-enc) - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Encoding region using function `%s'" loc-enc) (let ((coding-system-for-read 'binary)) @@ -3221,7 +3223,7 @@ (tramp-compat-temporary-file-directory))) (funcall loc-enc (point-min) (point-max)))) - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Encoding region using command `%s'" loc-enc) (unless (zerop (tramp-call-local-coding-command @@ -3235,7 +3237,7 @@ ;; Send buffer into remote decoding command which ;; writes to remote file. Because this happens on ;; the remote host, we cannot use the function. - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Decoding region into remote file %s" filename) (goto-char (point-max)) @@ -3335,7 +3337,7 @@ "Like `vc-registered' for Tramp files." (tramp-compat-with-temp-message "" (with-parsed-tramp-file-name file nil - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Checking `vc-registered' for %s" file) ;; There could be new files, created by the vc backend. We @@ -3433,7 +3435,7 @@ (let ((scripts (tramp-get-connection-property (tramp-get-connection-process vec) "scripts" nil))) (unless (member name scripts) - (tramp-with-progress-reporter vec 5 (format "Sending script `%s'" name) + (with-tramp-progress-reporter vec 5 (format "Sending script `%s'" name) ;; The script could contain a call of Perl. This is masked with `%s'. (tramp-barf-unless-okay vec @@ -3602,7 +3604,7 @@ (defun tramp-open-shell (vec shell) "Opens shell SHELL." - (tramp-with-progress-reporter + (with-tramp-progress-reporter vec 5 (format "Opening remote shell `%s'" shell) ;; Find arguments for this shell. (let ((tramp-end-of-output tramp-initial-end-of-output) @@ -3638,7 +3640,7 @@ (tramp-file-name-method vec) 'tramp-remote-shell))) shell) (setq shell - (with-connection-property vec "remote-shell" + (with-tramp-connection-property vec "remote-shell" ;; CCC: "root" does not exist always, see QNAP 459. ;; Which check could we apply instead? (tramp-send-command vec "echo ~root" t) @@ -3673,7 +3675,7 @@ (tramp-open-shell vec shell)) ;; Busyboxes tend to behave strange. We check for the existence. - (with-connection-property vec "busybox" + (with-tramp-connection-property vec "busybox" (tramp-send-command vec (format "%s --version" shell) t) (let ((case-fold-search t)) (and (string-match "busybox" (buffer-string)) t)))))) @@ -3798,7 +3800,7 @@ ;; successfully, sending 625 bytes failed. Emacs makes a hack when ;; this host type is detected locally. It cannot handle remote ;; hosts, though. - (with-connection-property proc "chunksize" + (with-tramp-connection-property proc "chunksize" (cond ((and (integerp tramp-chunksize) (> tramp-chunksize 0)) tramp-chunksize) @@ -4327,7 +4329,7 @@ (when (and (boundp 'non-essential) (symbol-value 'non-essential)) (throw 'non-essential 'non-essential)) - (tramp-with-progress-reporter + (with-tramp-progress-reporter vec 3 (if (zerop (length (tramp-file-name-user vec))) (format "Opening connection for %s using %s" @@ -4773,7 +4775,7 @@ ;; Variables local to connection. (defun tramp-get-remote-path (vec) - (with-connection-property + (with-tramp-connection-property ;; When `tramp-own-remote-path' is in `tramp-remote-path', we ;; cache the result for the session only. Otherwise, the result ;; is cached persistently. @@ -4845,7 +4847,7 @@ remote-path))))) (defun tramp-get-ls-command (vec) - (with-connection-property vec "ls" + (with-tramp-connection-property vec "ls" (tramp-message vec 5 "Finding a suitable `ls' command") (or (catch 'ls-found @@ -4871,7 +4873,7 @@ (defun tramp-get-ls-command-with-dired (vec) (save-match-data - (with-connection-property vec "ls-dired" + (with-tramp-connection-property vec "ls-dired" (tramp-message vec 5 "Checking, whether `ls --dired' works") ;; Some "ls" versions are sensible wrt the order of arguments, ;; they fail when "-al" is after the "--dired" argument (for @@ -4880,7 +4882,7 @@ vec (format "%s --dired -al /dev/null" (tramp-get-ls-command vec)))))) (defun tramp-get-test-command (vec) - (with-connection-property vec "test" + (with-tramp-connection-property vec "test" (tramp-message vec 5 "Finding a suitable `test' command") (if (tramp-send-command-and-check vec "test 0") "test" @@ -4890,7 +4892,7 @@ ;; Does `test A -nt B' work? Use abominable `find' construct if it ;; doesn't. BSD/OS 4.0 wants the parentheses around the command, ;; for otherwise the shell crashes. - (with-connection-property vec "test-nt" + (with-tramp-connection-property vec "test-nt" (or (progn (tramp-send-command @@ -4908,17 +4910,17 @@ "tramp_test_nt %s %s")))) (defun tramp-get-file-exists-command (vec) - (with-connection-property vec "file-exists" + (with-tramp-connection-property vec "file-exists" (tramp-message vec 5 "Finding command to check if file exists") (tramp-find-file-exists-command vec))) (defun tramp-get-remote-ln (vec) - (with-connection-property vec "ln" + (with-tramp-connection-property vec "ln" (tramp-message vec 5 "Finding a suitable `ln' command") (tramp-find-executable vec "ln" (tramp-get-remote-path vec)))) (defun tramp-get-remote-perl (vec) - (with-connection-property vec "perl" + (with-tramp-connection-property vec "perl" (tramp-message vec 5 "Finding a suitable `perl' command") (let ((result (or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec)) @@ -4926,16 +4928,16 @@ vec "perl" (tramp-get-remote-path vec))))) ;; We must check also for some Perl modules. (when result - (with-connection-property vec "perl-file-spec" + (with-tramp-connection-property vec "perl-file-spec" (tramp-send-command-and-check vec (format "%s -e 'use File::Spec;'" result))) - (with-connection-property vec "perl-cwd-realpath" + (with-tramp-connection-property vec "perl-cwd-realpath" (tramp-send-command-and-check vec (format "%s -e 'use Cwd \"realpath\";'" result)))) result))) (defun tramp-get-remote-stat (vec) - (with-connection-property vec "stat" + (with-tramp-connection-property vec "stat" (tramp-message vec 5 "Finding a suitable `stat' command") (let ((result (tramp-find-executable vec "stat" (tramp-get-remote-path vec))) @@ -4953,7 +4955,7 @@ result))) (defun tramp-get-remote-readlink (vec) - (with-connection-property vec "readlink" + (with-tramp-connection-property vec "readlink" (tramp-message vec 5 "Finding a suitable `readlink' command") (let ((result (tramp-find-executable vec "readlink" (tramp-get-remote-path vec)))) @@ -4963,12 +4965,12 @@ result)))) (defun tramp-get-remote-trash (vec) - (with-connection-property vec "trash" + (with-tramp-connection-property vec "trash" (tramp-message vec 5 "Finding a suitable `trash' command") (tramp-find-executable vec "trash" (tramp-get-remote-path vec)))) (defun tramp-get-remote-id (vec) - (with-connection-property vec "id" + (with-tramp-connection-property vec "id" (tramp-message vec 5 "Finding POSIX `id' command") (or (catch 'id-found @@ -4982,7 +4984,7 @@ (tramp-error vec 'file-error "Couldn't find a POSIX `id' command")))) (defun tramp-get-remote-uid (vec id-format) - (with-connection-property vec (format "uid-%s" id-format) + (with-tramp-connection-property vec (format "uid-%s" id-format) (let ((res (tramp-send-command-and-read vec (format "%s -u%s %s" @@ -4994,7 +4996,7 @@ (if (and (equal id-format 'integer) (not (integerp res))) -1 res)))) (defun tramp-get-remote-gid (vec id-format) - (with-connection-property vec (format "gid-%s" id-format) + (with-tramp-connection-property vec (format "gid-%s" id-format) (let ((res (tramp-send-command-and-read vec (format "%s -g%s %s" @@ -5020,7 +5022,7 @@ If no corresponding command is found, nil is returned." (when (and (integerp tramp-inline-compress-start-size) (> size tramp-inline-compress-start-size)) - (with-connection-property (tramp-get-connection-process vec) prop + (with-tramp-connection-property (tramp-get-connection-process vec) prop (tramp-find-inline-compress vec) (tramp-get-connection-property (tramp-get-connection-process vec) prop nil)))) @@ -5041,7 +5043,8 @@ ;; no inline coding is found. (ignore-errors (let ((coding - (with-connection-property (tramp-get-connection-process vec) prop + (with-tramp-connection-property + (tramp-get-connection-process vec) prop (tramp-find-inline-encoding vec) (tramp-get-connection-property (tramp-get-connection-process vec) prop nil))) === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2012-08-15 16:29:11 +0000 +++ lisp/net/tramp-smb.el 2012-10-09 12:49:02 +0000 @@ -355,7 +355,7 @@ (let ((t1 (tramp-tramp-file-p dirname)) (t2 (tramp-tramp-file-p newname))) (with-parsed-tramp-file-name (if t1 dirname newname) nil - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 0 (format "Copying %s to %s" dirname newname) (cond ;; We must use a local temporary directory. @@ -491,7 +491,7 @@ PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." (setq filename (expand-file-name filename) newname (expand-file-name newname)) - (tramp-with-progress-reporter + (with-tramp-progress-reporter (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) 0 (format "Copying %s to %s" filename newname) @@ -642,7 +642,8 @@ (unless id-format (setq id-format 'integer)) (ignore-errors (with-parsed-tramp-file-name filename nil - (with-file-property v localname (format "file-attributes-%s" id-format) + (with-tramp-file-property + v localname (format "file-attributes-%s" id-format) (if (and (tramp-smb-get-share v) (tramp-smb-get-stat-capability v)) (tramp-smb-do-file-attributes-with-stat v id-format) ;; Reading just the filename entry via "dir localname" is not @@ -753,7 +754,7 @@ v 'file-error "Cannot make local copy of non-existing file `%s'" filename)) (let ((tmpfile (tramp-compat-make-temp-file filename))) - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Fetching %s to tmp file %s" filename tmpfile) (unless (tramp-smb-send-command v (format "get \"%s\" \"%s\"" @@ -771,7 +772,7 @@ (all-completions filename (with-parsed-tramp-file-name directory nil - (with-file-property v localname "file-name-all-completions" + (with-tramp-file-property v localname "file-name-all-completions" (save-match-data (let ((entries (tramp-smb-get-file-entries directory))) (mapcar @@ -1119,7 +1120,7 @@ (if (file-remote-p filename) filename newname)) 'file-already-exists newname)) - (tramp-with-progress-reporter + (with-tramp-progress-reporter (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) 0 (format "Renaming %s to %s" filename newname) @@ -1253,7 +1254,7 @@ (list start end tmpfile append 'no-message lockname confirm) (list start end tmpfile append 'no-message lockname))) - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Moving tmp file %s to %s" tmpfile filename) (unwind-protect (unless (tramp-smb-send-command @@ -1312,7 +1313,7 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)." (with-parsed-tramp-file-name (file-name-as-directory directory) nil (setq localname (or localname "/")) - (with-file-property v localname "file-entries" + (with-tramp-file-property v localname "file-entries" (with-current-buffer (tramp-get-connection-buffer v) (let* ((share (tramp-smb-get-share v)) (cache (tramp-get-connection-property v "share-cache" nil)) @@ -1497,7 +1498,7 @@ ;; When we are not logged in yet, we return nil. (if (let ((p (tramp-get-connection-process vec))) (and p (processp p) (memq (process-status p) '(run open)))) - (with-connection-property + (with-tramp-connection-property (tramp-get-connection-process vec) "cifs-capabilities" (save-match-data (when (tramp-smb-send-command vec "posix") @@ -1515,7 +1516,7 @@ ;; When we are not logged in yet, we return nil. (if (let ((p (tramp-get-connection-process vec))) (and p (processp p) (memq (process-status p) '(run open)))) - (with-connection-property + (with-tramp-connection-property (tramp-get-connection-process vec) "stat-capability" (tramp-smb-send-command vec "stat .")))) @@ -1625,7 +1626,7 @@ (setq args (append args (list argument)))) ;; OK, let's go. - (tramp-with-progress-reporter + (with-tramp-progress-reporter vec 3 (format "Opening connection for //%s%s/%s" (if (not (zerop (length user))) (concat user "@") "") === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2012-10-06 20:30:26 +0000 +++ lisp/net/tramp.el 2012-10-09 12:49:02 +0000 @@ -1353,8 +1353,7 @@ "tramp-debug-message" "tramp-error" "tramp-error-with-buffer" - "tramp-message" - "tramp-with-progress-reporter") + "tramp-message") t) "$") fn))) @@ -1498,7 +1497,7 @@ (when (string-match message (or (current-message) "")) (tramp-compat-funcall 'progress-reporter-update reporter value)))) -(defmacro tramp-with-progress-reporter (vec level message &rest body) +(defmacro with-tramp-progress-reporter (vec level message &rest body) "Executes BODY, spinning a progress reporter with MESSAGE. If LEVEL does not fit for visible messages, or if this is a nested call of the macro, there are only traces without a visible @@ -1527,7 +1526,42 @@ (tramp-message ,vec ,level "%s...done" ,message)))) (tramp-compat-font-lock-add-keywords - 'emacs-lisp-mode '("\\")) + 'emacs-lisp-mode '("\\")) + +(defmacro with-tramp-file-property (vec file property &rest body) + "Check in Tramp cache for PROPERTY, otherwise execute BODY and set cache. +FILE must be a local file name on a connection identified via VEC." + `(if (file-name-absolute-p ,file) + (let ((value (tramp-get-file-property ,vec ,file ,property 'undef))) + (when (eq value 'undef) + ;; We cannot pass @body as parameter to + ;; `tramp-set-file-property' because it mangles our + ;; debug messages. + (setq value (progn ,@body)) + (tramp-set-file-property ,vec ,file ,property value)) + value) + ,@body)) + +(put 'with-tramp-file-property 'lisp-indent-function 3) +(put 'with-tramp-file-property 'edebug-form-spec t) +(tramp-compat-font-lock-add-keywords + 'emacs-lisp-mode '("\\")) + +(defmacro with-tramp-connection-property (key property &rest body) + "Check in Tramp for property PROPERTY, otherwise executes BODY and set." + `(let ((value (tramp-get-connection-property ,key ,property 'undef))) + (when (eq value 'undef) + ;; We cannot pass ,@body as parameter to + ;; `tramp-set-connection-property' because it mangles our debug + ;; messages. + (setq value (progn ,@body)) + (tramp-set-connection-property ,key ,property value)) + value)) + +(put 'with-tramp-connection-property 'lisp-indent-function 2) +(put 'with-tramp-connection-property 'edebug-form-spec t) +(tramp-compat-font-lock-add-keywords + 'emacs-lisp-mode '("\\")) (defalias 'tramp-drop-volume-letter (if (memq system-type '(cygwin windows-nt)) @@ -2860,7 +2894,7 @@ (setq filename (expand-file-name filename)) (let (result local-copy remote-copy) (with-parsed-tramp-file-name filename nil - (tramp-with-progress-reporter + (with-tramp-progress-reporter v 3 (format "Inserting `%s'" filename) (unwind-protect (if (not (file-exists-p filename)) @@ -2983,7 +3017,7 @@ (if (not (file-exists-p file)) nil (let ((tramp-message-show-message (not nomessage))) - (tramp-with-progress-reporter v 0 (format "Loading %s" file) + (with-tramp-progress-reporter v 0 (format "Loading %s" file) (let ((local-copy (file-local-copy file))) ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil. (unwind-protect @@ -3127,7 +3161,7 @@ "Send the login name." (when (not (stringp tramp-current-user)) (setq tramp-current-user - (with-connection-property vec "login-as" + (with-tramp-connection-property vec "login-as" (save-window-excursion (let ((enable-recursive-minibuffers t)) (pop-to-buffer (tramp-get-connection-buffer vec)) @@ -3417,13 +3451,13 @@ (defun tramp-get-inode (vec) "Returns the virtual inode number. If it doesn't exist, generate a new one." - (with-file-property vec (tramp-file-name-localname vec) "inode" + (with-tramp-file-property vec (tramp-file-name-localname vec) "inode" (setq tramp-inodes (1+ tramp-inodes)))) (defun tramp-get-device (vec) "Returns the virtual device number. If it doesn't exist, generate a new one." - (with-connection-property (tramp-get-connection-process vec) "device" + (with-tramp-connection-property (tramp-get-connection-process vec) "device" (cons -1 (setq tramp-devices (1+ tramp-devices))))) (defun tramp-equal-remote (file1 file2) @@ -3545,7 +3579,7 @@ (defun tramp-get-remote-tmpdir (vec) "Return directory for temporary files on the remote host identified by VEC." - (with-connection-property vec "tmpdir" + (with-tramp-connection-property vec "tmpdir" (let ((dir (tramp-make-tramp-file-name (tramp-file-name-method vec) (tramp-file-name-user vec) @@ -3833,7 +3867,6 @@ ;; * In Emacs 21, `insert-directory' shows total number of bytes used ;; by the files in that directory. Add this here. ;; * Avoid screen blanking when hitting `g' in dired. (Eli Tziperman) -;; * Make ffap.el grok Tramp filenames. (Eli Tziperman) ;; * abbreviate-file-name ;; * Better error checking. At least whenever we see something ;; strange when doing zerop, we should kill the process and start === modified file 'lisp/net/trampver.el' --- lisp/net/trampver.el 2012-09-12 16:36:25 +0000 +++ lisp/net/trampver.el 2012-10-09 12:49:02 +0000 @@ -31,7 +31,7 @@ ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.6" +(defconst tramp-version "2.2.7-pre" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.6 is not fit for %s" + (format "Tramp 2.2.7-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) ------------------------------------------------------------ revno: 110485 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-09 06:17:32 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2012-10-08 10:17:36 +0000 +++ autogen/config.in 2012-10-09 10:17:32 +0000 @@ -692,7 +692,7 @@ Mac OS X. */ #undef HAVE_NS -/* Define to use native Windows GUI. */ +/* Define to use native MS Windows GUI. */ #undef HAVE_NTGUI /* Define to 1 if libotf has OTF_get_variation_glyphs. */ === modified file 'autogen/configure' --- autogen/configure 2012-10-08 10:17:36 +0000 +++ autogen/configure 2012-10-09 10:17:32 +0000 @@ -2084,7 +2084,7 @@ --without-xaw3d don't use Xaw3d --without-xim don't use X11 XIM --with-ns use NeXTstep (Cocoa or GNUstep) windowing system - --with-w32 use native Windows GUI + --with-w32 use native MS Windows GUI --without-gpm don't use -lgpm for mouse support on a GNU/Linux console --without-dbus don't compile with D-Bus support ------------------------------------------------------------ revno: 110484 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-09 00:08:26 -0700 message: Update some function declarations * w32-fns.el (set-message-beep): * term/w32-win.el (set-message-beep): Update declarations. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-09 07:06:54 +0000 +++ lisp/ChangeLog 2012-10-09 07:08:26 +0000 @@ -1,5 +1,8 @@ 2012-10-09 Glenn Morris + * w32-fns.el (set-message-beep): + * term/w32-win.el (set-message-beep): Update declarations. + * newcomment.el (comment-normalize-vars): Doc fix (presumably). 2012-10-09 Stefan Monnier === modified file 'lisp/term/w32-win.el' --- lisp/term/w32-win.el 2012-09-17 11:55:05 +0000 +++ lisp/term/w32-win.el 2012-10-09 07:08:26 +0000 @@ -89,7 +89,7 @@ (make-obsolete 'w32-default-color-map nil "24.1") (declare-function w32-send-sys-command "w32fns.c") -(declare-function set-message-beep "w32console.c") +(declare-function set-message-beep "w32fns.c") ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles (if (fboundp 'new-fontset) === modified file 'lisp/w32-fns.el' --- lisp/w32-fns.el 2012-09-17 11:55:02 +0000 +++ lisp/w32-fns.el 2012-10-09 07:08:26 +0000 @@ -32,7 +32,7 @@ ;;;; Function keys -(declare-function set-message-beep "w32console.c") +(declare-function set-message-beep "w32fns.c") (declare-function w32-get-locale-info "w32proc.c") (declare-function w32-get-valid-locale-ids "w32proc.c") ------------------------------------------------------------ revno: 110483 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-09 00:06:54 -0700 message: * lisp/newcomment.el (comment-normalize-vars): Doc fix (presumably). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-09 06:41:07 +0000 +++ lisp/ChangeLog 2012-10-09 07:06:54 +0000 @@ -1,3 +1,7 @@ +2012-10-09 Glenn Morris + + * newcomment.el (comment-normalize-vars): Doc fix (presumably). + 2012-10-09 Stefan Monnier * bindings.el (mode-line-toggle-read-only, mode-line-toggle-modified) === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2012-10-07 19:48:02 +0000 +++ lisp/newcomment.el 2012-10-09 07:06:54 +0000 @@ -327,7 +327,7 @@ ;;;###autoload (defun comment-normalize-vars (&optional noerror) "Check and setup the variables needed by other commenting functions. -Any command calling functions from newcomment.el, being entry points, should +Any command calling functions from newcomment.el, besides entry points, should call this function before any other, so the rest of the code can assume that the variables are properly set." (unless (and (not comment-start) noerror) ------------------------------------------------------------ revno: 110482 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-09 00:00:23 -0700 message: Make cusver handle options moved from C to lisp * admin/admin.el (cusver-scan-cus-start): New function. (cusver-check): Scan old cus-start.el. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-10-07 00:54:36 +0000 +++ admin/ChangeLog 2012-10-09 07:00:23 +0000 @@ -1,3 +1,8 @@ +2012-10-09 Glenn Morris + + * admin.el (cusver-scan-cus-start): New function. + (cusver-check): Scan old cus-start.el. + 2012-10-07 Glenn Morris * admin.el (cusver-new-version): Set default. === modified file 'admin/admin.el' --- admin/admin.el 2012-10-07 00:54:36 +0000 +++ admin/admin.el 2012-10-09 07:00:23 +0000 @@ -446,8 +446,6 @@ (1+ emacs-minor-version)) "Version number that new defcustoms should have.") -;; TODO do something about renamed variables with aliases to the old name? -;; Scan old cus-start.el to find variables moved from C to lisp? (defun cusver-scan (file &optional old) "Scan FILE for `defcustom' calls. Return a list with elements of the form (VAR . VER), @@ -486,6 +484,21 @@ (message "%sdone" m) alist)) +(defun cusver-scan-cus-start (file) + "Scan cus-start.el and return an alist with elements (VAR . VER)." + (if (file-readable-p file) + (with-temp-buffer + (insert-file-contents file) + (when (search-forward "(let ((all '(" nil t) + (backward-char 1) + (let (var ver alist) + (dolist (elem (ignore-errors (read (current-buffer)))) + (when (symbolp (setq var (car-safe elem))) + (or (stringp (setq ver (nth 3 elem))) + (setq ver nil)) + (setq alist (cons (cons var ver) alist)))) + alist))))) + (define-button-type 'cusver-xref 'action #'cusver-goto-xref) (defun cusver-goto-xref (button) @@ -501,11 +514,9 @@ (pop-to-buffer (current-buffer)))))) ;; You should probably at least do a grep over the old directory -;; to check the results of this look sensible. Eg cus-start if -;; something moved from C to Lisp. -;; TODO handle renamed things with aliases to the old names. -;; What to do about new files? Does everything in there need a :version, -;; or eg just the defgroup? +;; to check the results of this look sensible. +;; TODO Check cus-start if something moved from C to Lisp. +;; TODO Handle renamed things with aliases to the old names. (defun cusver-check (newdir olddir version) "Check that defcustoms have :version tags where needed. NEWDIR is the current lisp/ directory, OLDDIR is that from the previous @@ -537,6 +548,8 @@ (message "Reading old defcustoms...") (dolist (file oldfiles) (setq oldcus (append oldcus (cusver-scan file t)))) + (setq oldcus (append oldcus (cusver-scan-cus-start + (expand-file-name "cus-start.el" olddir)))) ;; newcus has elements (FILE (VAR VER) ... ). ;; oldcus just (VAR . VER). (message "Checking for version tags...") ------------------------------------------------------------ revno: 110481 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-09 02:41:07 -0400 message: * lisp/bindings.el (mode-line-toggle-read-only, mode-line-toggle-modified) (mode-line-widen, mode-line-input-method-map) (mode-line-coding-system-map, mode-line-remote) (mode-line-unbury-buffer, mode-line-bury-buffer) (mode-line-next-buffer, mode-line-previous-buffer): Replace save-selected-window+select-window => with-selected-window. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-09 06:36:16 +0000 +++ lisp/ChangeLog 2012-10-09 06:41:07 +0000 @@ -1,5 +1,12 @@ 2012-10-09 Stefan Monnier + * bindings.el (mode-line-toggle-read-only, mode-line-toggle-modified) + (mode-line-widen, mode-line-input-method-map) + (mode-line-coding-system-map, mode-line-remote) + (mode-line-unbury-buffer, mode-line-bury-buffer) + (mode-line-next-buffer, mode-line-previous-buffer): + Replace save-selected-window+select-window => with-selected-window. + * progmodes/cc-bytecomp.el (cc-bytecomp-defmacro): Remove, unused. * progmodes/cc-vars.el (bq-process): Remove, unused. === modified file 'lisp/bindings.el' --- lisp/bindings.el 2012-09-30 08:35:11 +0000 +++ lisp/bindings.el 2012-10-09 06:41:07 +0000 @@ -38,23 +38,20 @@ (defun mode-line-toggle-read-only (event) "Like `toggle-read-only', for the mode-line." (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) + (with-selected-window (posn-window (event-start event)) (read-only-mode 'toggle))) (defun mode-line-toggle-modified (event) "Toggle the buffer-modified flag from the mode-line." (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) + (with-selected-window (posn-window (event-start event)) (set-buffer-modified-p (not (buffer-modified-p))) (force-mode-line-update))) (defun mode-line-widen (event) "Widen a buffer from the mode-line." (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) + (with-selected-window (posn-window (event-start event)) (widen) (force-mode-line-update))) @@ -63,17 +60,13 @@ (define-key map [mode-line mouse-2] (lambda (e) (interactive "e") - (save-selected-window - (select-window - (posn-window (event-start e))) + (with-selected-window (posn-window (event-start e)) (toggle-input-method) (force-mode-line-update)))) (define-key map [mode-line mouse-3] (lambda (e) (interactive "e") - (save-selected-window - (select-window - (posn-window (event-start e))) + (with-selected-window (posn-window (event-start e)) (describe-current-input-method)))) (purecopy map))) @@ -82,16 +75,14 @@ (define-key map [mode-line mouse-1] (lambda (e) (interactive "e") - (save-selected-window - (select-window (posn-window (event-start e))) + (with-selected-window (posn-window (event-start e)) (when (and enable-multibyte-characters buffer-file-coding-system) (describe-coding-system buffer-file-coding-system))))) (define-key map [mode-line mouse-3] (lambda (e) (interactive "e") - (save-selected-window - (select-window (posn-window (event-start e))) + (with-selected-window (posn-window (event-start e)) (call-interactively 'set-buffer-file-coding-system)))) (purecopy map)) "Local keymap for the coding-system part of the mode line.") @@ -237,8 +228,7 @@ 'mouse-face 'mode-line-highlight 'help-echo (purecopy (lambda (window _object _point) (format "%s" - (save-selected-window - (select-window window) + (with-selected-window window (concat (if (file-remote-p default-directory) "Current directory is remote: " @@ -474,15 +464,13 @@ (defun mode-line-unbury-buffer (event) "\ Call `unbury-buffer' in this window." (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) + (with-selected-window (posn-window (event-start event)) (unbury-buffer))) (defun mode-line-bury-buffer (event) "\ Like `bury-buffer', but temporarily select EVENT's window." (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) + (with-selected-window (posn-window (event-start event)) (bury-buffer))) (defun mode-line-other-buffer () "\ @@ -493,15 +481,13 @@ (defun mode-line-next-buffer (event) "Like `next-buffer', but temporarily select EVENT's window." (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) + (with-selected-window (posn-window (event-start event)) (next-buffer))) (defun mode-line-previous-buffer (event) "Like `previous-buffer', but temporarily select EVENT's window." (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) + (with-selected-window (posn-window (event-start event)) (previous-buffer))) (defmacro bound-and-true-p (var)