commit 8b57f12ab798fd231bf05fd800ccf5e6c544e560 (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Sat Jul 18 04:01:01 2015 +0300 Consider a jsdoc tag to be a beginning of a paragraph as well * lisp/progmodes/js.el (js-mode): Change c-paragraph-start to consider a jsdoc tag to be a beginning of a paragraph as well. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f06c5c7..c49f25b 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3528,7 +3528,7 @@ If one hasn't been set, or if it's stale, prompt for a new one." ;; for filling, pretend we're cc-mode (setq c-comment-prefix-regexp "//+\\|\\**" - c-paragraph-start "$" + c-paragraph-start "\\(@[[:alpha:]]+\\>\\|$\\)" c-paragraph-separate "$" c-block-comment-prefix "* " c-line-comment-starter "//" commit 6413c10131972726a26c979a08a2869fa6b915b6 Author: Artur Malabarba Date: Fri Jul 17 23:51:32 2015 +0100 * lisp/emacs-lisp/package.el: Fix warnings diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 84d6089..aeb8c65 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -960,6 +960,8 @@ is wrapped around any parts requiring it." (declare-function lm-header "lisp-mnt" (header)) (declare-function lm-homepage "lisp-mnt" (&optional file)) +(declare-function lm-maintainer "lisp-mnt" (&optional file)) +(declare-function lm-authors "lisp-mnt" (&optional file)) (defun package-buffer-info () "Return a `package-desc' describing the package in the current buffer. commit 86814e7a80568a7b384e4a24d3ad565c5376ddc5 Author: Artur Malabarba Date: Fri Jul 17 19:24:15 2015 +0100 * lisp/emacs-lisp/package.el (package-buffer-info): Add author and maintainers to `package-buffer-info'. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c7e3096..84d6089 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -996,7 +996,9 @@ boundaries." (package--prepare-dependencies (package-read-from-string requires-str))) :kind 'single - :url homepage)))) + :url homepage + :maintainer (lm-maintainer) + :authors (lm-authors))))) (defun package--read-pkg-desc (kind) "Read a `define-package' form in current buffer. diff --git a/test/automated/package-test.el b/test/automated/package-test.el index 524613d..763553e 100644 --- a/test/automated/package-test.el +++ b/test/automated/package-test.el @@ -50,7 +50,9 @@ :version '(1 3) :summary "A single-file package with no dependencies" :kind 'single - :extras '((:url . "http://doodles.au"))) + :extras '((:authors ("J. R. Hacker" . "jrh@example.com")) + (:maintainer "J. R. Hacker" . "jrh@example.com") + (:url . "http://doodles.au"))) "Expected `package-desc' parsed from simple-single-1.3.el.") (defvar simple-depend-desc @@ -58,7 +60,9 @@ :version '(1 0) :summary "A single-file package with a dependency." :kind 'single - :reqs '((simple-single (1 3)))) + :reqs '((simple-single (1 3))) + :extras '((:authors ("J. R. Hacker" . "jrh@example.com")) + (:maintainer "J. R. Hacker" . "jrh@example.com"))) "Expected `package-desc' parsed from simple-depend-1.0.el.") (defvar multi-file-desc @@ -216,6 +220,8 @@ Must called from within a `tar-mode' buffer." "(define-package \"simple-single\" \"1.3\" " "\"A single-file package " "with no dependencies\" 'nil " + ":authors '((\"J. R. Hacker\" . \"jrh@example.com\")) " + ":maintainer '(\"J. R. Hacker\" . \"jrh@example.com\") " ":url \"http://doodles.au\"" ")\n")))) (should (file-exists-p autoloads-file)) @@ -480,7 +486,9 @@ Must called from within a `tar-mode' buffer." (package-make-ac-desc '(1 3) nil "A single-file package with no dependencies" 'single - '((:url . "http://doodles.au")))) + '((:authors ("J. R. Hacker" . "jrh@example.com")) + (:maintainer "J. R. Hacker" . "jrh@example.com") + (:url . "http://doodles.au")))) "Expected contents of the archive entry from the \"simple-single\" package.") (defvar package-x-test--single-archive-entry-1-4 @@ -488,7 +496,8 @@ Must called from within a `tar-mode' buffer." (package-make-ac-desc '(1 4) nil "A single-file package with no dependencies" 'single - nil)) + '((:authors ("J. R. Hacker" . "jrh@example.com")) + (:maintainer "J. R. Hacker" . "jrh@example.com")))) "Expected contents of the archive entry from the updated \"simple-single\" package.") (ert-deftest package-x-test-upload-buffer () commit ca66737c5313665a1646a64de8fa6181c9e11de5 Author: Artur Malabarba Date: Fri Jul 17 19:25:39 2015 +0100 * lisp/emacs-lisp/package.el: Many small changes Replace all instances of 'face with 'font-lock-face. (describe-package-1): Improve some strings and move the summary up the list. (package-install-file): Update docstring. (package-menu-hide-package): Bind to `H'. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index fc5ef0b..c7e3096 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1956,7 +1956,8 @@ Downloads and installs required packages as needed." ;;;###autoload (defun package-install-file (file) "Install a package from a file. -The file can either be a tar file or an Emacs Lisp file." +The file can either be a tar file, an Emacs Lisp file, or a +directory." (interactive "fPackage file name: ") (with-temp-buffer (if (file-directory-p file) @@ -2163,6 +2164,8 @@ will be deleted." (status (if desc (package-desc-status desc) "orphan")) (incompatible-reason (package--incompatible-p desc)) (signed (if desc (package-desc-signed desc)))) + (when (string= status "avail-obso") + (setq status "available obsolete")) (when incompatible-reason (setq status "incompatible")) (prin1 name) @@ -2179,13 +2182,15 @@ will be deleted." (pkg-dir (insert (propertize (if (member status '("unsigned" "dependency")) "Installed" - (capitalize status)) ;FIXME: Why comment-face? - 'font-lock-face 'font-lock-comment-face)) + (capitalize status)) + 'font-lock-face 'font-lock-builtin-face)) (insert (substitute-command-keys " in ‘")) - ;; Todo: Add button for uninstalling. - (help-insert-xref-button (abbreviate-file-name - (file-name-as-directory pkg-dir)) - 'help-package-def pkg-dir) + (let ((dir (abbreviate-file-name + (file-name-as-directory + (if (file-in-directory-p pkg-dir package-user-dir) + (file-relative-name pkg-dir package-user-dir) + pkg-dir))))) + (help-insert-xref-button dir 'help-package-def pkg-dir)) (if (and (package-built-in-p name) (not (package-built-in-p name version))) (insert (substitute-command-keys @@ -2198,13 +2203,13 @@ will be deleted." (insert " (unsigned).")) (when (and (package-desc-p desc) (not required-by) - (package-installed-p desc)) + (member status '("unsigned" "installed"))) (insert " ") (package-make-button "Delete" 'action #'package-delete-button-action 'package-desc desc))) (incompatible-reason - (insert (propertize "Incompatible" 'face font-lock-warning-face) + (insert (propertize "Incompatible" 'font-lock-face font-lock-warning-face) " because it depends on ") (if (stringp incompatible-reason) (insert "Emacs " incompatible-reason ".") @@ -2219,12 +2224,15 @@ will be deleted." 'package-desc desc)) (t (insert (capitalize status) "."))) (insert "\n") - (insert " " (propertize "Archive" 'font-lock-face 'bold) - ": " (or archive "n/a") "\n") + (unless (and pkg-dir (not archive)) ; Installed pkgs don't have archive. + (insert " " (propertize "Archive" 'font-lock-face 'bold) + ": " (or archive "n/a") "\n")) (and version (insert " " (propertize "Version" 'font-lock-face 'bold) ": " (package-version-join version) "\n")) + (insert " " (propertize "Summary" 'font-lock-face 'bold) + ": " (if desc (package-desc-summary desc)) "\n") (setq reqs (if desc (package-desc-reqs desc))) (when reqs @@ -2259,8 +2267,6 @@ will be deleted." (help-insert-xref-button text 'help-package (package-desc-name pkg)))) (insert "\n"))) - (insert " " (propertize "Summary" 'font-lock-face 'bold) - ": " (if desc (package-desc-summary desc)) "\n") (when homepage (insert " " (propertize "Homepage" 'font-lock-face 'bold) ": ") (help-insert-xref-button homepage 'help-url homepage) @@ -2290,7 +2296,7 @@ will be deleted." (if (not ov) (format "%s" from) (format "%s (%s)" (make-text-button (package-version-join ov) nil - 'face 'link + 'font-lock-face 'link 'follow-link t 'action (lambda (_button) @@ -2365,7 +2371,7 @@ will be deleted." :background "light grey" :foreground "black") 'link))) - (apply 'insert-text-button button-text 'face button-face 'follow-link t + (apply 'insert-text-button button-text 'font-lock-face button-face 'follow-link t props))) @@ -2386,6 +2392,7 @@ will be deleted." (define-key map "~" 'package-menu-mark-obsolete-for-deletion) (define-key map "x" 'package-menu-execute) (define-key map "h" 'package-menu-quick-help) + (define-key map "H" #'package-menu-hide-package) (define-key map "?" 'package-menu-describe-package) (define-key map "(" #'package-menu-toggle-hiding) (define-key map [menu-bar package-menu] (cons "Package" menu-map)) @@ -2870,7 +2877,8 @@ If optional arg BUTTON is non-nil, describe its associated package." (defvar package--quick-help-keys '(("install," "delete," "unmark," ("execute" . 1)) ("next," "previous") - ("refresh-contents," "g-redisplay," "filter," "(-toggle-obsolete" "help"))) + ("Hide-package," "(-toggle-hidden") + ("refresh-contents," "g-redisplay," "filter," "help"))) (defun package--prettify-quick-help-key (desc) "Prettify DESC to be displayed as a help menu." @@ -2879,9 +2887,8 @@ If optional arg BUTTON is non-nil, describe its associated package." (mapconcat #'package--prettify-quick-help-key desc " ") (let ((place (cdr desc)) (out (car desc))) - ;; (setq out (propertize out 'face 'paradox-comment-face)) (add-text-properties place (1+ place) - '(face (bold font-lock-function-name-face)) + '(face (bold font-lock-warning-face)) out) out)) (package--prettify-quick-help-key (cons desc 0)))) diff --git a/test/automated/package-test.el b/test/automated/package-test.el index 5ab2747..524613d 100644 --- a/test/automated/package-test.el +++ b/test/automated/package-test.el @@ -381,8 +381,9 @@ Must called from within a `tar-mode' buffer." (describe-package '5x5) (goto-char (point-min)) (should (search-forward "5x5 is a built-in package." nil t)) - (should (search-forward "Status: Built-in." nil t)) - (should (search-forward "Summary: simple little puzzle game" nil t)) + ;; Don't assume the descriptions are in any particular order. + (save-excursion (should (search-forward "Status: Built-in." nil t))) + (save-excursion (should (search-forward "Summary: simple little puzzle game" nil t))) (should (search-forward "The aim of 5x5" nil t))) ;; Installed @@ -394,14 +395,11 @@ Must called from within a `tar-mode' buffer." (describe-package 'simple-single) (goto-char (point-min)) (should (search-forward "simple-single is an installed package." nil t)) - (should (re-search-forward - "Status: Installed in ['`‘]~/simple-single-1.3/['’] (unsigned)." - nil t)) - (should (search-forward "Version: 1.3" nil t)) - (should (search-forward "Summary: A single-file package with no dependencies" - nil t)) - (should (search-forward "Homepage: http://doodles.au" nil t)) - (should (re-search-forward "Keywords: \\[?frobnicate\\]?" nil t)) + (save-excursion (should (re-search-forward "Status: Installed in ['`‘]simple-single-1.3/['’] (unsigned)." nil t))) + (save-excursion (should (search-forward "Version: 1.3" nil t))) + (save-excursion (should (search-forward "Summary: A single-file package with no dependencies" nil t))) + (save-excursion (should (search-forward "Homepage: http://doodles.au" nil t))) + (save-excursion (should (re-search-forward "Keywords: \\[?frobnicate\\]?" nil t))) ;; No description, though. Because at this point we don't know ;; what archive the package originated from, and we don't have ;; its readme file saved. commit e276b42800dc2b8263ebf24d7c449f53c819307b Author: Artur Malabarba Date: Fri Jul 17 23:00:24 2015 +0100 * lisp/emacs-lisp/package.el (package--with-work-buffer-async): Fix error handling. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c256923..fc5ef0b 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1136,26 +1136,26 @@ For a description of the other arguments see ;; This `condition-case' is to catch connection errors. (condition-case error-signal (url-retrieve (concat ,location-1 ,file-1) + ;; This is to catch execution errors. (lambda (status) - (if-let ((er (plist-get status :error))) - (when (if (functionp ,async-1) - (funcall ,async-1) - t) - (message "Error contacting: %s" (concat ,location-1 ,file-1)) - (signal (car er) (cdr er))) - (goto-char (point-min)) - (unless (search-forward "\n\n" nil 'noerror) - (error "Invalid url response in buffer %s" - (current-buffer))) - (delete-region (point-min) (point)) - ,@body) - (kill-buffer (current-buffer))) + (condition-case error-signal + (progn + (when-let ((er (plist-get status :error))) + (error "Error retrieving: %s %S" (concat ,location-1 ,file-1) er)) + (goto-char (point-min)) + (unless (search-forward "\n\n" nil 'noerror) + (error "Invalid url response in buffer %s" + (current-buffer))) + (delete-region (point-min) (point)) + ,@body + (kill-buffer (current-buffer))) + (error (when (if (functionp ,async-1) (funcall ,async-1) t) + (signal (car error-signal) (cdr error-signal)))))) nil 'silent) - (error (when (functionp ,async-1) - (funcall ,async-1)) - (message "Error contacting: %s" (concat ,location-1 ,file-1)) - (signal (car error-signal) (cdr error-signal))))))) + (error (when (if (functionp ,async-1) (funcall ,async-1) t) + (message "Error contacting: %s" (concat ,location-1 ,file-1)) + (signal (car error-signal) (cdr error-signal)))))))) (defun package--check-signature-content (content string &optional sig-file) "Check signature CONTENT against STRING. commit 0592cefd03f1de2f04b721d07a16e6e0a9e48f73 Author: Paul Eggert Date: Fri Jul 17 11:54:24 2015 -0700 Fix hang with large yanks This should fix the bug fixed by Mike Crowe's patch in: https://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00106.html A problem in this area has been reported by several users; see Bug#16737, Bug#17101, Bug#17026, Bug#17172, Bug#19320, Bug#20283. This fix differs from Mike Crowe's patch in that it should avoid a race condition that could lose SIGIO signals. ignore_sigio dates back to the 1980s when some platforms couldn't block signals, and could only ignore them, which led to races when signals arrived while being ignored. We shouldn't have to worry about those old platforms now. * src/dispextern.h, src/sysdep.c (ignore_sigio): Remove. * src/emacs.c (shut_down_emacs): Don't call ignore_sigio; unrequest_sigio should suffice. * src/keyboard.c (kbd_buffer_store_buffered_event): Use unrequest_sigio, not ignore_sigio. (kbd_buffer_get_event): Call request_sigio when getting the ball rolling again. diff --git a/src/dispextern.h b/src/dispextern.h index 5202142..37ebab0 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3373,7 +3373,6 @@ void unrequest_sigio (void); bool tabs_safe_p (int); void init_baud_rate (int); void init_sigio (int); -void ignore_sigio (void); /* Defined in xfaces.c. */ diff --git a/src/emacs.c b/src/emacs.c index aad9306..93fb587 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2011,7 +2011,6 @@ shut_down_emacs (int sig, Lisp_Object stuff) /* There is a tendency for a SIGIO signal to arrive within exit, and cause a SIGHUP because the input descriptor is already closed. */ unrequest_sigio (); - ignore_sigio (); /* Do this only if terminating normally, we want glyph matrices etc. in a core dump. */ diff --git a/src/keyboard.c b/src/keyboard.c index c5a392f..6bd123c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3649,8 +3649,7 @@ kbd_buffer_store_buffered_event (union buffered_input_event *event, /* Don't read keyboard input until we have processed kbd_buffer. This happens when pasting text longer than KBD_BUFFER_SIZE/2. */ hold_keyboard_input (); - if (!noninteractive) - ignore_sigio (); + unrequest_sigio (); stop_polling (); } #endif /* subprocesses */ @@ -3849,6 +3848,7 @@ kbd_buffer_get_event (KBOARD **kbp, /* Start reading input again because we have processed enough to be able to accept new events again. */ unhold_keyboard_input (); + request_sigio (); start_polling (); } #endif /* subprocesses */ diff --git a/src/sysdep.c b/src/sysdep.c index 30a55f1..df3e573 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -659,14 +659,6 @@ unrequest_sigio (void) interrupts_deferred = 1; #endif } - -void -ignore_sigio (void) -{ -#ifdef USABLE_SIGIO - signal (SIGIO, SIG_IGN); -#endif -} #ifndef MSDOS /* Block SIGCHLD. */ commit eed81d277f5f095399611d52b4ff814622d44f1c Author: Artur Malabarba Date: Fri Jul 17 12:22:24 2015 +0100 * lisp/obsolete/longlines.el (longlines-search-function): Fallback on `isearch-search-fun-default'. diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el index a27c43b..01939da 100644 --- a/lisp/obsolete/longlines.el +++ b/lisp/obsolete/longlines.el @@ -464,14 +464,9 @@ This is called by `window-configuration-change-hook'." (defun longlines-search-function () (cond - (isearch-word - (if isearch-forward 'word-search-forward 'word-search-backward)) - (isearch-regexp - (if isearch-forward 're-search-forward 're-search-backward)) - (t - (if isearch-forward - 'longlines-search-forward - 'longlines-search-backward)))) + ((or isearch-word isearch-regexp) (isearch-search-fun-default)) + (isearch-forward #'longlines-search-forward) + (t #'longlines-search-backward))) (defun longlines-search-forward (string &optional bound noerror count) (let ((search-spaces-regexp " *[ \n]")) commit 5bd8e67c6e47f672847a9e85a527fe17a0345d01 Author: Tassilo Horn Date: Fri Jul 17 13:18:38 2015 +0200 Support @-mentions * rcirc.el (rcirc-completion-at-point): Support completion of mentions/messages with @nick instead of just nick. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 852d294..13a7cfa 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -904,7 +904,10 @@ The list is updated automatically by `defun-rcirc-command'.") "Function used for `completion-at-point-functions' in `rcirc-mode'." (and (rcirc-looking-at-input) (let* ((beg (save-excursion - (if (re-search-backward " " rcirc-prompt-end-marker t) + ;; On some networks it is common to message or + ;; mention someone using @nick instead of just + ;; nick. + (if (re-search-backward "[[:space:]@]" rcirc-prompt-end-marker t) (1+ (point)) rcirc-prompt-end-marker))) (table (if (and (= beg rcirc-prompt-end-marker)