commit 65c8c7cb96c14f9c6accd03cc8851b5a3459049e (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat May 14 19:56:53 2016 -0700 Pacify ‘make check-declare’ * lisp/cedet/srecode/insert.el (data-debug-new-buffer) (data-debug-insert-stuff-list, data-debug-insert-thing): * lisp/emulation/viper-ex.el (viper-change-state-to-vi) (viper-change-state-to-emacs): * lisp/emulation/viper-macs.el (viper-change-state-to-vi): * lisp/org/ob-asymptote.el (orgtbl-to-generic): * lisp/org/ob-awk.el (orgtbl-to-generic): * lisp/org/ob-core.el (org-edit-src-code, orgtbl-to-generic): * lisp/org/ob-emacs-lisp.el (orgtbl-to-generic): * lisp/org/ob-exp.el (org-element-context): * lisp/org/ob-gnuplot.el (org-time-string-to-time) (orgtbl-to-generic): * lisp/org/ob-haskell.el (org-export-to-file): * lisp/org/ob-latex.el (org-create-formula-image) (org-latex-compile): * lisp/org/ob-python.el (run-python): * lisp/org/ob-sh.el (orgtbl-to-generic): * lisp/org/ob-tangle.el (org-link-escape, org-back-to-heading): * lisp/org/org-colview.el (org-agenda-redo): * lisp/org/org-feed.el (url-retrieve-synchronously): * lisp/org/org-info.el (Info-find-node): * lisp/org/org-list.el (org-previous-line-empty-p): * lisp/org/org-macs.el (org-string-match-p): * lisp/org/org.el (org-beamer-mode): Fix prototype to match current definition. * lisp/emacs-lisp/advice.el (function-called-at-point): * lisp/progmodes/prolog.el (compilation-shell-minor-mode): Fix typo: extra '. * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Insert ,' to pacify check-declare. * lisp/org/ob-comint.el (tramp-flush-directory-property): * lisp/org/ob-tangle.el (org-babel-update-block-body): * lisp/org/org-bibtex.el (org-babel-trim): * lisp/org/org-pcomplete.el (org-export-backend-options): * lisp/org/org-protocol.el (org-publish-get-project-from-filename): Fix file name in declare-function. * lisp/org/ob-comint.el (with-parsed-tramp-file-name) * lisp/org/ob-core.el (with-parsed-tramp-file-name): * lisp/org/org.el (org-beamer-mode): * lisp/url/url-http.el (gnutls-negotiate): Append ‘t’ to declare-function, since the declaration isn’t a defun. * lisp/org/ob-core.el (show-all): Declare outline-show-all instead, since it is the non-obsolete version of this function. (org-save-outline-visibility): Remove; not needed. * lisp/org/ob-scheme.el (run-geiser, geiser-mode) (geiser-eval-region, geiser-repl-exit): * lisp/org/ox-org.el (htmlize-buffer): Prepend "ext:" to file name, since it is not part of Emacs. * lisp/org/ob-sh.el (org-babel-comint-in-buffer) * lisp/org/org-gnus.el (nnimap-group-overview-filename): Remove decl, since function was removed. * lisp/org/ob-sh.el (org-babel-comint-with-output): * lisp/org/org-macro.el (org-with-wide-buffer): Omit unnecessary (and mismatching) decl. * lisp/org/org-agenda.el (calendar-absolute-from-iso): * lisp/org/org-clock.el (calendar-iso-to-absolute): Declare calendar-iso-to-absolute instead, since it is the non-obsolete version of this function. * lisp/org/org-compat.el (w32-focus-frame): Remove decl, since function is now obsolete. diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 19999a6..66c4b7d 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el @@ -194,9 +194,10 @@ Buffer based features related to change hooks is handled one level up." ;; area. Return value is not important. )) -(declare-function data-debug-new-buffer "data-debug") -(declare-function data-debug-insert-stuff-list "data-debug") -(declare-function data-debug-insert-thing dictionary "data-debug") +(declare-function data-debug-new-buffer "data-debug" (name)) +(declare-function data-debug-insert-stuff-list "data-debug" (stufflist prefix)) +(declare-function data-debug-insert-thing "data-debug" + (thing prefix prebuttontext &optional parent)) (defun srecode-insert-show-error-report (dictionary format &rest args) "Display an error report based on DICTIONARY, FORMAT and ARGS. diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index ea01253..c0da59c 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -1832,7 +1832,7 @@ Redefining advices affect the construction of an advised definition." ;; @@ Interactive input functions: ;; =============================== -(declare-function 'function-called-at-point "help") +(declare-function function-called-at-point "help") (defun ad-read-advised-function (&optional prompt predicate default) "Read name of advised function with completion from the minibuffer. diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 37edf45..0144daf 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -410,7 +410,8 @@ to be a cons with VAL as its head. ;; function, so warnings like "not known to be defined" are fair game. ;; But in practice, it's common to use `cl-defmethod' ;; without a previous `cl-defgeneric'. - (declare-function ,name "") + ;; The ",'" is a no-op that pacifies check-declare. + (,'declare-function ,name "") (cl-generic-define-method ',name ',(nreverse qualifiers) ',args ,uses-cnm ,fun))))) diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index 2c422cb..9c9cd68 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -1250,7 +1250,7 @@ reversed." (kill-region (point) (mark t)))))) -(declare-function viper-change-state-to-vi "viper-cmd" ()) +(declare-function viper-change-state-to-vi "viper-cmd" (&rest _)) ;; Ex edit command ;; In Viper, `e' and `e!' behave identically. In both cases, the user is @@ -1998,7 +1998,7 @@ Please contact your system administrator. " (beginning-of-line) (if opt-c (message "done")))) -(declare-function viper-change-state-to-emacs "viper-cmd" ()) +(declare-function viper-change-state-to-emacs "viper-cmd" (&rest _)) ;; Ex tag command (defun ex-tag () diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index fd6b222..c8626e4 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el @@ -274,7 +274,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., )) -(declare-function viper-change-state-to-vi "viper-cmd" ()) +(declare-function viper-change-state-to-vi "viper-cmd" (&rest _)) ;; Terminate a Vi kbd macro. ;; optional argument IGNORE, if t, indicates that we are dealing with an diff --git a/lisp/org/ob-asymptote.el b/lisp/org/ob-asymptote.el index ddfc8c2..2d27757 100644 --- a/lisp/org/ob-asymptote.el +++ b/lisp/org/ob-asymptote.el @@ -45,7 +45,8 @@ (require 'ob) (eval-when-compile (require 'cl)) -(declare-function orgtbl-to-generic "org-table" (table params)) +(declare-function orgtbl-to-generic "org-table" + (table params &optional backend)) (declare-function org-combine-plists "org" (&rest plists)) (defvar org-babel-tangle-lang-exts) diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el index bf46197..3d074d8 100644 --- a/lisp/org/ob-awk.el +++ b/lisp/org/ob-awk.el @@ -36,7 +36,8 @@ (eval-when-compile (require 'cl)) (declare-function org-babel-ref-resolve "ob-ref" (ref)) -(declare-function orgtbl-to-generic "org-table" (table params)) +(declare-function orgtbl-to-generic "org-table" + (table params &optional backend)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("awk" . "awk")) diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el index 325a935..e5949b6 100644 --- a/lisp/org/ob-comint.el +++ b/lisp/org/ob-comint.el @@ -34,8 +34,9 @@ (require 'org-compat) (require 'comint) (eval-when-compile (require 'cl)) -(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body)) -(declare-function tramp-flush-directory-property "tramp" (vec directory)) +(declare-function with-parsed-tramp-file-name "tramp" + (filename var &rest body) t) +(declare-function tramp-flush-directory-property "tramp-cache" (key directory)) (defun org-babel-comint-buffer-livep (buffer) "Check if BUFFER is a comint buffer with a live process." diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index d0a0d9b..b7e8c23 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -37,7 +37,7 @@ (defvar org-babel-call-process-region-original nil) (defvar org-src-lang-modes) (defvar org-babel-library-of-babel) -(declare-function show-all "outline" ()) +(declare-function outline-show-all "outline" ()) (declare-function org-every "org" (pred seq)) (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS)) (declare-function org-mark-ring-push "org" (&optional pos buffer)) @@ -46,13 +46,13 @@ (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) (declare-function tramp-file-name-user "tramp" (vec)) (declare-function tramp-file-name-host "tramp" (vec)) -(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body)) +(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body) + t) (declare-function org-icompleting-read "org" (&rest args)) (declare-function org-edit-src-code "org-src" - (&optional context code edit-buffer-name quietp)) + (&optional context code edit-buffer-name)) (declare-function org-edit-src-exit "org-src" (&optional context)) (declare-function org-open-at-point "org" (&optional in-emacs reference-buffer)) -(declare-function org-save-outline-visibility "org-macs" (use-markers &rest body)) (declare-function org-outline-overlay-data "org" (&optional use-markers)) (declare-function org-set-outline-overlay-data "org" (data)) (declare-function org-narrow-to-subtree "org" ()) @@ -73,7 +73,8 @@ (hook function &optional append local)) (declare-function org-table-align "org-table" ()) (declare-function org-table-end "org-table" (&optional table-type)) -(declare-function orgtbl-to-generic "org-table" (table params)) +(declare-function orgtbl-to-generic "org-table" + (table params &optional backend)) (declare-function orgtbl-to-orgtbl "org-table" (table params)) (declare-function org-babel-tangle-comment-links "ob-tangle" (&optional info)) (declare-function org-babel-lob-get-info "ob-lob" nil) diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el index c0480f4..ae4d703 100644 --- a/lisp/org/ob-emacs-lisp.el +++ b/lisp/org/ob-emacs-lisp.el @@ -32,7 +32,8 @@ '((:hlines . "yes") (:colnames . "no")) "Default arguments for evaluating an emacs-lisp source block.") -(declare-function orgtbl-to-generic "org-table" (table params)) +(declare-function orgtbl-to-generic "org-table" + (table params &optional backend)) (defun org-babel-expand-body:emacs-lisp (body params) "Expand BODY according to PARAMS, return the expanded body." diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index c04e130..dbe7ba7 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el @@ -45,7 +45,7 @@ (declare-function org-fill-template "org" (template alist)) (declare-function org-split-string "org" (string &optional separators)) (declare-function org-element-at-point "org-element" (&optional keep-trail)) -(declare-function org-element-context "org-element" ()) +(declare-function org-element-context "org-element" (&optional element)) (declare-function org-element-property "org-element" (property element)) (declare-function org-element-type "org-element" (element)) (declare-function org-escape-code-in-string "org-src" (s)) diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 0dcb1ba..abf45af 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el @@ -41,9 +41,10 @@ (require 'ob) (eval-when-compile (require 'cl)) -(declare-function org-time-string-to-time "org" (s)) +(declare-function org-time-string-to-time "org" (s &optional buffer pos)) (declare-function org-combine-plists "org" (&rest plists)) -(declare-function orgtbl-to-generic "org-table" (table params)) +(declare-function orgtbl-to-generic "org-table" + (table params &optional backend)) (declare-function gnuplot-mode "ext:gnuplot-mode" ()) (declare-function gnuplot-send-string-to-gnuplot "ext:gnuplot-mode" (str txt)) (declare-function gnuplot-send-buffer-to-gnuplot "ext:gnuplot-mode" ()) diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index ec9a511..fc1b4d7 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el @@ -150,7 +150,8 @@ specifying a variable of the same value." (defvar org-export-copy-to-kill-ring) (declare-function org-export-to-file "ox" (backend file - &optional async subtreep visible-only body-only ext-plist)) + &optional async subtreep visible-only body-only + ext-plist post-process)) (defun org-babel-haskell-export-to-lhs (&optional arg) "Export to a .lhs file with all haskell code blocks escaped. When called with a prefix argument the resulting diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index 1f5e297..c08717d 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el @@ -32,11 +32,12 @@ ;;; Code: (require 'ob) -(declare-function org-create-formula-image "org" (string tofile options buffer)) +(declare-function org-create-formula-image "org" + (string tofile options buffer &optional type)) (declare-function org-splice-latex-header "org" (tpl def-pkg pkg snippets-p &optional extra)) (declare-function org-latex-guess-inputenc "ox-latex" (header)) -(declare-function org-latex-compile "ox-latex" (file)) +(declare-function org-latex-compile "ox-latex" (texfile &optional snippet)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("latex" . "tex")) diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index ed377e5..2bfbd4e 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -33,7 +33,7 @@ (declare-function org-remove-indentation "org" ) (declare-function py-shell "ext:python-mode" (&optional argprompt)) (declare-function py-toggle-shells "ext:python-mode" (arg)) -(declare-function run-python "ext:python" (cmd &optional dedicated show)) +(declare-function run-python "ext:python" (&optional cmd dedicated show)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("python" . "py")) diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index 83baf9c..685fa01 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -45,10 +45,11 @@ (defvar geiser-default-implementation) ; Defined in geiser-impl.el (defvar geiser-active-implementations) ; Defined in geiser-impl.el -(declare-function run-geiser "geiser-repl" (impl)) -(declare-function geiser-mode "geiser-mode" ()) -(declare-function geiser-eval-region "geiser-mode" (start end &optional and-go raw nomsg)) -(declare-function geiser-repl-exit "geiser-repl" (&optional arg)) +(declare-function run-geiser "ext:geiser-repl" (impl)) +(declare-function geiser-mode "ext:geiser-mode" ()) +(declare-function geiser-eval-region "ext:geiser-mode" + (start end &optional and-go raw nomsg)) +(declare-function geiser-repl-exit "ext:geiser-repl" (&optional arg)) (defvar org-babel-default-header-args:scheme '() "Default header arguments for scheme code blocks.") diff --git a/lisp/org/ob-sh.el b/lisp/org/ob-sh.el index 5f234b5..b6f0404 100644 --- a/lisp/org/ob-sh.el +++ b/lisp/org/ob-sh.el @@ -30,11 +30,10 @@ (require 'shell) (eval-when-compile (require 'cl)) -(declare-function org-babel-comint-in-buffer "ob-comint" (buffer &rest body)) (declare-function org-babel-comint-wait-for-output "ob-comint" (buffer)) (declare-function org-babel-comint-buffer-livep "ob-comint" (buffer)) -(declare-function org-babel-comint-with-output "ob-comint" (meta &rest body)) -(declare-function orgtbl-to-generic "org-table" (table params)) +(declare-function orgtbl-to-generic "org-table" + (table params &optional backend)) (defvar org-babel-default-header-args:sh '()) diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index bfd5a06..2e42d94 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -31,13 +31,13 @@ (require 'cl)) (declare-function org-edit-special "org" (&optional arg)) -(declare-function org-link-escape "org" (text &optional table)) +(declare-function org-link-escape "org" (text &optional table merge)) (declare-function org-store-link "org" (arg)) (declare-function org-open-link-from-string "org" (s &optional arg reference-buffer)) (declare-function org-heading-components "org" ()) -(declare-function org-back-to-heading "org" (invisible-ok)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) (declare-function org-fill-template "org" (template alist)) -(declare-function org-babel-update-block-body "org" (new-body)) +(declare-function org-babel-update-block-body "ob-core" (new-body)) (declare-function make-directory "files" (dir &optional parents)) (defcustom org-babel-tangle-lang-exts diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index fd5253a..19f9a82 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -52,7 +52,7 @@ (declare-function diary-add-to-list "diary-lib" (date string specifier &optional marker globcolor literal)) -(declare-function calendar-absolute-from-iso "cal-iso" (date)) +(declare-function calendar-iso-to-absolute "cal-iso" (date)) (declare-function calendar-astro-date-string "cal-julian" (&optional date)) (declare-function calendar-bahai-date-string "cal-bahai" (&optional date)) (declare-function calendar-chinese-date-string "cal-china" (&optional date)) diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index 92e5d44..2e849d2 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el @@ -120,7 +120,7 @@ (declare-function bibtex-generate-autokey "bibtex" ()) (declare-function bibtex-parse-entry "bibtex" (&optional content)) (declare-function bibtex-url "bibtex" (&optional pos no-browse)) -(declare-function org-babel-trim "ob" (string &optional regexp)) +(declare-function org-babel-trim "ob-core" (string &optional regexp)) ;;; Bibtex data diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 1ec17f4..7b55153 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -32,7 +32,7 @@ (require 'cl)) (require 'org) -(declare-function calendar-absolute-from-iso "cal-iso" (&optional date)) +(declare-function calendar-iso-to-absolute "cal-iso" (date)) (declare-function notifications-notify "notifications" (&rest params)) (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (declare-function org-refresh-properties "org" (dprop tprop)) diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index fdf24b2..c089866 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -31,7 +31,7 @@ (eval-when-compile (require 'cl)) (require 'org) -(declare-function org-agenda-redo "org-agenda" ()) +(declare-function org-agenda-redo "org-agenda" (&optional all)) (declare-function org-agenda-do-context-action "org-agenda" ()) (declare-function org-clock-sum-today "org-clock" (&optional headline-filter)) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 9a79a4b..e8bf970 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -34,8 +34,6 @@ (require 'org-macs) -(declare-function w32-focus-frame "term/w32-win" (frame)) - ;; The following constant is for backward compatibility. We do not use ;; it in org-mode, because the Byte compiler evaluates (featurep 'xemacs) ;; at compilation time and can therefore optimize code better. diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index 6d6f996..38f4a9f 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el @@ -93,7 +93,8 @@ (require 'org) (require 'sha1) -(declare-function url-retrieve-synchronously "url" (url)) +(declare-function url-retrieve-synchronously "url" + (url &optional silent inhibit-cookies timeout)) (declare-function xml-node-children "xml" (node)) (declare-function xml-get-children "xml" (node child-name)) (declare-function xml-get-attribute "xml" (node attribute)) diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index ed6d11d..fd7dd0b 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el @@ -38,7 +38,6 @@ ;; Declare external functions and variables (declare-function message-fetch-field "message" (header &optional not-all)) (declare-function message-narrow-to-head-1 "message" nil) -(declare-function nnimap-group-overview-filename "nnimap" (group server)) ;; The following line suppresses a compiler warning stemming from gnus-sum.el (declare-function gnus-summary-last-subject "gnus-sum" nil) ;; Customization variables @@ -78,6 +77,8 @@ this variable to t." ;; Implementation +;; FIXME: nnimap-group-overview-filename was removed from Gnus in +;; September 2010. Perhaps remove this function? (defun org-gnus-nnimap-cached-article-number (group server message-id) "Return cached article number (uid) of message in GROUP on SERVER. MESSAGE-ID is the message-id header field that identifies the diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index 8eb6955..4ee5ee4 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el @@ -34,8 +34,8 @@ ;; Declare external functions and variables -(declare-function Info-find-node "info" (filename nodename - &optional no-going-back)) +(declare-function Info-find-node "info" + (filename nodename &optional no-going-back strict-case)) (defvar Info-current-file) (defvar Info-current-node) diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index e119fbf..a84c003 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -115,7 +115,7 @@ (declare-function org-level-increment "org" ()) (declare-function org-narrow-to-subtree "org" ()) (declare-function org-at-heading-p "org" (&optional invisible-ok)) -(declare-function org-previous-line-empty-p "org" ()) +(declare-function org-previous-line-empty-p "org" (&optional next)) (declare-function org-remove-if "org" (predicate seq)) (declare-function org-reduced-level "org" (L)) (declare-function org-show-subtree "org" ()) diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el index d8e2fd3..f6bb6b3 100644 --- a/lisp/org/org-macro.el +++ b/lisp/org/org-macro.el @@ -48,7 +48,6 @@ (declare-function org-remove-double-quotes "org" (s)) (declare-function org-mode "org" ()) (declare-function org-file-contents "org" (file &optional noerror)) -(declare-function org-with-wide-buffer "org-macs" (&rest body)) ;;; Variables diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 4ffa547..a74a5a0 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -45,7 +45,8 @@ (string (decode-char 'ucs c))))) (declare-function org-add-props "org-compat" (string plist &rest props)) -(declare-function org-string-match-p "org-compat" (&rest args)) +(declare-function org-string-match-p "org-compat" + (regexp string &optional start)) (defmacro org-with-gensyms (symbols &rest body) (declare (debug (sexp body)) (indent 1)) diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index 2679996..09e637a 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -258,7 +258,7 @@ When completing for #+STARTUP, for example, this function returns (buffer-name (buffer-base-buffer))))))) -(declare-function org-export-backend-options "org-export" (cl-x)) +(declare-function org-export-backend-options "ox" (cl-x) t) (defun pcomplete/org-mode/file-option/options () "Complete arguments for the #+OPTIONS file option." (while (pcomplete-here diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 2f2c54b..667b748 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -119,7 +119,7 @@ (eval-when-compile (require 'cl)) -(declare-function org-publish-get-project-from-filename "org-publish" +(declare-function org-publish-get-project-from-filename "ox-publish" (filename &optional up)) (declare-function server-edit "server" (&optional arg)) diff --git a/lisp/org/org.el b/lisp/org/org.el index e2fbf7b..1d060f8 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -127,7 +127,7 @@ Stars are put in group 1 and the trimmed body in group 2.") (declare-function orgtbl-mode "org-table" (&optional arg)) (declare-function org-clock-out "org-clock" (&optional switch-to-state fail-quietly at-time)) -(declare-function org-beamer-mode "ox-beamer" ()) +(declare-function org-beamer-mode "ox-beamer" (&optional prefix) t) (declare-function org-table-edit-field "org-table" (arg)) (declare-function org-table-justify-field-maybe "org-table" (&optional new)) (declare-function org-table-set-constants "org-table" ()) @@ -135,7 +135,8 @@ Stars are put in group 1 and the trimmed body in group 2.") (declare-function org-id-get-create "org-id" (&optional force)) (declare-function org-id-find-id-file "org-id" (id)) (declare-function org-tags-view "org-agenda" (&optional todo-only match)) -(declare-function org-agenda-list "org-agenda" (&optional arg start-day span)) +(declare-function org-agenda-list "org-agenda" + (&optional arg start-day span with-hour)) (declare-function org-agenda-redo "org-agenda" (&optional all)) (declare-function org-table-align "org-table" ()) (declare-function org-table-begin "org-table" (&optional table-type)) @@ -154,7 +155,8 @@ Stars are put in group 1 and the trimmed body in group 2.") (declare-function org-element-interpret-data "org-element" (data &optional parent)) (declare-function org-element-map "org-element" - (data types fun &optional info first-match no-recursion)) + (data types fun &optional + info first-match no-recursion with-affiliated)) (declare-function org-element-nested-p "org-element" (elem-a elem-b)) (declare-function org-element-parse-buffer "org-element" (&optional granularity visible-only)) @@ -448,7 +450,8 @@ For export specific modules, see also `org-export-backends'." (defvar org-export--registered-backends) ; From ox.el. (declare-function org-export-derived-backend-p "ox" (backend &rest backends)) -(declare-function org-export-backend-name "ox" (backend)) +(declare-function org-export-backend-name "ox" (backend) t) +(declare-function org-export-backend-options "ox" (cl-x) t) (defcustom org-export-backends '(ascii html icalendar latex) "List of export back-ends that should be always available. @@ -4213,7 +4216,7 @@ Normal means, no org-mode-specific context." (defvar mark-active) ;; Various packages -(declare-function calendar-absolute-from-iso "cal-iso" (date)) +(declare-function calendar-iso-to-absolute "cal-iso" (date)) (declare-function calendar-forward-day "cal-move" (arg)) (declare-function calendar-goto-date "cal-move" (date)) (declare-function calendar-goto-today "cal-move" ()) @@ -4225,14 +4228,15 @@ Normal means, no org-mode-specific context." (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep)) (defvar font-lock-unfontify-region-function) (declare-function iswitchb-read-buffer "iswitchb" - (prompt &optional default require-match start matches-set)) + (prompt &optional + default require-match _predicate start matches-set)) (defvar iswitchb-temp-buflist) (declare-function org-gnus-follow-link "org-gnus" (&optional group article)) (defvar org-agenda-tags-todo-honor-ignore-options) (declare-function org-agenda-skip "org-agenda" ()) (declare-function org-agenda-format-item "org-agenda" - (extra txt &optional level category tags dotime noprefix remove-re habitp)) + (extra txt &optional level category tags dotime remove-re habitp)) (declare-function org-agenda-new-marker "org-agenda" (&optional pos)) (declare-function org-agenda-change-all-lines "org-agenda" (newhead hdmarker &optional fixface just-this)) @@ -12038,8 +12042,6 @@ This function can be used in a hook." ;;;; Completion -(declare-function org-export-backend-name "org-export" (cl-x)) -(declare-function org-export-backend-options "org-export" (cl-x)) (defun org-get-export-keywords () "Return a list of all currently understood export keywords. Export keywords include options, block names, attributes and diff --git a/lisp/org/ox-org.el b/lisp/org/ox-org.el index 6221c70..aa1d197 100644 --- a/lisp/org/ox-org.el +++ b/lisp/org/ox-org.el @@ -25,7 +25,7 @@ ;;; Code: (require 'ox) -(declare-function htmlize-buffer "htmlize" (&optional buffer)) +(declare-function htmlize-buffer "ext:htmlize" (&optional buffer)) (defgroup org-export-org nil "Options for exporting Org mode files to Org." diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 212a5fa..0bbf67f 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1271,7 +1271,7 @@ Actually this is just customized `prolog-mode'." (comint-send-string proc (string last-command-event)) (call-interactively 'self-insert-command)))) -(declare-function 'compilation-shell-minor-mode "compile" (&optional arg)) +(declare-function compilation-shell-minor-mode "compile" (&optional arg)) (defvar compilation-error-regexp-alist) (define-derived-mode prolog-inferior-mode comint-mode "Inferior Prolog" diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index d0f8364..88a11f3 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -508,7 +508,7 @@ work correctly." ) (declare-function gnutls-peer-status "gnutls.c" (proc)) -(declare-function gnutls-negotiate "gnutls.el") +(declare-function gnutls-negotiate "gnutls.el" t t) (defun url-http-parse-headers () "Parse and handle HTTP specific headers. commit f2b16e44721a07c59279e91d7cd34777fa30fbdf Author: Lars Ingebrigtsen Date: Sat May 14 22:57:36 2016 +0200 :max-width/height fixes for shr after the scaling changes * lisp/net/shr.el (shr-rescale-image): Ensure that we respect max-width and max-height even after the scaling changes done earlier this year. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d91b00c..9d42fde 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1016,14 +1016,17 @@ WIDTH and HEIGHT are the sizes given in the HTML data, if any." (max-width (truncate (* shr-max-image-proportion (- (nth 2 edges) (nth 0 edges))))) (max-height (truncate (* shr-max-image-proportion - (- (nth 3 edges) (nth 1 edges)))))) + (- (nth 3 edges) (nth 1 edges))))) + (scaling (image-compute-scaling-factor image-scaling-factor))) (when (or (and width (> width max-width)) (and height (> height max-height))) (setq width nil height nil)) - (if (and width height) + (if (and width height + (< (* width scaling) max-width) + (< (* height scaling) max-height)) (create-image data 'imagemagick t :ascent 100 commit bed76a80d518dfc64980d950963ebf01a956cc80 Author: Eli Zaretskii Date: Sat May 14 20:39:17 2016 +0300 Fix reading minibuffer input in viper-mode * lisp/emulation/viper-cmd.el (viper-read-string-with-history): Restore an assignment to viper-initial that got lost when viper-cmd.el was switched to lexical-binding. (Bug#23536) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index da72b97..6951dbb 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -2127,6 +2127,7 @@ problems." (setq keymap (or keymap minibuffer-local-map) initial (or initial "") + viper-initial initial temp-msg (if default (format "(default %s) " default) "")) commit 91109821a2a190206d43db50605986e614b916f2 Author: Paul Eggert Date: Sat May 14 10:24:22 2016 -0700 Port autogen.sh to Git 2.4 Problem reported by Michael Brand in: http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00367.html * autogen.sh (git_config): Don't assume that git rev-parse groks --git-common-dir. diff --git a/autogen.sh b/autogen.sh index 3809942..b1bd86b 100755 --- a/autogen.sh +++ b/autogen.sh @@ -277,8 +277,10 @@ git_config () # Get location of Git's common configuration directory. For older Git # versions this is just '.git'. Newer Git versions support worktrees. -test -e .git && git_common_dir=`git rev-parse --git-common-dir 2>/dev/null` || - git_common_dir=.git +{ test -e .git && + git_common_dir=`git rev-parse --no-flags --git-common-dir 2>/dev/null` && + test -n "$git_common_dir" +} || git_common_dir=.git hooks=$git_common_dir/hooks # Check hashes when transferring objects among repositories. commit c8109d9c4057d8cac79e2c139758cadd410e7446 Merge: 3690680 6de0715 Author: Paul Eggert Date: Fri May 13 18:26:15 2016 -0700 Merge from origin/emacs-25 6de0715 Properly reject malformed or empty package sigs edae7d9 Remove buggy non-native image scrolling commit 6de0715f5467d4b925e2dfe082174529ace3b174 (refs/remotes/origin/emacs-25) Author: Paul Eggert Date: Fri May 13 18:23:05 2016 -0700 Properly reject malformed or empty package sigs Problem report and fix by Lizzie Dixon (Bug#23513). * lisp/emacs-lisp/package.el (package--check-signature-content): Report an error if no good signatures OR if a fatal error. Not AND. Copyright-paperwork-exempt: yes diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5371f0b..58973df 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1214,7 +1214,7 @@ errors." (unless (and (eq package-check-signature 'allow-unsigned) (eq (epg-signature-status sig) 'no-pubkey)) (setq had-fatal-error t)))) - (when (and (null good-signatures) had-fatal-error) + (when (or (null good-signatures) had-fatal-error) (package--display-verify-error context sig-file) (signal 'bad-signature (list sig-file))) good-signatures))) commit 36906806ccfc0e53f1d8c365ab0d7151288b7833 Author: Paul Eggert Date: Fri May 13 13:30:33 2016 -0700 Improve display of tex-verbatim and Info quoted Problem reported by Glenn Morris (Bug#19889). * doc/emacs/display.texi (Standard Faces): * doc/lispref/display.texi (Basic Faces): * etc/NEWS: Mention fixed-pitch-serif. * lisp/faces.el (face-font-family-alternatives): New family alias Monospace Serif. (fixed-pitch-serif): New face, which uses the new family. * lisp/info.el (Info-quoted): * lisp/textmodes/tex-mode.el (tex-verbatim): Use the new face. * test/lisp/legacy/font-parse-tests.el (font-parse-tests--data): Add test case for Monospace Serif. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 89f5bec..3f5aac1 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -613,6 +613,9 @@ This face underlines text. This face forces use of a fixed-width font. It's reasonable to customize this face to use a different fixed-width font, if you like, but you should not make it a variable-width font. +@item fixed-pitch-serif +This face is like @code{fixed-pitch}, except the font has serifs and +looks more like traditional typewriting. @cindex variable-pitch face @item variable-pitch This face forces use of a variable-width font. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 87126f9..1956ee5 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3017,6 +3017,7 @@ attribute on this face (@pxref{Face Attributes}). @itemx bold-italic @itemx underline @itemx fixed-pitch +@itemx fixed-pitch-serif @itemx variable-pitch These have the attributes indicated by their names (e.g., @code{bold} has a bold @code{:weight} attribute), with all other attributes diff --git a/etc/NEWS b/etc/NEWS index 31229f1..a910eaf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -470,6 +470,10 @@ ABBR is a time zone abbreviation. The affected functions are 'current-time-string', 'current-time-zone', 'decode-time', 'format-time-string', and 'set-time-zone-rule'. ++++ +*** New basic face 'fixed-pitch-serif', for a fixed-width font with serifs. +The Info-quoted and tex-verbatim faces now default to inheriting from it. + * Changes in Emacs 25.2 on Non-Free Operating Systems diff --git a/lisp/faces.el b/lisp/faces.el index 71c94e5..4193c1e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -98,7 +98,31 @@ a font height that isn't optimal." (defcustom face-font-family-alternatives (mapcar (lambda (arg) (mapcar 'purecopy arg)) '(("Monospace" "courier" "fixed") + + ;; Monospace Serif is an Emacs invention, intended to work around + ;; portability problems when using Courier. It should work well + ;; when combined with Monospaced and with other standard fonts. + ("Monospace Serif" + + ;; This looks good on GNU/Linux. + "Courier 10 Pitch" + ;; This looks good on MS-Windows and OS X. + "Consolas" + ;; This looks good on OS X. "Courier" looks good too, but is + ;; jagged on GNU/Linux and so is listed later as "courier". + "Courier Std" + ;; Although these are anti-aliased, they are a bit faint compared + ;; to the above. + "FreeMono" "Nimbus Mono L" + ;; These are aliased and look jagged. + "courier" "fixed" + ;; Omit Courier New, as it is the default MS-Windows font and so + ;; would look no different, and is pretty faint on other platforms. + ) + + ;; This is present for backward compatibility. ("courier" "CMU Typewriter Text" "fixed") + ("Sans Serif" "helv" "helvetica" "arial" "fixed") ("helv" "helvetica" "arial" "fixed"))) "Alist of alternative font family names. @@ -2318,6 +2342,11 @@ If you set `term-file-prefix' to nil, this function does nothing." "The basic fixed-pitch face." :group 'basic-faces) +(defface fixed-pitch-serif + '((t :family "Monospace Serif")) + "The basic fixed-pitch face with serifs." + :group 'basic-faces) + (defface variable-pitch '((((type w32)) ;; This is a kludgy workaround for an issue discussed in diff --git a/lisp/info.el b/lisp/info.el index 6426cfc..ae46fba 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4236,7 +4236,7 @@ With a zero prefix arg, put the name inside a function call to `info'." "Syntax table used in `Info-mode'.") (defface Info-quoted - '((t :family "courier")) + '((t :inherit fixed-pitch-serif)) "Face used for quoted elements.") (defvar Info-mode-font-lock-keywords diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 973b2d3..b38b147 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -804,8 +804,7 @@ Not smaller than the value set by `tex-suscript-height-minimum'." (defvar tex-math-face 'tex-math) (defface tex-verbatim - ;; '((t :inherit font-lock-string-face)) - '((t :family "courier")) + '((t :inherit fixed-pitch-serif)) "Face used to highlight TeX verbatim environments." :group 'tex) (define-obsolete-face-alias 'tex-verbatim-face 'tex-verbatim "22.1") diff --git a/test/lisp/legacy/font-parse-tests.el b/test/lisp/legacy/font-parse-tests.el index 6274253..9f730d3 100644 --- a/test/lisp/legacy/font-parse-tests.el +++ b/test/lisp/legacy/font-parse-tests.el @@ -32,6 +32,7 @@ (defvar font-parse-tests--data `((" " ,(intern " ") nil nil nil nil) ("Monospace" Monospace nil nil nil nil) + ("Monospace Serif" ,(intern "Monospace Serif") nil nil nil nil) ("Foo1" Foo1 nil nil nil nil) ("12" nil 12.0 nil nil nil) ("12 " ,(intern "12 ") nil nil nil nil) commit 536ddf40cc30fbf68c4e6afb2d3d2d8e53458381 Author: Stefan Monnier Date: Fri May 13 14:32:22 2016 -0400 * lisp/net/sieve-mode.el: Handle the text:... notation Get rid of redundant :group keywords. (sieve-mode-syntax-table): Move initialization into declaration. (sieve-syntax-propertize, sieve-syntax-propertize-text): New functions. (sieve-mode): Use them. diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el index 7575ba6..77ab44f 100644 --- a/lisp/net/sieve-mode.el +++ b/lisp/net/sieve-mode.el @@ -57,7 +57,6 @@ (defcustom sieve-mode-hook nil "Hook run in sieve mode buffers." - :group 'sieve :type 'hook) ;; Font-lock @@ -72,8 +71,7 @@ (((class color) (background light)) (:foreground "Orchid")) (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:bold t))) - "Face used for Sieve Control Commands." - :group 'sieve) + "Face used for Sieve Control Commands.") ;; backward-compatibility alias (put 'sieve-control-commands-face 'face-alias 'sieve-control-commands) (put 'sieve-control-commands-face 'obsolete-face "22.1") @@ -86,8 +84,7 @@ (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :bold t))) - "Face used for Sieve Action Commands." - :group 'sieve) + "Face used for Sieve Action Commands.") ;; backward-compatibility alias (put 'sieve-action-commands-face 'face-alias 'sieve-action-commands) (put 'sieve-action-commands-face 'obsolete-face "22.1") @@ -104,8 +101,7 @@ (((class color) (background light)) (:foreground "CadetBlue")) (((class color) (background dark)) (:foreground "Aquamarine")) (t (:bold t :underline t))) - "Face used for Sieve Test Commands." - :group 'sieve) + "Face used for Sieve Test Commands.") ;; backward-compatibility alias (put 'sieve-test-commands-face 'face-alias 'sieve-test-commands) (put 'sieve-test-commands-face 'obsolete-face "22.1") @@ -120,8 +116,7 @@ (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) - "Face used for Sieve Tagged Arguments." - :group 'sieve) + "Face used for Sieve Tagged Arguments.") ;; backward-compatibility alias (put 'sieve-tagged-arguments-face 'face-alias 'sieve-tagged-arguments) (put 'sieve-tagged-arguments-face 'obsolete-face "22.1") @@ -149,28 +144,27 @@ ;; Syntax table -(defvar sieve-mode-syntax-table nil +(defvar sieve-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?\\ "\\" st) + (modify-syntax-entry ?\n "> " st) + (modify-syntax-entry ?\f "> " st) + (modify-syntax-entry ?\# "< " st) + (modify-syntax-entry ?/ ". 14" st) + (modify-syntax-entry ?* ". 23b" st) + (modify-syntax-entry ?+ "." st) + (modify-syntax-entry ?- "." st) + (modify-syntax-entry ?= "." st) + (modify-syntax-entry ?% "." st) + (modify-syntax-entry ?< "." st) + (modify-syntax-entry ?> "." st) + (modify-syntax-entry ?& "." st) + (modify-syntax-entry ?| "." st) + (modify-syntax-entry ?_ "_" st) + (modify-syntax-entry ?\' "\"" st) + st) "Syntax table in use in sieve-mode buffers.") -(if sieve-mode-syntax-table - () - (setq sieve-mode-syntax-table (make-syntax-table)) - (modify-syntax-entry ?\\ "\\" sieve-mode-syntax-table) - (modify-syntax-entry ?\n "> " sieve-mode-syntax-table) - (modify-syntax-entry ?\f "> " sieve-mode-syntax-table) - (modify-syntax-entry ?\# "< " sieve-mode-syntax-table) - (modify-syntax-entry ?/ "." sieve-mode-syntax-table) - (modify-syntax-entry ?* "." sieve-mode-syntax-table) - (modify-syntax-entry ?+ "." sieve-mode-syntax-table) - (modify-syntax-entry ?- "." sieve-mode-syntax-table) - (modify-syntax-entry ?= "." sieve-mode-syntax-table) - (modify-syntax-entry ?% "." sieve-mode-syntax-table) - (modify-syntax-entry ?< "." sieve-mode-syntax-table) - (modify-syntax-entry ?> "." sieve-mode-syntax-table) - (modify-syntax-entry ?& "." sieve-mode-syntax-table) - (modify-syntax-entry ?| "." sieve-mode-syntax-table) - (modify-syntax-entry ?_ "_" sieve-mode-syntax-table) - (modify-syntax-entry ?\' "\"" sieve-mode-syntax-table)) ;; Key map definition @@ -182,13 +176,40 @@ map) "Key map used in sieve mode.") -;; Menu definition +;; Menu -(defvar sieve-mode-menu nil - "Menubar used in sieve mode.") +(easy-menu-define sieve-mode-menu sieve-mode-map + "Sieve Menu." + '("Sieve" + ["Upload script" sieve-upload t] + ["Manage scripts on server" sieve-manage t])) ;; Code for Sieve editing mode. -(autoload 'easy-menu-add-item "easymenu") + + +(defun sieve-syntax-propertize (beg end) + (goto-char beg) + (sieve-syntax-propertize-text end) + (funcall + (syntax-propertize-rules + ;; FIXME: When there's a "text:" with a # comment, the \n plays dual role: + ;; it closes the comment and starts the string. This is problematic for us + ;; since syntax-table entries can either close a comment or + ;; delimit a string, but not both. + ("\\_") + (2 (prog1 (unless (save-excursion + (nth 8 (syntax-ppss (match-beginning 0)))) + (string-to-syntax "|")) + (sieve-syntax-propertize-text end))))) + beg end)) + +(defun sieve-syntax-propertize-text (end) + (let ((ppss (syntax-ppss))) + (when (and (eq t (nth 3 ppss)) + (re-search-forward "^\\.\\(\n\\)" end 'move)) + (put-text-property (match-beginning 1) (match-end 1) + 'syntax-table (string-to-syntax "|"))))) ;;;###autoload (define-derived-mode sieve-mode c-mode "Sieve" @@ -204,18 +225,12 @@ Turning on Sieve mode runs `sieve-mode-hook'." (set (make-local-variable 'comment-end) "") ;;(set (make-local-variable 'comment-start-skip) "\\(^\\|\\s-\\);?#+ *") (set (make-local-variable 'comment-start-skip) "#+ *") + (set (make-local-variable 'syntax-propertize-function) + #'sieve-syntax-propertize) (set (make-local-variable 'font-lock-defaults) '(sieve-font-lock-keywords nil nil ((?_ . "w")))) (easy-menu-add-item nil nil sieve-mode-menu)) -;; Menu - -(easy-menu-define sieve-mode-menu sieve-mode-map - "Sieve Menu." - '("Sieve" - ["Upload script" sieve-upload t] - ["Manage scripts on server" sieve-manage t])) - (provide 'sieve-mode) ;; sieve-mode.el ends here commit edae7d93ed509aa8a7db3952c70550cf3353d169 Author: Paul Eggert Date: Fri May 13 09:51:32 2016 -0700 Remove buggy non-native image scrolling This never worked, and could cause infinite recursion. Problem reported by Glenn Morris (Bug#22465). * lisp/xwidget.el (xwidget-webkit-scroll-behavior): Remove. All uses removed. diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 19f631f..7a0ca8b 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -34,13 +34,6 @@ (require 'cl-lib) (require 'bookmark) -(defcustom xwidget-webkit-scroll-behavior 'native - "Scrolling behavior of the webkit instance. -The possible values are: `native' or `image'." - :version "25.1" - :group 'frames ; TODO add xwidgets group if more options are added - :type '(choice (const native) (const image))) - (declare-function make-xwidget "xwidget.c" (type title width height arguments &optional buffer)) (declare-function xwidget-set-adjustment "xwidget.c" @@ -141,40 +134,24 @@ Interactively, URL defaults to the string looking like a url around point." "Keymap for `xwidget-webkit-mode'.") (defun xwidget-webkit-scroll-up () - "Scroll webkit up. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit up." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50) - (image-scroll-up))) + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)) (defun xwidget-webkit-scroll-down () - "Scroll webkit down. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit down." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50) - (image-scroll-down))) + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)) (defun xwidget-webkit-scroll-forward () - "Scroll webkit forwards. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit forwards." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) - (xwidget-webkit-scroll-forward))) ; FIXME infloop! + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)) (defun xwidget-webkit-scroll-backward () - "Scroll webkit backwards. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit backwards." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) - (xwidget-webkit-scroll-backward))) ; FIXME infloop! + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)) ;; The xwidget event needs to go into a higher level handler @@ -417,9 +394,7 @@ For example, use this to display an anchor." (defun xwidget-webkit-adjust-size-dispatch () "Adjust size according to mode." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-webkit-adjust-size-to-window) - (xwidget-webkit-adjust-size-to-content)) + (xwidget-webkit-adjust-size-to-window) ;; The recenter is intended to correct a visual glitch. ;; It errors out if the buffer isn't visible, but then we don't get ;; the glitch, so silence errors. commit faa8f38502b1c3b09167ab52b07842f44b833dde Author: Paul Eggert Date: Fri May 13 08:37:56 2016 -0700 Tweak check-declare-directory performance * lisp/emacs-lisp/check-declare.el (check-declare-directory): Use ‘find ... -exec ... +’ for speed. diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index b6fa054..bc7b5ae 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -342,7 +342,7 @@ Returns non-nil if any false statements are found." (setq files (process-lines find-program root "-name" "*.el" "-exec" grep-program - "-l" "^[ \t]*(declare-function" "{}" ";")) + "-l" "^[ \t]*(declare-function" "{}" "+")) (message "%s%d found" m2 (length files)) (when files (setq errlist (apply 'check-declare-files files)) commit f791efc057429c6370f02ab34e715ea2872f6cfa Author: Paul Eggert Date: Fri May 13 07:51:45 2016 -0700 Sync from gnulib This incorporates a spelling fix, plus: 2016-05-09 Fix undefined behaviour in gettext.h * lib/gettext.h, lib/mktime.c: Copy from gnulib. diff --git a/lib/gettext.h b/lib/gettext.h index 00af872..9a232cc 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -225,15 +225,17 @@ dcpgettext_expr (const char *domain, if (msg_ctxt_id != NULL) #endif { + int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); + found_translation = (translation != msg_ctxt_id); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif - if (translation != msg_ctxt_id) + if (found_translation) return translation; } return msgid; @@ -271,15 +273,17 @@ dcnpgettext_expr (const char *domain, if (msg_ctxt_id != NULL) #endif { + int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif - if (!(translation == msg_ctxt_id || translation == msgid_plural)) + if (found_translation) return translation; } return (n == 1 ? msgid : msgid_plural); diff --git a/lib/mktime.c b/lib/mktime.c index 419a177..40bc2a3 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -228,7 +228,7 @@ guess_time_tm (long_int year, long_int yday, int hour, int min, int sec, } /* Use CONVERT to convert T to a struct tm value in *TM. T must be in - range for time_t. Return TM if successfull, NULL if T is out of + range for time_t. Return TM if successful, NULL if T is out of range for CONVERT. */ static struct tm * convert_time (struct tm *(*convert) (const time_t *, struct tm *), commit 1adfb5ee55d16cd3d9d78998ae7bbb8e5708d9c5 Merge: 97c05cc 9c2a1a2 Author: Paul Eggert Date: Fri May 13 07:45:30 2016 -0700 Merge from origin/emacs-25 9c2a1a2 * doc/misc/texinfo.tex: Sync from gnulib. 66cd4d8 * lisp/emacs-lisp/find-func.el (find-feature-regexp) (find-al... 1a5a05c Do not mistake colon at the end of regexp for slash symbol 4c5a00b Make package-install-from-buffer not move point 9596ea1 ; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion" f79c352 Redo the fix for bug#21839 8d2f78c Don't treat JS spread as contination method call commit 9c2a1a264cf418fcf187b95b49fe986b32ceabef Author: Paul Eggert Date: Fri May 13 07:41:07 2016 -0700 * doc/misc/texinfo.tex: Sync from gnulib. diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 37e2de8..314063c 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2016-04-14.07} +\def\texinfoversion{2016-05-07.20} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -67,6 +67,10 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} +% LaTeX's \typeout. This ensures that the messages it is used for +% are identical in format to the corresponding ones from latex/pdflatex. +\def\typeout{\immediate\write17}% + \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -1534,7 +1538,6 @@ % % PDF outline support % - \pdfmakepagedesttrue \relax % Emulate the primitive of pdfTeX \def\pdfdest name#1 xyz{% \special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}% @@ -3270,8 +3273,8 @@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. -\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} -\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}} +\def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \begingroup @@ -4753,7 +4756,7 @@ \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} -% Used when writing an index entry out to an index file, to prevent +% Used when writing an index entry out to an index file to prevent % expansion of Texinfo commands that can appear in an index entry. % \def\indexdummies{% @@ -4889,12 +4892,9 @@ % % We want to disable all macros so that they are not expanded by \write. \macrolist + \definedummyword\value % \normalturnoffactive - % - % Handle some cases of @value -- where it does not contain any - % (non-fully-expandable) commands. - \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. @@ -5159,9 +5159,10 @@ \ifx\suffix\indexisfl\def\suffix{f1}\fi % Open the file \immediate\openout\csname#1indfile\endcsname \jobname.\suffix - % Using \immediate here prevents an object entering into the current box, - % which could confound checks such as those in \safewhatsit for preceding - % skips. + % Using \immediate above here prevents an object entering into the current + % box, which could confound checks such as those in \safewhatsit for + % preceding skips. + \typeout{Writing index file \jobname.\suffix}% \fi} \def\indexisfl{fl} @@ -5369,6 +5370,7 @@ % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent + \typeout{No file \jobname.\indexname s.}% \else \catcode`\\ = 0 % @@ -6682,7 +6684,14 @@ % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. - \ifpdf \global\pdfmakepagedesttrue \fi + \ifpdf + \global\pdfmakepagedesttrue + \else + \ifx\XeTeXrevision\thisisundefined + \else + \global\pdfmakepagedesttrue + \fi + \fi } @@ -8862,6 +8871,7 @@ % include an _ in the xref name, etc. \indexnofonts \turnoffactive + \def\value##1{##1}% \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% @@ -9002,14 +9012,14 @@ \fi\fi\fi } -% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. -% If its value is nonempty, SUFFIX is output afterward. -% +% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX +% is output afterwards if non-empty. \def\refx#1#2{% \requireauxfile {% \indexnofonts \otherbackslash + \def\value##1{##1}% \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% @@ -9034,16 +9044,18 @@ #2% Output the suffix in any case. } -% This is the macro invoked by entries in the aux file. Usually it's -% just a \def (we prepend XR to the control sequence name to avoid -% collisions). But if this is a float type, we have more work to do. +% This is the macro invoked by entries in the aux file. Define a control +% sequence for a cross-reference target (we prepend XR to the control sequence +% name to avoid collisions). The value is the page number. If this is a float +% type, we have more work to do. % \def\xrdef#1#2{% - {% The node name might contain 8-bit characters, which in our current - % implementation are changed to commands like @'e. Don't let these - % mess up the control sequence name. + {% Expand the node or anchor name to remove control sequences. + % \turnoffactive stops 8-bit characters being changed to commands + % like @'e. \refx does the same to retrieve the value in the definition. \indexnofonts \turnoffactive + \def\value##1{##1}% \xdef\safexrefname{#1}% }% % commit 97c05cc892af85abd9438d2f685d08c557a0d9fb Author: Chris Feng Date: Fri May 13 11:34:39 2016 +0800 Correct server/client address * src/process.c (Fmake_network_process): :local is for servers and :remote is for clients. diff --git a/src/process.c b/src/process.c index 3e66949..eed875d 100644 --- a/src/process.c +++ b/src/process.c @@ -3652,7 +3652,7 @@ usage: (make-network-process &rest ARGS) */) /* :local ADDRESS or :remote ADDRESS */ tem = Fplist_get (contact, QCserver); - if (!NILP (tem)) + if (NILP (tem)) address = Fplist_get (contact, QCremote); else address = Fplist_get (contact, QClocal); commit 6435f41f6d444243c87b7b52e5e7c0b5a40195ad Author: Ken Brown Date: Thu May 12 15:52:26 2016 -0400 Autosave buffers on logout if HAVE_NTGUI * src/w32fns.c (w32_wnd_proc): Pass a WM_ENDSESSION message on to w32_read_socket. * src/w32term.c (w32_read_socket): Create an event of type END_SESSION_EVENT if a WM_ENDSESSION message is received. * src/termhooks.h [HAVE_NTGUI]: New event kind END_SESSION_EVENT. * src/keyboard.c [HAVE_NTGUI] (syms_of_keyboard): New symbol `end-session'. (kbd_buffer_get_event): Return an end-session event if an event of type END_SESSION_EVENT is read. (keys_of_keyboard): Bind the end-session event to kill-emacs in special-event-map. (Bug#23483) diff --git a/src/keyboard.c b/src/keyboard.c index 92d5c30..fe04b3f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3893,6 +3893,16 @@ kbd_buffer_get_event (KBOARD **kbp, kbd_fetch_ptr = event + 1; } #endif + +#ifdef HAVE_NTGUI + else if (event->kind == END_SESSION_EVENT) + { + /* Make an event (end-session). */ + obj = list1 (Qend_session); + kbd_fetch_ptr = event + 1; + } +#endif + #if defined (HAVE_X11) || defined (HAVE_NTGUI) \ || defined (HAVE_NS) else if (event->kind == ICONIFY_EVENT) @@ -10984,6 +10994,7 @@ syms_of_keyboard (void) #ifdef HAVE_NTGUI DEFSYM (Qlanguage_change, "language-change"); + DEFSYM (Qend_session, "end-session"); #endif #ifdef HAVE_DBUS @@ -11758,6 +11769,10 @@ keys_of_keyboard (void) initial_define_lispy_key (Vspecial_event_map, "delete-frame", "handle-delete-frame"); +#ifdef HAVE_NTGUI + initial_define_lispy_key (Vspecial_event_map, "end-session", + "kill-emacs"); +#endif initial_define_lispy_key (Vspecial_event_map, "ns-put-working-text", "ns-put-working-text"); initial_define_lispy_key (Vspecial_event_map, "ns-unput-working-text", diff --git a/src/termhooks.h b/src/termhooks.h index d21d6ce..ff74d99 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -158,6 +158,9 @@ enum event_kind SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */ BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */ DELETE_WINDOW_EVENT, /* An X client said "delete this window". */ +#ifdef HAVE_NTGUI + END_SESSION_EVENT, /* The user is logging out or shutting down. */ +#endif MENU_BAR_EVENT, /* An event generated by the menu bar. The frame_or_window field's cdr holds the Lisp-level event value. diff --git a/src/w32fns.c b/src/w32fns.c index ede8f6b..7a1f84a 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -4795,6 +4795,11 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) my_post_msg (&wmsg, hwnd, msg, wParam, lParam); return 0; + case WM_ENDSESSION: + my_post_msg (&wmsg, hwnd, msg, wParam, lParam); + /* If we return, the process will be terminated immediately. */ + sleep (1000); + case WM_WINDOWPOSCHANGING: /* Don't restrict the sizing of any kind of frames. If the window manager doesn't, there's no reason to do it ourselves. */ diff --git a/src/w32term.c b/src/w32term.c index 74ea6b5..72e1245 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5260,6 +5260,10 @@ w32_read_socket (struct terminal *terminal, } break; + case WM_ENDSESSION: + inev.kind = END_SESSION_EVENT; + break; + case WM_INITMENU: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); commit ec7a173e03729450bb9117e98d7e696c15994a84 Author: Stefan Monnier Date: Thu May 12 15:50:24 2016 -0400 * lisp/cedet/semantic/{db-el,symref}.el: Mark unused vars * lisp/cedet/semantic/db-el.el: Use _ to mark unused vars. (object-print): Use cl-call-next-method instead of call-next-method. * lisp/cedet/semantic/symref.el: Use _ to mark unused vars. diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index e7858ce..413996a 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -44,19 +44,19 @@ ) "A table for returning search results from Emacs.") -(cl-defmethod semanticdb-refresh-table ((obj semanticdb-table-emacs-lisp) &optional force) +(cl-defmethod semanticdb-refresh-table ((_obj semanticdb-table-emacs-lisp) &optional _force) "Do not refresh Emacs Lisp table. It does not need refreshing." nil) -(cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table-emacs-lisp)) +(cl-defmethod semanticdb-needs-refresh-p ((_obj semanticdb-table-emacs-lisp)) "Return nil, we never need a refresh." nil) (cl-defmethod object-print ((obj semanticdb-table-emacs-lisp) &rest strings) "Pretty printer extension for `semanticdb-table-emacs-lisp'. Adds the number of tags in this file to the object print name." - (apply 'call-next-method obj (cons " (proxy)" strings))) + (apply #'cl-call-next-method obj (cons " (proxy)" strings))) (defclass semanticdb-project-database-emacs-lisp (semanticdb-project-database eieio-singleton) @@ -71,10 +71,10 @@ Adds the number of tags in this file to the object print name." "Pretty printer extension for `semanticdb-table-emacs-lisp'. Adds the number of tags in this file to the object print name." (let ((count 0)) - (mapatoms (lambda (sym) (setq count (1+ count)))) - (apply 'call-next-method obj (cons - (format " (%d known syms)" count) - strings)))) + (mapatoms (lambda (_sym) (setq count (1+ count)))) + (apply #'cl-call-next-method obj (cons + (format " (%d known syms)" count) + strings)))) ;; Create the database, and add it to searchable databases for Emacs Lisp mode. (defvar-mode-local emacs-lisp-mode semanticdb-project-system-databases @@ -103,25 +103,25 @@ Create one of our special tables that can act as an intermediary." )) (cl-call-next-method)) -(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) filename) +(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) _filename) "From OBJ, return FILENAME's associated table object. For Emacs Lisp, creates a specialized table." (car (semanticdb-get-database-tables obj)) ) -(cl-defmethod semanticdb-get-tags ((table semanticdb-table-emacs-lisp )) +(cl-defmethod semanticdb-get-tags ((_table semanticdb-table-emacs-lisp )) "Return the list of tags belonging to TABLE." ;; specialty table ? Probably derive tags at request time. nil) -(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-emacs-lisp) &optional buffer) +(cl-defmethod semanticdb-equivalent-mode ((_table semanticdb-table-emacs-lisp) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." (with-current-buffer buffer (eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode))) -(cl-defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp)) +(cl-defmethod semanticdb-full-filename ((_obj semanticdb-table-emacs-lisp)) "Fetch the full filename that OBJ refers to. For Emacs Lisp system DB, there isn't one." nil) @@ -151,7 +151,7 @@ If Emacs cannot resolve this symbol to a particular file, then return nil." 'defvar) )) (sym (intern (semantic-tag-name tag))) - (file (condition-case err + (file (condition-case nil (symbol-file sym type) ;; Older [X]Emacs don't have a 2nd argument. (error (symbol-file sym)))) @@ -169,7 +169,6 @@ If Emacs cannot resolve this symbol to a particular file, then return nil." (setq file (concat file ".gz")))) (let* ((tab (semanticdb-file-table-object file)) - (alltags (when tab (semanticdb-get-tags tab))) (newtags (when tab (semanticdb-find-tags-by-name-method tab (semantic-tag-name tag)))) (match nil)) @@ -248,7 +247,7 @@ TOKTYPE is a hint to the type of tag desired." "Variable used to collect `mapatoms' output.") (cl-defmethod semanticdb-find-tags-by-name-method - ((table semanticdb-table-emacs-lisp) name &optional tags) + ((_table semanticdb-table-emacs-lisp) name &optional tags) "Find all tags named NAME in TABLE. Uses `intern-soft' to match NAME to Emacs symbols. Return a list of tags." @@ -269,26 +268,26 @@ Return a list of tags." )))) (cl-defmethod semanticdb-find-tags-by-name-regexp-method - ((table semanticdb-table-emacs-lisp) regex &optional tags) + ((_table semanticdb-table-emacs-lisp) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Uses `apropos-internal' to find matches. Return a list of tags." (if tags (cl-call-next-method) - (delq nil (mapcar 'semanticdb-elisp-sym->tag + (delq nil (mapcar #'semanticdb-elisp-sym->tag (apropos-internal regex))))) (cl-defmethod semanticdb-find-tags-for-completion-method - ((table semanticdb-table-emacs-lisp) prefix &optional tags) + ((_table semanticdb-table-emacs-lisp) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." (if tags (cl-call-next-method) - (delq nil (mapcar 'semanticdb-elisp-sym->tag + (delq nil (mapcar #'semanticdb-elisp-sym->tag (all-completions prefix obarray))))) (cl-defmethod semanticdb-find-tags-by-class-method - ((table semanticdb-table-emacs-lisp) class &optional tags) + ((_table semanticdb-table-emacs-lisp) _class &optional tags) "In TABLE, find all occurrences of tags of CLASS. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." @@ -323,7 +322,7 @@ Like `semanticdb-find-tags-for-completion-method' for Emacs Lisp." ;;; Advanced Searches ;; (cl-defmethod semanticdb-find-tags-external-children-of-type-method - ((table semanticdb-table-emacs-lisp) type &optional tags) + ((_table semanticdb-table-emacs-lisp) type &optional tags) "Find all nonterminals which are child elements of TYPE Optional argument TAGS is a list of tags to search. Return a list of tags." @@ -333,7 +332,7 @@ Return a list of tags." (let* ((class (intern-soft type)) (taglst (when class (delq nil - (mapcar 'semanticdb-elisp-sym->tag + (mapcar #'semanticdb-elisp-sym->tag ;; Fancy eieio function that knows all about ;; built in methods belonging to CLASS. (cl-generic-all-functions class))))) diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index a03e99b..0c1fe7e 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -338,7 +338,7 @@ The symref TOOL should already contain the search criteria." ) )) -(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) +(cl-defmethod semantic-symref-perform-search ((_tool semantic-symref-tool-baseclass)) "Base search for symref tools should throw an error." (error "Symref tool objects must implement `semantic-symref-perform-search'")) @@ -356,7 +356,7 @@ over until it returns nil." (nreverse result))) ) -(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) +(cl-defmethod semantic-symref-parse-tool-output-one-line ((_tool semantic-symref-tool-baseclass)) "Base tool output parser is not implemented." (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) @@ -479,8 +479,7 @@ If there is no database, of if the searchtype is wrong, return nil." ;; tagname, tagregexp, tagcompletions (if (not (memq searchtype '(tagname tagregexp tagcompletions))) nil - (let* ((line (car hit)) - (file (cdr hit)) + (let* ((file (cdr hit)) ;; FAIL here vv - don't load is not obeyed if no table found. (db (semanticdb-file-table-object file t)) (found commit 66cd4d8bd031fb5cb1c65e3b008681021ea32906 Author: Glenn Morris Date: Thu May 12 10:35:27 2016 -0700 * lisp/emacs-lisp/find-func.el (find-feature-regexp) (find-alias-regexp): Fix :version. diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 0575ce4..f174a64 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -111,7 +111,7 @@ should insert the feature name." ;; (point-min), which is acceptable in this case. :type 'regexp :group 'xref - :version "25.0") + :version "25.1") (defcustom find-alias-regexp "(defalias +'%s" @@ -120,7 +120,7 @@ Note it must contain a `%s' at the place where `format' should insert the feature name." :type 'regexp :group 'xref - :version "25.0") + :version "25.1") (defvar find-function-regexp-alist '((nil . find-function-regexp) commit 28e8e49e08c19dd8f23aca4293d9cccc9477f2bf Author: Stefan Monnier Date: Thu May 12 13:08:34 2016 -0400 * lisp/cedet/semantic: Silence some warnings * lisp/cedet/semantic/db-el.el (emacs-lisp-mode) (semanticdb-get-database-tables): Use make-instance to silence warnings. * lisp/cedet/semantic/symref.el: Require semantic/find since we use some macros from there. Silence compilation warnings: Replace initargs with slot names in oref/oset. Move `SYMREF TOOLS' section earlier so definitions precede their use. diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index a85b902..e7858ce 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -79,7 +79,7 @@ Adds the number of tags in this file to the object print name." ;; Create the database, and add it to searchable databases for Emacs Lisp mode. (defvar-mode-local emacs-lisp-mode semanticdb-project-system-databases (list - (semanticdb-project-database-emacs-lisp "Emacs")) + (make-instance 'semanticdb-project-database-emacs-lisp)) "Search Emacs core for symbols.") (defvar-mode-local emacs-lisp-mode semanticdb-find-default-throttle @@ -96,7 +96,7 @@ Create one of our special tables that can act as an intermediary." ;; We need to return something since there is always the "master table" ;; The table can then answer file name type questions. (when (not (slot-boundp obj 'tables)) - (let ((newtable (semanticdb-table-emacs-lisp "Emacs System Table"))) + (let ((newtable (make-instance 'semanticdb-table-emacs-lisp))) (oset obj tables (list newtable)) (oset newtable parent-db obj) (oset newtable tags nil) diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index 8b3196a..a03e99b 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -65,6 +65,8 @@ ;; Your tool should then create an instance of `semantic-symref-result'. (require 'semantic) +(eval-when-compile (require 'semantic/find)) ;For semantic-find-tags-* +(eval-when-compile (require 'ede/proj)) ;For `metasubproject' warning. (defvar ede-minor-mode) (declare-function data-debug-new-buffer "data-debug") @@ -109,7 +111,7 @@ Start with an EDE project, or use the default directory." default-directory))) (if (and rootproj (condition-case nil ;; Hack for subprojects. - (oref rootproj :metasubproject) + (oref rootproj metasubproject) (error nil))) (ede-up-directory rootdirbase) rootdirbase))) @@ -284,6 +286,80 @@ Returns an object of class `semantic-symref-result'." (semantic-symref-data-debug-last-result)))) ) +;;; SYMREF TOOLS +;; +;; The base symref tool provides something to hang new tools off of +;; for finding symbol references. +(defclass semantic-symref-tool-baseclass () + ((searchfor :initarg :searchfor + :type string + :documentation "The thing to search for.") + (searchtype :initarg :searchtype + :type symbol + :documentation "The type of search to do. +Values could be 'symbol, 'regexp, 'tagname, or 'completion.") + (searchscope :initarg :searchscope + :type symbol + :documentation + "The scope to search for. +Can be 'project, 'target, or 'file.") + (resulttype :initarg :resulttype + :type symbol + :documentation + "The kind of search results desired. +Can be 'line, 'file, or 'tag. +The type of result can be converted from 'line to 'file, or 'line to 'tag, +but not from 'file to 'line or 'tag.") + ) + "Baseclass for all symbol references tools. +A symbol reference tool supplies functionality to identify the locations of +where different symbols are used. + +Subclasses should be named `semantic-symref-tool-NAME', where +NAME is the name of the tool used in the configuration variable +`semantic-symref-tool'" + :abstract t) + +(cl-defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) + "Calculate the results of a search based on TOOL. +The symref TOOL should already contain the search criteria." + (let ((answer (semantic-symref-perform-search tool)) + ) + (when answer + (let ((answersym (if (eq (oref tool resulttype) 'file) + :hit-files + (if (stringp (car answer)) + :hit-text + :hit-lines)))) + (semantic-symref-result (oref tool searchfor) + answersym + answer + :created-by tool)) + ) + )) + +(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) + "Base search for symref tools should throw an error." + (error "Symref tool objects must implement `semantic-symref-perform-search'")) + +(cl-defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) + outputbuffer) + "Parse the entire OUTPUTBUFFER of a symref tool. +Calls the method `semantic-symref-parse-tool-output-one-line' over and +over until it returns nil." + (with-current-buffer outputbuffer + (goto-char (point-min)) + (let ((result nil) + (hit nil)) + (while (setq hit (semantic-symref-parse-tool-output-one-line tool)) + (setq result (cons hit result))) + (nreverse result))) + ) + +(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) + "Base tool output parser is not implemented." + (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) + ;;; RESULTS ;; ;; The results class and methods provide features for accessing hits. @@ -316,9 +392,9 @@ Use the `semantic-symref-hit-tags' method to get this list.") (cl-defmethod semantic-symref-result-get-files ((result semantic-symref-result)) "Get the list of files from the symref result RESULT." - (if (slot-boundp result :hit-files) + (if (slot-boundp result 'hit-files) (oref result hit-files) - (let* ((lines (oref result :hit-lines)) + (let* ((lines (oref result hit-lines)) (files (mapcar (lambda (a) (cdr a)) lines)) (ans nil)) (setq ans (list (car files)) @@ -359,12 +435,12 @@ Optional OPEN-BUFFERS indicates that the buffers that the hits are in should remain open after scanning. Note: This can be quite slow if most of the hits are not in buffers already." - (if (and (slot-boundp result :hit-tags) (oref result hit-tags)) + (if (and (slot-boundp result 'hit-tags) (oref result hit-tags)) (oref result hit-tags) ;; Calculate the tags. - (let ((lines (oref result :hit-lines)) - (txt (oref (oref result :created-by) :searchfor)) - (searchtype (oref (oref result :created-by) :searchtype)) + (let ((lines (oref result hit-lines)) + (txt (oref (oref result created-by) searchfor)) + (searchtype (oref (oref result created-by) searchtype)) (ans nil) (out nil)) (save-excursion @@ -390,7 +466,7 @@ already." (semantic--tag-put-property (car out) :hit lines))) )) ;; Out is reversed... twice - (oset result :hit-tags (nreverse out))))) + (oset result hit-tags (nreverse out))))) (defun semantic-symref-hit-to-tag-via-db (hit searchtxt searchtype) "Convert the symref HIT into a TAG by looking up the tag via a database. @@ -407,16 +483,15 @@ If there is no database, of if the searchtype is wrong, return nil." (file (cdr hit)) ;; FAIL here vv - don't load is not obeyed if no table found. (db (semanticdb-file-table-object file t)) - (found nil) + (found + (cond ((eq searchtype 'tagname) + (semantic-find-tags-by-name searchtxt db)) + ((eq searchtype 'tagregexp) + (semantic-find-tags-by-name-regexp searchtxt db)) + ((eq searchtype 'tagcompletions) + (semantic-find-tags-for-completion searchtxt db)))) (hit nil) ) - (cond ((eq searchtype 'tagname) - (setq found (semantic-find-tags-by-name searchtxt db))) - ((eq searchtype 'tagregexp) - (setq found (semantic-find-tags-by-name-regexp searchtxt db))) - ((eq searchtype 'tagcompletions) - (setq found (semantic-find-tags-for-completion searchtxt db))) - ) ;; Loop over FOUND to see if we can line up a match with a line number. (when (= (length found) 1) (setq hit (car found))) @@ -501,80 +576,6 @@ buffers that were opened." (semantic--tag-put-property tag :hit (list line))) tag)) -;;; SYMREF TOOLS -;; -;; The base symref tool provides something to hang new tools off of -;; for finding symbol references. -(defclass semantic-symref-tool-baseclass () - ((searchfor :initarg :searchfor - :type string - :documentation "The thing to search for.") - (searchtype :initarg :searchtype - :type symbol - :documentation "The type of search to do. -Values could be 'symbol, 'regexp, 'tagname, or 'completion.") - (searchscope :initarg :searchscope - :type symbol - :documentation - "The scope to search for. -Can be 'project, 'target, or 'file.") - (resulttype :initarg :resulttype - :type symbol - :documentation - "The kind of search results desired. -Can be 'line, 'file, or 'tag. -The type of result can be converted from 'line to 'file, or 'line to 'tag, -but not from 'file to 'line or 'tag.") - ) - "Baseclass for all symbol references tools. -A symbol reference tool supplies functionality to identify the locations of -where different symbols are used. - -Subclasses should be named `semantic-symref-tool-NAME', where -NAME is the name of the tool used in the configuration variable -`semantic-symref-tool'" - :abstract t) - -(cl-defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) - "Calculate the results of a search based on TOOL. -The symref TOOL should already contain the search criteria." - (let ((answer (semantic-symref-perform-search tool)) - ) - (when answer - (let ((answersym (if (eq (oref tool :resulttype) 'file) - :hit-files - (if (stringp (car answer)) - :hit-text - :hit-lines)))) - (semantic-symref-result (oref tool searchfor) - answersym - answer - :created-by tool)) - ) - )) - -(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) - "Base search for symref tools should throw an error." - (error "Symref tool objects must implement `semantic-symref-perform-search'")) - -(cl-defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) - outputbuffer) - "Parse the entire OUTPUTBUFFER of a symref tool. -Calls the method `semantic-symref-parse-tool-output-one-line' over and -over until it returns nil." - (with-current-buffer outputbuffer - (goto-char (point-min)) - (let ((result nil) - (hit nil)) - (while (setq hit (semantic-symref-parse-tool-output-one-line tool)) - (setq result (cons hit result))) - (nreverse result))) - ) - -(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) - "Base tool output parser is not implemented." - (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) - (provide 'semantic/symref) ;; Local variables: commit 73071b4cdb45deb27052788c5c928ab809e878e0 Author: Lars Ingebrigtsen Date: Thu May 12 17:45:17 2016 +0200 Support srcset in * lisp/net/shr.el (shr--preferred-image): Allow tags with srcset specifiers (bug#23459). diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 1bc9105..d91b00c 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1445,13 +1445,14 @@ The preference is a float determined from `shr-prefer-media-type'." (defun shr-tag-img (dom &optional url) (when (or url (and dom - (> (length (dom-attr dom 'src)) 0))) + (or (> (length (dom-attr dom 'src)) 0) + (> (length (dom-attr dom 'srcset)) 0)))) (when (> (current-column) 0) (insert "\n")) (let ((alt (dom-attr dom 'alt)) (width (shr-string-number (dom-attr dom 'width))) (height (shr-string-number (dom-attr dom 'height))) - (url (shr-expand-url (or url (dom-attr dom 'src))))) + (url (shr-expand-url (or url (shr--preferred-image dom))))) (let ((start (point-marker))) (when (zerop (length alt)) (setq alt "*")) @@ -1511,6 +1512,43 @@ The preference is a float determined from `shr-prefer-media-type'." (shr-fill-text (or (dom-attr dom 'title) alt)))))))) +(defun shr--preferred-image (dom) + (let ((srcset (dom-attr dom 'srcset)) + (frame-width (frame-pixel-width)) + (width (string-to-number (or (dom-attr dom 'width) "100"))) + candidate) + (when (> (length srcset) 0) + ;; srcset consist of a series of URL/size specifications + ;; separated by the ", " string. + (setq srcset + (sort (mapcar + (lambda (elem) + (let ((spec (split-string elem " "))) + (cond + ((= (length spec) 1) + ;; Make sure it's well formed. + (list (car spec) 0)) + ((string-match "\\([0-9]+\\)x\\'" (cadr spec)) + ;; If we have an "x" form, then use the width + ;; spec to compute the real width. + (list (car spec) + (* width (string-to-number + (match-string 1 (cadr spec)))))) + (t + (list (car spec) + (string-to-number (cadr spec))))))) + (split-string srcset ", ")) + (lambda (e1 e2) + (> (cadr e1) (cadr e2))))) + ;; Choose the smallest picture that's bigger than the current + ;; frame. + (setq candidate (caar srcset)) + (while (and srcset + (> (cadr (car srcset)) frame-width)) + (setq candidate (caar srcset)) + (pop srcset))) + (or candidate (dom-attr dom 'src)))) + (defun shr-string-number (string) (if (null string) nil commit 9872736ab7ada8132ebeafa8a699faf93772d7b4 Author: Michael Albinus Date: Thu May 12 13:01:11 2016 +0200 Do not autoload some functions of tramp.el * lisp/net/tramp.el (tramp-completion-file-name-handler): Autoload a shortened version of this function, avoid recursive load. (tramp-completion-file-name-handler-alist) (tramp-completion-mode-p) (tramp-completion-handle-expand-file-name) (tramp-completion-handle-file-name-all-completions) (tramp-completion-handle-file-name-completion): Do not autoload. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 41d67d4..d6911de 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1008,7 +1008,6 @@ means to use always cached values for the directory contents." (defvar tramp-current-connection nil "Last connection timestamp.") -;;;###autoload (defconst tramp-completion-file-name-handler-alist '((expand-file-name . tramp-completion-handle-expand-file-name) (file-name-all-completions @@ -2241,8 +2240,7 @@ should never be set globally, the intention is to let-bind it.") ;; Tramp file name syntax. Maybe another variable should be introduced ;; overwriting this check in such cases. Or we change Tramp file name ;; syntax in order to avoid ambiguities. -;;;###autoload -(progn (defun tramp-completion-mode-p () +(defun tramp-completion-mode-p () "Check, whether method / user name / host name completion is active." (or ;; Signal from outside. `non-essential' has been introduced in Emacs 24. @@ -2255,7 +2253,7 @@ should never be set globally, the intention is to let-bind it.") (equal last-input-event ?\t) (and (not (event-modifiers last-input-event)) (or (equal last-input-event ?\?) - (equal last-input-event ?\ )))))))) + (equal last-input-event ?\ ))))))) (defun tramp-connectable-p (filename) "Check, whether it is possible to connect the remote host w/o side-effects. @@ -2268,7 +2266,6 @@ not in completion mode." (p (tramp-get-connection-process v))) (and p (processp p) (memq (process-status p) '(run open)))))))) -;;;###autoload (defun tramp-completion-handle-expand-file-name (name &optional dir) "Like `expand-file-name' for Tramp files." @@ -2288,7 +2285,6 @@ not in completion mode." ;; Method, host name and user name completion. ;; `tramp-completion-dissect-file-name' returns a list of ;; tramp-file-name structures. For all of them we return possible completions. -;;;###autoload (defun tramp-completion-handle-file-name-all-completions (filename directory) "Like `file-name-all-completions' for partial Tramp files." @@ -2361,7 +2357,6 @@ not in completion mode." 'file-name-all-completions (list (list filename directory))))))) ;; Method, host name and user name completion for a file. -;;;###autoload (defun tramp-completion-handle-file-name-completion (filename directory &optional predicate) "Like `file-name-completion' for Tramp files." commit a8be7c1ec40c9fab3407a0bc59e20141364e231f Author: Michael Albinus Date: Thu May 12 10:57:10 2016 +0200 Avoid recursive load of tramp.el * lisp/net/tramp.el (tramp-completion-file-name-handler): Autoload a shortened version of this function, avoid recursive load. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6f30f39..41d67d4 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2104,8 +2104,11 @@ preventing reentrant calls of Tramp.") Together with `tramp-locked', this implements a locking mechanism preventing reentrant calls of Tramp.") -;;;###autoload -(progn (defun tramp-completion-file-name-handler (operation &rest args) +;; Avoid recursive loading of tramp.el. +;;;###autoload(defun tramp-completion-file-name-handler (operation &rest args) +;;;###autoload (tramp-completion-run-real-handler operation args)) + +(defun tramp-completion-file-name-handler (operation &rest args) "Invoke Tramp file name completion handler. Falls back to normal file name handler if no Tramp file name handler exists." (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) @@ -2127,7 +2130,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." (featurep 'ido) (featurep 'icicles))) (save-match-data (apply (cdr fn) args)) - (tramp-completion-run-real-handler operation args))))) + (tramp-completion-run-real-handler operation args)))) ;;;###autoload (progn (defun tramp-autoload-file-name-handler (operation &rest args) commit 1a5a05cf6f68277c142fe3753581d3b0c6470156 Author: Dmitry Gutov Date: Thu May 12 03:18:45 2016 +0300 Do not mistake colon at the end of regexp for slash symbol * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize): Check the parse state in the "Symbols with special characters" rule (bug#23515). diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 972bf99..cd3b04d 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1858,7 +1858,9 @@ It will be properly highlighted even when the call omits parens.") (string-to-syntax "'")))) ;; Symbols with special characters. ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)\\)" - (3 (string-to-syntax "_"))) + (3 (unless (nth 8 (syntax-ppss (match-beginning 3))) + (goto-char (match-end 0)) + (string-to-syntax "_")))) ;; Part of method name when at the end of it. ("[!?]" (0 (unless (save-excursion diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 7e85fb8..52126a3 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el @@ -146,6 +146,9 @@ VALUES-PLIST is a list with alternating index and value elements." (ert-deftest ruby-slash-char-literal-is-not-mistaken-for-regexp () (ruby-assert-state "?/" 3 nil)) +(ert-deftest ruby-regexp-is-not-mistaken-for-slash-symbol () + (ruby-assert-state "x = /foo:/" 3 nil)) + (ert-deftest ruby-indent-simple () (ruby-should-indent-buffer "if foo commit 4c5a00b09f9aed267d60ef9741a6bee206728d10 Author: Dmitry Gutov Date: Thu May 12 01:29:03 2016 +0300 Make package-install-from-buffer not move point * lisp/emacs-lisp/package.el (package-install-from-buffer): Use save-excursion here (bug#22616). diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 3f0e972..5371f0b 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1989,7 +1989,8 @@ Downloads and installs required packages as needed." ((derived-mode-p 'tar-mode) (package-tar-file-info)) (t - (package-buffer-info)))) + (save-excursion + (package-buffer-info))))) (name (package-desc-name pkg-desc))) ;; Download and install the dependencies. (let* ((requires (package-desc-reqs pkg-desc)) commit 9596ea1534d0c5146be5c1a58d0c5a70f56b44c3 Author: Dmitry Gutov Date: Thu May 12 01:18:38 2016 +0300 ; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion" This reverts commit bf3f6a961f378f35a292c41c0bfbdae88ee1b1b9. (Bug#22616) diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 7d5b7dc..46373da 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -265,17 +265,16 @@ a section." (defun lm-header (header) "Return the contents of the header named HEADER." - (save-excursion - (goto-char (point-min)) - (let ((case-fold-search t)) - (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) - ;; RCS ident likes format "$identifier: data$" - (looking-at - (if (save-excursion - (skip-chars-backward "^$" (match-beginning 0)) - (= (point) (match-beginning 0))) - "[^\n]+" "[^$\n]+"))) - (match-string-no-properties 0))))) + (goto-char (point-min)) + (let ((case-fold-search t)) + (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) + ;; RCS ident likes format "$identifier: data$" + (looking-at + (if (save-excursion + (skip-chars-backward "^$" (match-beginning 0)) + (= (point) (match-beginning 0))) + "[^\n]+" "[^$\n]+"))) + (match-string-no-properties 0)))) (defun lm-header-multiline (header) "Return the contents of the header named HEADER, with continuation lines. commit f79c3523354e45e2dbc97bb92718c9941c1a1a3b Author: Dmitry Gutov Date: Thu May 12 00:48:37 2016 +0300 Redo the fix for bug#21839 * lisp/help.el (help-add-fundoc-usage): Undo the previous change. (help--make-usage-docstring): Escape newlines when printing. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Ditto (bug#21839). diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index ae52e8b..68abe67 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -299,7 +299,8 @@ FORM is of the form (ARGS . BODY)." ;; Be careful with make-symbol and (back)quote, ;; see bug#12884. (help--docstring-quote - (let ((print-gensym nil) (print-quoted t)) + (let ((print-gensym nil) (print-quoted t) + (print-escape-newlines t)) (format "%S" (cons 'fn (cl--make-usage-args orig-args)))))) header))) diff --git a/lisp/help.el b/lisp/help.el index 7289375..57f358b 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1395,7 +1395,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "") "\n\n") (if (stringp arglist) - (if (string-match "\\`[^ ]+\\(\\(?:.\\|\n\\)*\\))\\'" arglist) + (if (string-match "\\`[^ ]+\\(.*\\))\\'" arglist) (concat "(fn" (match-string 1 arglist) ")") (error "Unrecognized usage format")) (help--make-usage-docstring 'fn arglist))))) @@ -1468,7 +1468,8 @@ the same names as used in the original source code, when possible." (define-obsolete-function-alias 'help-make-usage 'help--make-usage "25.1") (defun help--make-usage-docstring (fn arglist) - (help--docstring-quote (format "%S" (help--make-usage fn arglist)))) + (let ((print-escape-newlines t)) + (help--docstring-quote (format "%S" (help--make-usage fn arglist))))) (provide 'help) commit d32f204856958f2e2412550da17de4e976aa0074 Author: Michael Albinus Date: Wed May 11 16:50:56 2016 +0200 ; Remove instrumentation of tramp.el diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 9f67855..6f30f39 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2846,20 +2846,6 @@ User is always nil." (let ((v (tramp-dissect-file-name file t))) ;; Run the command on the localname portion only unless we are in ;; completion mode. - (when (getenv "NIX_STORE") - (message - "tramp-handle-file-name-as-directory file %s tramp-completion-mode-p %s result %s" - file (tramp-completion-mode-p) - (tramp-make-tramp-file-name - (tramp-file-name-method v) - (tramp-file-name-user v) - (tramp-file-name-host v) - (if (and (tramp-completion-mode-p) - (zerop (length (tramp-file-name-localname v)))) - "" - (tramp-run-real-handler - 'file-name-as-directory (list (or (tramp-file-name-localname v) "")))) - (tramp-file-name-hop v)))) (tramp-make-tramp-file-name (tramp-file-name-method v) (tramp-file-name-user v) commit 4c7f32977c4fad322a80e33a2e397aa8496ed9ba Author: Michael Albinus Date: Wed May 11 16:45:39 2016 +0200 ; Remove instrumentation of tramp-tests.el diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 2238da5..6553421 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -639,34 +639,24 @@ This checks also `file-name-as-directory', `file-name-directory', (should-not (unhandled-file-name-directory "/method:host:/path/to/file")) - (unwind-protect ;; Bug#10085. (dolist (n-e '(nil t)) ;; We must clear `tramp-default-method'. On hydra, it is "ftp", ;; which ruins the tests. (let ((non-essential n-e) tramp-default-method) - (when (getenv "NIX_STORE") - (dolist (elt (all-completions "tramp-" obarray 'functionp)) - (trace-function-background (intern elt)))) (dolist (file `(,(file-remote-p tramp-test-temporary-file-directory 'method) ,(file-remote-p tramp-test-temporary-file-directory 'host))) (unless (zerop (length file)) (setq file (format "/%s:" file)) (should (string-equal (directory-file-name file) file)) - (when (getenv "NIX_STORE") - (message "file %s non-essential %s tramp-completion-mode-p %s" - file non-essential (tramp-completion-mode-p))) (should (string-equal (file-name-as-directory file) (if (tramp-completion-mode-p) file (concat file "./")))) (should (string-equal (file-name-directory file) file)) - (should (string-equal (file-name-nondirectory file) "")))))) - (when (getenv "NIX_STORE") - (untrace-all) - (message "%s" (with-current-buffer trace-buffer (buffer-string)))))) + (should (string-equal (file-name-nondirectory file) ""))))))) (ert-deftest tramp-test07-file-exists-p () "Check `file-exist-p', `write-region' and `delete-file'." commit 8d2f78c421c73730f344dbf71dbed61d5ef8e46d Author: Dmitry Gutov Date: Wed May 11 02:26:54 2016 +0300 Don't treat JS spread as contination method call * lisp/progmodes/js.el (js--indent-operator-re): Allow only one dot (bug#23492). * test/indent/js.js (default): Add a corresponding example. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 48eb3e7..f024d39 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1744,7 +1744,7 @@ This performs fontification according to `js--class-styles'." "Regular expression matching variable declaration keywords.") (defconst js--indent-operator-re - (concat "[-+*/%<>&^|?:.]\\([^-+*/]\\|$\\)\\|!?=\\|" + (concat "[-+*/%<>&^|?:.]\\([^-+*/.]\\|$\\)\\|!?=\\|" (js--regexp-opt-symbol '("in" "instanceof"))) "Regexp matching operators that affect indentation of continued expressions.") diff --git a/test/indent/js.js b/test/indent/js.js index 23fae17..b40d47b 100644 --- a/test/indent/js.js +++ b/test/indent/js.js @@ -103,6 +103,12 @@ Foobar console.log(num); }); +var z = [ + ...iterableObj, + 4, + 5 +] + var arr = [ -1, 2, -3, 4 +