Now on revision 114175. ------------------------------------------------------------ revno: 114175 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-09-08 17:10:58 -0700 message: * configure.ac: Tweak previous change. Only disable GZIP_PROG if there is something to disable. diff: === modified file 'configure.ac' --- configure.ac 2013-09-08 23:50:23 +0000 +++ configure.ac 2013-09-09 00:10:58 +0000 @@ -946,7 +946,7 @@ dnl Don't use GZIP, which is used by gzip for additional parameters. AC_PATH_PROG(GZIP_PROG, gzip) -test $with_compress_install != yes && \ +test $with_compress_install != yes && test -n "$GZIP_PROG" && \ GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" if test $opsys = gnu-linux; then ------------------------------------------------------------ revno: 114174 fixes bug: http://debbugs.gnu.org/9789 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-09-08 16:50:23 -0700 message: Rename configure's --without-compress-info to --without-compress-install * configure.ac (--without-compress-install): Rename from --without-compress-info. (GZIP_INFO): Remove. (GZIP_PROG): Allow --without-compress-install to disable it. * Makefile.in (GZIP_INFO): Remove all references. * etc/NEWS: Mention this. diff: === modified file 'ChangeLog' --- ChangeLog 2013-09-08 23:31:14 +0000 +++ ChangeLog 2013-09-08 23:50:23 +0000 @@ -1,5 +1,11 @@ 2013-09-08 Glenn Morris + * configure.ac (--without-compress-install): + Rename from --without-compress-info. (Bug#9789) + (GZIP_INFO): Remove. + (GZIP_PROG): Allow --without-compress-install to disable it. + * Makefile.in (GZIP_INFO): Remove all references. + * info/dir: Tweak emacs-gnutls entry. 2013-09-07 Paul Eggert === modified file 'Makefile.in' --- Makefile.in 2013-09-04 06:45:44 +0000 +++ Makefile.in 2013-09-08 23:50:23 +0000 @@ -259,8 +259,6 @@ # We use gzip to compress installed .el files. GZIP_PROG = @GZIP_PROG@ -# If non-nil, gzip the installed Info and man pages. -GZIP_INFO = @GZIP_INFO@ # ============================= Targets ============================== @@ -662,7 +660,7 @@ for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ (cd $${thisdir}; \ ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \ - ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ + [ -n "${GZIP_PROG}" ] || continue ; \ rm -f $(DESTDIR)${infodir}/$$f.gz; \ ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \ done; \ @@ -684,7 +682,7 @@ dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \ (cd $${thisdir}; \ ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \ - ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ + [ -n "${GZIP_PROG}" ] || continue ; \ rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \ ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \ done @@ -754,12 +752,12 @@ for elt in ${INFO_NONMISC} $${info_misc}; do \ (cd $${thisdir}; \ $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \ - if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \ + if [ -n "${GZIP_PROG}" ]; then \ ext=.gz; else ext=; fi; \ rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \ done; \ fi) - (if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \ + (if [ -n "${GZIP_PROG}" ]; then \ ext=.gz; else ext=; fi; \ if cd ${mansrcdir}; then \ for page in *.1; do \ === modified file 'configure.ac' --- configure.ac 2013-09-07 00:20:56 +0000 +++ configure.ac 2013-09-08 23:50:23 +0000 @@ -266,13 +266,9 @@ ## This is an option because I do not know if all info/man support ## compressed files, nor how to test if they do so. -OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages]) -if test $with_compress_info = yes; then - GZIP_INFO=yes -else - GZIP_INFO= -fi -AC_SUBST(GZIP_INFO) +OPTION_DEFAULT_ON([compress-install], + [don't compress some files (.el, .info, etc.) when installing. Equivalent to: +make GZIP_PROG= install]) AC_ARG_WITH([pkg-config-prog],dnl [AS_HELP_STRING([--with-pkg-config-prog=FILENAME], @@ -950,6 +946,9 @@ dnl Don't use GZIP, which is used by gzip for additional parameters. AC_PATH_PROG(GZIP_PROG, gzip) +test $with_compress_install != yes && \ + GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" + if test $opsys = gnu-linux; then AC_PATH_PROG(PAXCTL, paxctl,, [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) === modified file 'etc/NEWS' --- etc/NEWS 2013-09-07 10:39:29 +0000 +++ etc/NEWS 2013-09-08 23:50:23 +0000 @@ -34,6 +34,10 @@ `--with-file-notification-no'. See below for file-notify features. FIXME? This feature is not available for the Nextstep port. (?) +** The configure option `without-compress-info' has been generalized, +and renamed to `without-compress-install'. It now prevents compression +of _any_ files during installation. + ** The configure option --with-crt-dir has been removed. It is no longer needed, as the crt*.o files are no longer linked specially. ------------------------------------------------------------ revno: 114173 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-09-08 16:31:14 -0700 message: * doc/misc/emacs-gnutls.texi: Tweak direntry. * info/dir: Tweak emacs-gnutls entry. diff: === modified file 'ChangeLog' --- ChangeLog 2013-09-07 00:20:56 +0000 +++ ChangeLog 2013-09-08 23:31:14 +0000 @@ -1,3 +1,7 @@ +2013-09-08 Glenn Morris + + * info/dir: Tweak emacs-gnutls entry. + 2013-09-07 Paul Eggert Port --without-x --enable-gcc-warnings to Fedora 19. === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-09-06 08:25:15 +0000 +++ doc/misc/ChangeLog 2013-09-08 23:31:14 +0000 @@ -1,3 +1,7 @@ +2013-09-08 Glenn Morris + + * emacs-gnutls.texi: Tweak direntry. + 2013-09-06 Michael Albinus * tramp.texi (Alternative Syntax): Remove chapter. === modified file 'doc/misc/emacs-gnutls.texi' --- doc/misc/emacs-gnutls.texi 2013-01-05 16:19:53 +0000 +++ doc/misc/emacs-gnutls.texi 2013-09-08 23:31:14 +0000 @@ -25,7 +25,7 @@ @dircategory Emacs network features @direntry -* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. +* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. @end direntry @titlepage === modified file 'info/dir' --- info/dir 2013-08-04 21:27:49 +0000 +++ info/dir 2013-09-08 23:31:14 +0000 @@ -41,7 +41,7 @@ Emacs network features * EUDC: (eudc). Emacs client for directory servers (LDAP, PH). * Gnus: (gnus). The newsreader Gnus. -* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. +* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. * Mairix: (mairix-el). Emacs interface to the Mairix mail indexer. * MH-E: (mh-e). Emacs interface to the MH mail system. * Message: (message). Mail and news composition mode that ------------------------------------------------------------ revno: 114172 fixes bug: http://debbugs.gnu.org/15305 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-09-08 16:15:17 -0700 message: * lisp/saveplace.el (load-save-place-alist-from-file): Demote errors. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-08 15:04:10 +0000 +++ lisp/ChangeLog 2013-09-08 23:15:17 +0000 @@ -1,3 +1,8 @@ +2013-09-08 Glenn Morris + + * saveplace.el (load-save-place-alist-from-file): + Demote errors. (Bug#15305) + 2013-09-08 Michael Albinus Improve compatibility with older Emacsen, and XEmacs. === modified file 'lisp/saveplace.el' --- lisp/saveplace.el 2013-06-14 09:32:01 +0000 +++ lisp/saveplace.el 2013-09-08 23:15:17 +0000 @@ -255,8 +255,13 @@ (insert-file-contents file) (goto-char (point-min)) (setq save-place-alist - (car (read-from-string - (buffer-substring (point-min) (point-max))))) + ;; This is with-demoted-errors, but we want to + ;; mention save-place in any error message. + (condition-case err + (car (read-from-string + (buffer-substring (point-min) (point-max)))) + (error (message "Error reading save-place-file: %S" err) + nil))) ;; If there is a limit, and we're over it, then we'll ;; have to truncate the end of the list: ------------------------------------------------------------ revno: 114171 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15296 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-09-08 14:01:25 -0400 message: * doc/lispref/macros.texi (Defining Macros): Prefer "function" to "lambda expression". diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-28 06:01:52 +0000 +++ doc/lispref/ChangeLog 2013-09-08 18:01:25 +0000 @@ -1,3 +1,8 @@ +2013-09-08 Stefan Monnier + + * macros.texi (Defining Macros): Prefer "function" to "lambda + expression" (bug#15296). + 2013-08-28 Paul Eggert * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, === modified file 'doc/lispref/macros.texi' --- doc/lispref/macros.texi 2013-01-16 02:03:06 +0000 +++ doc/lispref/macros.texi 2013-09-08 18:01:25 +0000 @@ -191,8 +191,8 @@ @section Defining Macros A Lisp macro object is a list whose @sc{car} is @code{macro}, and -whose @sc{cdr} is a lambda expression. Expansion of the macro works -by applying the lambda expression (with @code{apply}) to the list of +whose @sc{cdr} is a function. Expansion of the macro works +by applying the function (with @code{apply}) to the list of @emph{unevaluated} arguments from the macro call. It is possible to use an anonymous Lisp macro just like an anonymous ------------------------------------------------------------ revno: 114170 committer: Michael Albinus branch nick: trunk timestamp: Sun 2013-09-08 17:04:10 +0200 message: Improve compatibility with older Emacsen, and XEmacs. * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize' only if it is bound. It isn't for XEmacs. (with-tramp-progress-reporter): Do not let-bind `result'. This yields to scoping errors in XEmacs. (tramp-handle-make-auto-save-file-name): New function, moved from tramp-sh.el. * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler for `make-auto-save-file-name'. (tramp-adb--gnu-switches-to-ash): Use `tramp-compat-replace-regexp-in-string'. * net/tramp-cache.el (tramp-cache-print): Call `substring-no-properties' only if it is bound. It isn't for XEmacs. * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is bound. It isn't for XEmacs. * net/tramp-compat.el (tramp-compat-copy-file): Catch `wrong-number-of-arguments' error. (tramp-compat-replace-regexp-in-string): New defun. * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler for `make-auto-save-file-name'. (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for `copy-file'. (tramp-gvfs-file-gvfs-monitor-file-process-filter) (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'. (tramp-synce-list-devices): Use `push' instead of `pushnew'. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `tramp-compat-replace-regexp-in-string'. * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Call `tramp-handle-make-auto-save-file-name'. (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el. (tramp-sh-file-gvfs-monitor-dir-process-filter) (tramp-sh-file-inotifywait-process-filter): Use `tramp-compat-replace-regexp-in-string'. (tramp-compute-multi-hops): Use `push' instead of `pushnew'. * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler for `make-auto-save-file-name'. (tramp-smb-handle-copy-directory): Call `tramp-compat-replace-regexp-in-string'. (tramp-smb-get-file-entries): Use `push' instead of `pushnew'. (tramp-smb-handle-copy-file): Improve error message. (tramp-smb-handle-rename-file): Rename directly only in case `newname' does not exist yet. This is a restriction of smbclient. (tramp-smb-maybe-open-connection): Rerun the function only when `auth-sources' is non-nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-08 12:17:12 +0000 +++ lisp/ChangeLog 2013-09-08 15:04:10 +0000 @@ -1,3 +1,59 @@ +2013-09-08 Michael Albinus + + Improve compatibility with older Emacsen, and XEmacs. + + * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize' + only if it is bound. It isn't for XEmacs. + (with-tramp-progress-reporter): Do not let-bind `result'. This + yields to scoping errors in XEmacs. + (tramp-handle-make-auto-save-file-name): New function, moved from + tramp-sh.el. + + * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler + for `make-auto-save-file-name'. + (tramp-adb--gnu-switches-to-ash): Use + `tramp-compat-replace-regexp-in-string'. + + * net/tramp-cache.el (tramp-cache-print): Call + `substring-no-properties' only if it is bound. It isn't for XEmacs. + + * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is + bound. It isn't for XEmacs. + + * net/tramp-compat.el (tramp-compat-copy-file): Catch + `wrong-number-of-arguments' error. + (tramp-compat-replace-regexp-in-string): New defun. + + * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler + for `make-auto-save-file-name'. + (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for + `copy-file'. + (tramp-gvfs-file-gvfs-monitor-file-process-filter) + (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'. + (tramp-synce-list-devices): Use `push' instead of `pushnew'. + + * net/tramp-gw.el (tramp-gw-open-network-stream): Use + `tramp-compat-replace-regexp-in-string'. + + * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Call + `tramp-handle-make-auto-save-file-name'. + (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el. + (tramp-sh-file-gvfs-monitor-dir-process-filter) + (tramp-sh-file-inotifywait-process-filter): Use + `tramp-compat-replace-regexp-in-string'. + (tramp-compute-multi-hops): Use `push' instead of `pushnew'. + + * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler + for `make-auto-save-file-name'. + (tramp-smb-handle-copy-directory): Call + `tramp-compat-replace-regexp-in-string'. + (tramp-smb-get-file-entries): Use `push' instead of `pushnew'. + (tramp-smb-handle-copy-file): Improve error message. + (tramp-smb-handle-rename-file): Rename directly only in case + `newname' does not exist yet. This is a restriction of smbclient. + (tramp-smb-maybe-open-connection): Rerun the function only when + `auth-sources' is non-nil. + 2013-09-08 Kenichi Handa * international/characters.el: Set category "^" (Combining) for === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-09-02 13:41:08 +0000 +++ lisp/net/tramp-adb.el 2013-09-08 15:04:10 +0000 @@ -137,7 +137,7 @@ (insert-directory . tramp-adb-handle-insert-directory) (insert-file-contents . tramp-handle-insert-file-contents) (load . tramp-handle-load) - ;; `make-auto-save-file-name' performed by default handler. + (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) (make-directory . tramp-adb-handle-make-directory) (make-directory-internal . ignore) (make-symbolic-link . ignore) @@ -407,9 +407,9 @@ (split-string (apply 'concat (mapcar (lambda (s) - (replace-regexp-in-string + (tramp-compat-replace-regexp-in-string "\\(.\\)" " -\\1" - (replace-regexp-in-string "^-" "" s))) + (tramp-compat-replace-regexp-in-string "^-" "" s))) ;; FIXME: Warning about removed switches (long and non-dash). (delq nil (mapcar === modified file 'lisp/net/tramp-cache.el' --- lisp/net/tramp-cache.el 2013-09-02 13:41:08 +0000 +++ lisp/net/tramp-cache.el 2013-09-08 15:04:10 +0000 @@ -289,7 +289,12 @@ (when (vectorp key) (dotimes (i (length key)) (when (stringp (aref key i)) - (aset key i (substring-no-properties (aref key i)))))) + (aset key i + (funcall + ;; `substring-no-properties' does not exist in XEmacs. + (if (functionp 'substring-no-properties) + 'substring-no-properties 'identity) + (aref key i)))))) (let ((tmp (format "(%s %s)" (if (processp key) === modified file 'lisp/net/tramp-cmds.el' --- lisp/net/tramp-cmds.el 2013-08-17 10:20:15 +0000 +++ lisp/net/tramp-cmds.el 2013-09-08 15:04:10 +0000 @@ -190,7 +190,9 @@ 'tramp-load-report-modules ; pre-hook 'tramp-append-tramp-buffers ; post-hook - (propertize "\n" 'display "\ + (funcall + (if (functionp 'propertize) 'propertize 'progn) + "\n" 'display "\ Enter your bug report in this message, including as much detail as you possibly can about the problem, what you did to cause it and what the local and remote machines are. === modified file 'lisp/net/tramp-compat.el' --- lisp/net/tramp-compat.el 2013-09-03 16:23:10 +0000 +++ lisp/net/tramp-compat.el 2013-09-08 15:04:10 +0000 @@ -313,13 +313,21 @@ "Like `copy-file' for Tramp files (compat function)." (cond (preserve-extended-attributes - (tramp-compat-funcall - 'copy-file filename newname ok-if-already-exists keep-date - preserve-uid-gid preserve-extended-attributes)) + (condition-case nil + (tramp-compat-funcall + 'copy-file filename newname ok-if-already-exists keep-date + preserve-uid-gid preserve-extended-attributes) + (wrong-number-of-arguments + (tramp-compat-copy-file + filename newname ok-if-already-exists keep-date preserve-uid-gid)))) (preserve-uid-gid - (tramp-compat-funcall - 'copy-file filename newname ok-if-already-exists keep-date - preserve-uid-gid)) + (condition-case nil + (tramp-compat-funcall + 'copy-file filename newname ok-if-already-exists keep-date + preserve-uid-gid) + (wrong-number-of-arguments + (tramp-compat-copy-file + filename newname ok-if-already-exists keep-date)))) (t (copy-file filename newname ok-if-already-exists keep-date)))) @@ -518,6 +526,58 @@ "`dos', `unix', or `mac'"))))) (t (error "Can't change EOL conversion -- is MULE missing?")))) +;; `replace-regexp-in-string' does not exist in XEmacs. +;; Implementation is taken from Emacs 24. +(if (fboundp 'replace-regexp-in-string) + (defalias 'tramp-compat-replace-regexp-in-string 'replace-regexp-in-string) + (defun tramp-compat-replace-regexp-in-string + (regexp rep string &optional fixedcase literal subexp start) + "Replace all matches for REGEXP with REP in STRING. + +Return a new string containing the replacements. + +Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the +arguments with the same names of function `replace-match'. If START +is non-nil, start replacements at that index in STRING. + +REP is either a string used as the NEWTEXT arg of `replace-match' or a +function. If it is a function, it is called with the actual text of each +match, and its value is used as the replacement text. When REP is called, +the match data are the result of matching REGEXP against a substring +of STRING. + +To replace only the first match (if any), make REGEXP match up to \\' +and replace a sub-expression, e.g. + (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1) + => \" bar foo\"" + + (let ((l (length string)) + (start (or start 0)) + matches str mb me) + (save-match-data + (while (and (< start l) (string-match regexp string start)) + (setq mb (match-beginning 0) + me (match-end 0)) + ;; If we matched the empty string, make sure we advance by one char + (when (= me mb) (setq me (min l (1+ mb)))) + ;; Generate a replacement for the matched substring. + ;; Operate only on the substring to minimize string consing. + ;; Set up match data for the substring for replacement; + ;; presumably this is likely to be faster than munging the + ;; match data directly in Lisp. + (string-match regexp (setq str (substring string mb me))) + (setq matches + (cons (replace-match (if (stringp rep) + rep + (funcall rep (match-string 0 str))) + fixedcase literal str subexp) + (cons (substring string start mb) ; unmatched prefix + matches))) + (setq start me)) + ;; Reconstruct a string from the pieces. + (setq matches (cons (substring string start l) matches)) ; leftover + (apply #'concat (nreverse matches)))))) + (add-hook 'tramp-unload-hook (lambda () (unload-feature 'tramp-compat 'force))) === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2013-09-06 08:24:00 +0000 +++ lisp/net/tramp-gvfs.el 2013-09-08 15:04:10 +0000 @@ -453,7 +453,7 @@ (insert-directory . tramp-gvfs-handle-insert-directory) (insert-file-contents . tramp-gvfs-handle-insert-file-contents) (load . tramp-handle-load) - ;; `make-auto-save-file-name' performed by default handler. + (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) (make-directory . tramp-gvfs-handle-make-directory) (make-directory-internal . ignore) (make-symbolic-link . ignore) @@ -594,15 +594,19 @@ (and (tramp-tramp-file-p newname) (not (tramp-gvfs-file-name-p newname)))) - ;; We cannot copy directly. + ;; We cannot call `copy-file' directly. Use + ;; `tramp-compat-funcall' for backward compatibility (number + ;; of arguments). (let ((tmpfile (tramp-compat-make-temp-file filename))) (cond (preserve-extended-attributes - (copy-file + (tramp-compat-funcall + 'copy-file filename tmpfile t keep-date preserve-uid-gid preserve-extended-attributes)) (preserve-uid-gid - (copy-file filename tmpfile t keep-date preserve-uid-gid)) + (tramp-compat-funcall + 'copy-file filename tmpfile t keep-date preserve-uid-gid)) (t (copy-file filename tmpfile t keep-date))) (rename-file tmpfile newname ok-if-already-exists)) @@ -950,7 +954,7 @@ (tramp-message proc 6 "%S\n%s" proc string) (setq string (concat rest-string string) ;; Attribute change is returned in unused wording. - string (replace-regexp-in-string + string (tramp-compat-replace-regexp-in-string "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) (while (string-match @@ -960,7 +964,7 @@ "Event = \\([^[:blank:]]+\\)[\n\r]+") string) (let ((action (intern-soft - (replace-regexp-in-string + (tramp-compat-replace-regexp-in-string "_" "-" (downcase (match-string 2 string))))) (file (match-string 1 string))) (setq string (replace-match "" nil nil string)) @@ -1158,7 +1162,8 @@ (defun tramp-gvfs-file-name (object-path) "Retrieve file name from D-Bus OBJECT-PATH." (dbus-unescape-from-identifier - (replace-regexp-in-string "^.*/\\([^/]+\\)$" "\\1" object-path))) + (tramp-compat-replace-regexp-in-string + "^.*/\\([^/]+\\)$" "\\1" object-path))) (defun tramp-bluez-address (device) "Return bluetooth device address from a given bluetooth DEVICE name." @@ -1709,11 +1714,13 @@ (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t :system tramp-hal-service device tramp-hal-interface-device "PropertyExists" "sync.plugin") - (pushnew - (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t - :system tramp-hal-service device tramp-hal-interface-device - "GetPropertyString" "pda.pocketpc.name") - tramp-synce-devices :test #'equal))) + (let ((prop + (with-tramp-dbus-call-method + tramp-gvfs-dbus-event-vector t + :system tramp-hal-service device tramp-hal-interface-device + "GetPropertyString" "pda.pocketpc.name"))) + (unless (member prop tramp-synce-devices) + (push prop tramp-synce-devices))))) (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) tramp-synce-devices)) === modified file 'lisp/net/tramp-gw.el' --- lisp/net/tramp-gw.el 2013-08-17 10:20:15 +0000 +++ lisp/net/tramp-gw.el 2013-09-08 15:04:10 +0000 @@ -238,7 +238,7 @@ tramp-gw-vector 6 "\n%s" (format "%s%s\r\n" command - (replace-regexp-in-string ;; no password in trace! + (tramp-compat-replace-regexp-in-string ;; no password in trace! "Basic [^\r\n]+" "Basic xxxxx" authentication t))) (with-current-buffer buffer ;; Trap errors to be traced in the right trace buffer. Often, === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-09-03 20:14:58 +0000 +++ lisp/net/tramp-sh.el 2013-09-08 15:04:10 +0000 @@ -850,7 +850,7 @@ (insert-file-contents-literally . tramp-sh-handle-insert-file-contents-literally) (load . tramp-handle-load) - (make-auto-save-file-name . tramp-sh-handle-make-auto-save-file-name) + (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) (make-directory . tramp-sh-handle-make-directory) (make-symbolic-link . tramp-sh-handle-make-symbolic-link) (process-file . tramp-sh-handle-process-file) @@ -2978,48 +2978,6 @@ (fset 'find-buffer-file-type find-buffer-file-type-function) (fmakunbound 'find-buffer-file-type))))) -(defun tramp-sh-handle-make-auto-save-file-name () - "Like `make-auto-save-file-name' for Tramp files. -Returns a file name in `tramp-auto-save-directory' for autosaving this file." - (let ((tramp-auto-save-directory tramp-auto-save-directory) - (buffer-file-name - (tramp-subst-strs-in-string - '(("_" . "|") - ("/" . "_a") - (":" . "_b") - ("|" . "__") - ("[" . "_l") - ("]" . "_r")) - (buffer-file-name)))) - ;; File name must be unique. This is ensured with Emacs 22 (see - ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for - ;; all other cases we must do it ourselves. - (when (boundp 'auto-save-file-name-transforms) - (mapc - (lambda (x) - (when (and (string-match (car x) buffer-file-name) - (not (car (cddr x)))) - (setq tramp-auto-save-directory - (or tramp-auto-save-directory - (tramp-compat-temporary-file-directory))))) - (symbol-value 'auto-save-file-name-transforms))) - ;; Create directory. - (when tramp-auto-save-directory - (setq buffer-file-name - (expand-file-name buffer-file-name tramp-auto-save-directory)) - (unless (file-exists-p tramp-auto-save-directory) - (make-directory tramp-auto-save-directory t))) - ;; Run plain `make-auto-save-file-name'. There might be an advice when - ;; it is not a magic file name operation (since Emacs 22). - ;; We must deactivate it temporarily. - (if (not (ad-is-active 'make-auto-save-file-name)) - (tramp-run-real-handler 'make-auto-save-file-name nil) - ;; else - (ad-deactivate 'make-auto-save-file-name) - (prog1 - (tramp-run-real-handler 'make-auto-save-file-name nil) - (ad-activate 'make-auto-save-file-name))))) - ;; CCC grok LOCKNAME (defun tramp-sh-handle-write-region (start end filename &optional append visit lockname confirm) @@ -3425,7 +3383,7 @@ (tramp-message proc 6 "%S\n%s" proc string) (setq string (concat rest-string string) ;; Attribute change is returned in unused wording. - string (replace-regexp-in-string + string (tramp-compat-replace-regexp-in-string "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) (while (string-match @@ -3439,7 +3397,7 @@ (list proc (intern-soft - (replace-regexp-in-string + (tramp-compat-replace-regexp-in-string "_" "-" (downcase (match-string 4 string)))) ;; File names are returned as absolute paths. We must ;; add the remote prefix. @@ -3475,7 +3433,8 @@ proc (mapcar (lambda (x) - (intern-soft (replace-regexp-in-string "_" "-" (downcase x)))) + (intern-soft + (tramp-compat-replace-regexp-in-string "_" "-" (downcase x)))) (split-string (match-string 1 line) "," 'omit-nulls)) (match-string 3 line)))) ;; Usually, we would add an Emacs event now. Unfortunately, @@ -4252,7 +4211,7 @@ ?h (or (tramp-file-name-host (car target-alist)) "")))) (with-parsed-tramp-file-name proxy l ;; Add the hop. - (pushnew l target-alist :test #'equal) + (push l target-alist) ;; Start next search. (setq choices tramp-default-proxies-alist))))) @@ -4270,11 +4229,11 @@ vec 'file-error "Connection `%s' is not supported for gateway access." hop)) ;; Open the gateway connection. - (pushnew + (push (vector (tramp-file-name-method hop) (tramp-file-name-user hop) (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil) - target-alist :test #'equal) + target-alist) ;; For the password prompt, we need the correct values. ;; Therefore, we must remember the gateway vector. But we ;; cannot do it as connection property, because it shouldn't === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-09-03 20:14:58 +0000 +++ lisp/net/tramp-smb.el 2013-09-08 15:04:10 +0000 @@ -229,7 +229,7 @@ (insert-directory . tramp-smb-handle-insert-directory) (insert-file-contents . tramp-handle-insert-file-contents) (load . tramp-handle-load) - ;; `make-auto-save-file-name' performed by default handler. + (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) (make-directory . tramp-smb-handle-make-directory) (make-directory-internal . tramp-smb-handle-make-directory-internal) (make-symbolic-link . tramp-smb-handle-make-symbolic-link) @@ -403,7 +403,7 @@ (port (tramp-file-name-port v)) (share (tramp-smb-get-share v)) (localname (file-name-as-directory - (replace-regexp-in-string + (tramp-compat-replace-regexp-in-string "\\\\" "/" (tramp-smb-get-localname v)))) (tmpdir (make-temp-name (expand-file-name @@ -537,7 +537,8 @@ (unless (tramp-smb-send-command v (format "put \"%s\" \"%s\"" filename (tramp-smb-get-localname v))) - (tramp-error v 'file-error "Cannot copy `%s'" filename)))))) + (tramp-error + v 'file-error "Cannot copy `%s' to `%s'" filename newname)))))) ;; KEEP-DATE handling. (when keep-date @@ -1151,7 +1152,8 @@ (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) 0 (format "Renaming %s to %s" filename newname) - (if (and (tramp-equal-remote filename newname) + (if (and (not (file-exists-p newname)) + (tramp-equal-remote filename newname) (string-equal (tramp-smb-get-share (tramp-dissect-file-name filename)) (tramp-smb-get-share (tramp-dissect-file-name newname)))) @@ -1364,14 +1366,14 @@ (while (not (eobp)) (setq entry (tramp-smb-read-file-entry share)) (forward-line) - (when entry (pushnew entry res :test #'equal)))) + (when entry (push entry res)))) ;; Cache share entries. (unless share (tramp-set-connection-property v "share-cache" res))) ;; Add directory itself. - (pushnew '("" "drwxrwxrwx" 0 (0 0)) res :test #'equal) + (push '("" "drwxrwxrwx" 0 (0 0)) res) ;; There's a very strange error (debugged with XEmacs 21.4.14) ;; If there's no short delay, it returns nil. No idea about. @@ -1719,8 +1721,10 @@ (error (with-current-buffer (tramp-get-connection-buffer vec) (goto-char (point-min)) - (if (search-forward-regexp - tramp-smb-wrong-passwd-regexp nil t) + (if (and (boundp 'auth-sources) + (symbol-value 'auth-sources) + (search-forward-regexp + tramp-smb-wrong-passwd-regexp nil t)) ;; Disable `auth-source' and `password-cache'. (let (auth-sources) (tramp-cleanup vec) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-09-06 08:23:30 +0000 +++ lisp/net/tramp.el 2013-09-08 15:04:10 +0000 @@ -1222,10 +1222,11 @@ ;; This works with the current set of `tramp-obsolete-methods'. ;; Must be improved, if their are more sophisticated replacements. (setq result (substring result 0 -1))) - ;; We must mark, whether a default value has been used. - (if (or method (null result)) + ;; We must mark, whether a default value has been used. Not + ;; applicable for XEmacs. + (if (or method (null result) (null (functionp 'propertize))) result - (propertize result 'tramp-default t)))) + (tramp-compat-funcall 'propertize result 'tramp-default t)))) (defun tramp-find-user (method user host) "Return the right user string to use. @@ -1243,10 +1244,11 @@ (setq choices nil))) luser) tramp-default-user))) - ;; We must mark, whether a default value has been used. - (if (or user (null result)) + ;; We must mark, whether a default value has been used. Not + ;; applicable for XEmacs. + (if (or user (null result) (null (functionp 'propertize))) result - (propertize result 'tramp-default t)))) + (tramp-compat-funcall 'propertize result 'tramp-default t)))) (defun tramp-find-host (method user host) "Return the right host string to use. @@ -1641,7 +1643,7 @@ (declare (indent 3) (debug t)) `(progn (tramp-message ,vec ,level "%s..." ,message) - (let ((result "failed") + (let ((cookie "failed") (tm ;; We start a pulsing progress reporter after 3 seconds. Feature ;; introduced in Emacs 24.1. @@ -1656,10 +1658,10 @@ #'tramp-progress-reporter-update pr))))))) (unwind-protect ;; Execute the body. - (prog1 (progn ,@body) (setq result "done")) + (prog1 (progn ,@body) (setq cookie "done")) ;; Stop progress reporter. (if tm (tramp-compat-funcall 'cancel-timer tm)) - (tramp-message ,vec ,level "%s...%s" ,message result))))) + (tramp-message ,vec ,level "%s...%s" ,message cookie))))) (tramp-compat-font-lock-add-keywords 'emacs-lisp-mode '("\\")) @@ -3920,6 +3922,48 @@ ;;; Auto saving to a special directory: +(defun tramp-handle-make-auto-save-file-name () + "Like `make-auto-save-file-name' for Tramp files. +Returns a file name in `tramp-auto-save-directory' for autosaving this file." + (let ((tramp-auto-save-directory tramp-auto-save-directory) + (buffer-file-name + (tramp-subst-strs-in-string + '(("_" . "|") + ("/" . "_a") + (":" . "_b") + ("|" . "__") + ("[" . "_l") + ("]" . "_r")) + (buffer-file-name)))) + ;; File name must be unique. This is ensured with Emacs 22 (see + ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for + ;; all other cases we must do it ourselves. + (when (boundp 'auto-save-file-name-transforms) + (mapc + (lambda (x) + (when (and (string-match (car x) buffer-file-name) + (not (car (cddr x)))) + (setq tramp-auto-save-directory + (or tramp-auto-save-directory + (tramp-compat-temporary-file-directory))))) + (symbol-value 'auto-save-file-name-transforms))) + ;; Create directory. + (when tramp-auto-save-directory + (setq buffer-file-name + (expand-file-name buffer-file-name tramp-auto-save-directory)) + (unless (file-exists-p tramp-auto-save-directory) + (make-directory tramp-auto-save-directory t))) + ;; Run plain `make-auto-save-file-name'. There might be an advice when + ;; it is not a magic file name operation (since Emacs 22). + ;; We must deactivate it temporarily. + (if (not (ad-is-active 'make-auto-save-file-name)) + (tramp-run-real-handler 'make-auto-save-file-name nil) + ;; else + (ad-deactivate 'make-auto-save-file-name) + (prog1 + (tramp-run-real-handler 'make-auto-save-file-name nil) + (ad-activate 'make-auto-save-file-name))))) + (unless (tramp-exists-file-name-handler 'make-auto-save-file-name) (defadvice make-auto-save-file-name (around tramp-advice-make-auto-save-file-name () activate) ------------------------------------------------------------ revno: 114169 [merge] committer: K. Handa branch nick: trunk timestamp: Sun 2013-09-08 21:19:37 +0900 message: international/characters.el: Set category "^" (Combining) for more characters. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-07 14:33:50 +0000 +++ lisp/ChangeLog 2013-09-08 12:17:12 +0000 @@ -1,3 +1,8 @@ +2013-09-08 Kenichi Handa + + * international/characters.el: Set category "^" (Combining) for + more characters. + 2013-09-07 Alan Mackenzie Correctly fontify Java class constructors. === modified file 'lisp/international/characters.el' --- lisp/international/characters.el 2013-08-08 23:59:14 +0000 +++ lisp/international/characters.el 2013-09-08 12:10:34 +0000 @@ -792,7 +792,7 @@ ;; Combining diacritics (modify-category-entry '(#x300 . #x362) ?^) ;; Combining marks - (modify-category-entry '(#x20d0 . #x20e3) ?^) + (modify-category-entry '(#x20d0 . #x20ff) ?^) ;; Fixme: syntax for symbols &c ) ------------------------------------------------------------ revno: 114168 committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2013-09-07 14:33:50 +0000 message: Correctly fontify Java class constructors. * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")" in Java Mode. (c-recognize-typeless-decls): Set the Java value to t. * progmodes/cc-engine.el (c-forward-decl-or-cast-1): While handling a "(", add a check for, effectively, Java, and handle a "typeless" declaration there. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-07 10:29:57 +0000 +++ lisp/ChangeLog 2013-09-07 14:33:50 +0000 @@ -1,3 +1,13 @@ +2013-09-07 Alan Mackenzie + + Correctly fontify Java class constructors. + * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")" + in Java Mode. + (c-recognize-typeless-decls): Set the Java value to t. + * progmodes/cc-engine.el (c-forward-decl-or-cast-1): While + handling a "(", add a check for, effectively, Java, and handle a + "typeless" declaration there. + 2013-09-07 Roland Winkler * textmodes/bibtex.el (bibtex-biblatex-entry-alist): Add optional === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2013-08-29 17:26:48 +0000 +++ lisp/progmodes/cc-engine.el 2013-09-07 14:33:50 +0000 @@ -6905,32 +6905,38 @@ ;; Skip over type decl prefix operators. (Note similar code in ;; `c-font-lock-declarators'.) - (while (and (looking-at c-type-decl-prefix-key) - (if (and (c-major-mode-is 'c++-mode) - (match-beginning 3)) - ;; If the third submatch matches in C++ then - ;; we're looking at an identifier that's a - ;; prefix only if it specifies a member pointer. - (when (setq got-identifier (c-forward-name)) - (if (looking-at "\\(::\\)") - ;; We only check for a trailing "::" and - ;; let the "*" that should follow be - ;; matched in the next round. - (progn (setq got-identifier nil) t) - ;; It turned out to be the real identifier, - ;; so stop. - nil)) - t)) - - (if (eq (char-after) ?\() + (if (and c-recognize-typeless-decls + (equal c-type-decl-prefix-key "\\<\\>")) + (when (eq (char-after) ?\() (progn (setq paren-depth (1+ paren-depth)) - (forward-char)) - (unless got-prefix-before-parens - (setq got-prefix-before-parens (= paren-depth 0))) - (setq got-prefix t) - (goto-char (match-end 1))) - (c-forward-syntactic-ws)) + (forward-char))) + (while (and (looking-at c-type-decl-prefix-key) + (if (and (c-major-mode-is 'c++-mode) + (match-beginning 3)) + ;; If the third submatch matches in C++ then + ;; we're looking at an identifier that's a + ;; prefix only if it specifies a member pointer. + (when (setq got-identifier (c-forward-name)) + (if (looking-at "\\(::\\)") + ;; We only check for a trailing "::" and + ;; let the "*" that should follow be + ;; matched in the next round. + (progn (setq got-identifier nil) t) + ;; It turned out to be the real identifier, + ;; so stop. + nil)) + t)) + + (if (eq (char-after) ?\() + (progn + (setq paren-depth (1+ paren-depth)) + (forward-char)) + (unless got-prefix-before-parens + (setq got-prefix-before-parens (= paren-depth 0))) + (setq got-prefix t) + (goto-char (match-end 1))) + (c-forward-syntactic-ws))) (setq got-parens (> paren-depth 0)) === modified file 'lisp/progmodes/cc-langs.el' --- lisp/progmodes/cc-langs.el 2013-08-25 13:52:14 +0000 +++ lisp/progmodes/cc-langs.el 2013-09-07 14:33:50 +0000 @@ -2816,7 +2816,8 @@ "\\>") "") "\\)") - (java idl) "\\([\[\(]\\)") + java "\\([\[\(\)]\\)" + idl "\\([\[\(]\\)") (c-lang-defvar c-type-decl-suffix-key (c-lang-const c-type-decl-suffix-key) 'dont-doc) @@ -2937,7 +2938,7 @@ that are preceded by a declaration starting keyword, so e.g. `c-typeless-decl-kwds' may still be used when it's set to nil." t nil - (c c++ objc) t) + (c c++ objc java) t) (c-lang-defvar c-recognize-typeless-decls (c-lang-const c-recognize-typeless-decls)) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.