commit 2bb02a3782e4cc61575f5bc9860f18be63a65a81 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Wed Nov 9 20:45:38 2016 +0200 Resurrect 'memory-limit' on MS-Windows * nt/mingw-cfg.site (ac_cv_func_sbrk): Set to "yes", otherwise 'memory-limit' will produce a trivial and useless result on Windows. diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site index f3c8f81..3e0cd40 100644 --- a/nt/mingw-cfg.site +++ b/nt/mingw-cfg.site @@ -129,5 +129,7 @@ gl_cv_func_stat_file_slash=yes ac_cv_func_random=yes # Implemented in w32.c as sys_putenv gl_cv_func_svid_putenv=yes +# Implemented in w32heap.c +ac_cv_func_sbrk=yes # GCC warnings that produce too much noise gl_cv_warn_c__Wredundant_decls=no commit 86cbd942bc9c41d60aaefe15b6eab5b4dce390e9 Author: Mark Oteiza Date: Wed Nov 9 12:54:36 2016 -0500 Update quickurl.el * lisp/net/quickurl.el (quickurl-format-function): (quickurl-sort-function): Use named function. (quickurl-list-mode-map): Remove lines that are extraneous now that the parent mode is special-mode. (quickurl-format-url, quickurl-sort-urls): New functions. (quickurl-read, quickurl): Use defun, as no cl-defun feature appears to be used. (quickurl-list-mode): Derive from special-mode. Nix setting buffer-read-only: special-mode does that. (quickurl-list-populate-buffer): Use dolist instead. (quickurl-list-quit): Use quit-window. It looks like this was written before the quit-window rewrite. quit-window is very useful now. diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index bb9ce31..773589a 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -101,17 +101,12 @@ :type 'file :group 'quickurl) -(defcustom quickurl-format-function (lambda (url) (format "" (quickurl-url-url url))) +(defcustom quickurl-format-function #'quickurl-format-url "Function to format the URL before insertion into the current buffer." :type 'function :group 'quickurl) -(defcustom quickurl-sort-function (lambda (list) - (sort list - (lambda (x y) - (string< - (downcase (quickurl-url-description x)) - (downcase (quickurl-url-description y)))))) +(defcustom quickurl-sort-function #'quickurl-sort-urls "Function to sort the URL list." :type 'function :group 'quickurl) @@ -175,7 +170,6 @@ in your init file (after loading/requiring quickurl).") (defvar quickurl-list-mode-map (let ((map (make-sparse-keymap))) - (suppress-keymap map t) (define-key map "a" #'quickurl-list-add-url) (define-key map [(control m)] #'quickurl-list-insert-url) (define-key map "u" #'quickurl-list-insert-naked-url) @@ -185,7 +179,6 @@ in your init file (after loading/requiring quickurl).") (define-key map [(control g)] #'quickurl-list-quit) (define-key map "q" #'quickurl-list-quit) (define-key map [mouse-2] #'quickurl-list-mouse-select) - (define-key map "?" #'describe-mode) map) "Local keymap for a `quickurl-list-mode' buffer.") @@ -253,7 +246,18 @@ returned." ;; Main code: -(cl-defun quickurl-read (&optional buffer) +(defun quickurl-format-url (url) + (format "" (quickurl-url-url url))) + +(defun quickurl-sort-urls (list) + "Sort URLs in LIST according to their `quickurl-url-description'." + (sort list + (lambda (x y) + (string< + (downcase (quickurl-url-description x)) + (downcase (quickurl-url-description y)))))) + +(defun quickurl-read (&optional buffer) "`read' the URL list from BUFFER into `quickurl-urls'. BUFFER, if nil, defaults to current buffer. @@ -298,7 +302,7 @@ Also display a `message' saying what the URL was unless SILENT is non-nil." (message "Found %s" (quickurl-url-url url)))) ;;;###autoload -(cl-defun quickurl (&optional lookup) +(defun quickurl (&optional lookup) "Insert a URL based on LOOKUP. If not supplied LOOKUP is taken to be the word at point in the current @@ -427,17 +431,14 @@ current buffer, this default action can be modified via ;; quickurl-list mode. -(put 'quickurl-list-mode 'mode-class 'special) - ;;;###autoload -(define-derived-mode quickurl-list-mode fundamental-mode "quickurl list" +(define-derived-mode quickurl-list-mode special-mode "Quickurl" "A mode for browsing the quickurl URL list. The key bindings for `quickurl-list-mode' are: \\{quickurl-list-mode-map}" - (setq buffer-read-only t - truncate-lines t)) + (setq truncate-lines t)) ;;;###autoload (defun quickurl-list () @@ -459,14 +460,13 @@ The key bindings for `quickurl-list-mode' are: (fmt (format "%%-%ds %%s\n" (apply #'max sizes))) (inhibit-read-only t)) (erase-buffer) - (cl-loop for url in quickurl-urls - do (let ((start (point))) - (insert (format fmt (quickurl-url-description url) - (quickurl-url-url url))) - (add-text-properties - start (1- (point)) - '(mouse-face highlight - help-echo "mouse-2: insert this URL")))) + (dolist (url quickurl-urls) + (let ((start (point))) + (insert (format fmt (quickurl-url-description url) + (quickurl-url-url url))) + (add-text-properties + start (1- (point)) + '(mouse-face highlight help-echo "mouse-2: insert this URL")))) (goto-char (point-min))))) (defun quickurl-list-add-url (word url comment) @@ -477,9 +477,7 @@ The key bindings for `quickurl-list-mode' are: (defun quickurl-list-quit () "Kill the buffer named `quickurl-list-buffer-name'." (interactive) - (kill-buffer quickurl-list-buffer-name) - (switch-to-buffer quickurl-list-last-buffer) - (delete-other-windows)) + (quit-window t)) (defun quickurl-list-mouse-select (event) "Select the URL under the mouse click." commit dba9bc9752f62c782853c7a652e84e33f0649c3b Author: Michael Albinus Date: Wed Nov 9 15:34:40 2016 +0100 Refine multi-hop specs in Tramp * lisp/net/tramp.el (tramp-tramp-file-p): Suppress "/:" and "/c:". * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax): Multi-hop specs don't need a method. "/h:" is allowed on non MS Windows. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 8a81311..00ecb37 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1146,6 +1146,11 @@ entry does not exist, return nil." "Return t if NAME is a string with Tramp file name syntax." (save-match-data (and (stringp name) + ;; No "/:" and "/c:". This is not covered by `tramp-file-name-regexp'. + (not (string-match + (if (memq system-type '(cygwin windows-nt)) + "^/[[:alpha:]]?:" "^/:") + name)) (string-match tramp-file-name-regexp name)))) (defun tramp-find-method (method user host) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 5d9d3a0..4c3b83c 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -185,6 +185,8 @@ handled properly. BODY shall not contain a timeout." (should (tramp-tramp-file-p "/method1:user1@host1|method2:user2@host2:")) (should (tramp-tramp-file-p "/method1:user1@host1|method2:user2@host2|method3:user3@host3:")) + (should (tramp-tramp-file-p "/host1|host2:")) + (should (tramp-tramp-file-p "/user1@host1|user2@host2:")) ;; No strings. (should-not (tramp-tramp-file-p nil)) @@ -193,12 +195,13 @@ handled properly. BODY shall not contain a timeout." (should-not (tramp-tramp-file-p "/::")) (should-not (tramp-tramp-file-p "/:@:")) (should-not (tramp-tramp-file-p "/:[]:")) - ;; Multihops require a method. - (should-not (tramp-tramp-file-p "/host1|host2:")) ;; Methods or hostnames shall be at least two characters on MS Windows. - (when (memq system-type '(cygwin windows-nt)) - (should-not (tramp-tramp-file-p "/c:/path/to/file")) - (should-not (tramp-tramp-file-p "/c::/path/to/file")))) + (let ((system-type 'windows-nt)) + (should-not (tramp-tramp-file-p "/c:/path/to/file")) + (should-not (tramp-tramp-file-p "/c::/path/to/file"))) + (let ((system-type 'gnu/linux)) + (should (tramp-tramp-file-p "/h:/path/to/file")) + (should (tramp-tramp-file-p "/m::/path/to/file")))) (ert-deftest tramp-test02-file-name-dissect () "Check remote file name components."