1. 26 Jan, 2017 4 commits
    • Paul Eggert's avatar
      Replace QUIT with maybe_quit · b3a3ed52
      Paul Eggert authored
      There’s no longer need to have QUIT stand for a slug of C statements.
      Use the more-obvious function-call syntax instead.
      Also, use true and false when setting immediate_quit.
      These changes should not affect the generated machine code.
      * src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
      b3a3ed52
    • Paul Eggert's avatar
      A quicker check for quit · 1392ec74
      Paul Eggert authored
      On some microbenchmarks this lets Emacs run 60% faster on my
      platform (AMD Phenom II X4 910e, Fedora 25 x86-64).
      * src/atimer.c: Include keyboard.h, for pending_signals.
      * src/editfns.c (Fcompare_buffer_substrings):
      * src/fns.c (Fnthcdr, Fmemq, Fmemql, Fassq, Frassq, Fplist_put)
      (Fnconc, Fplist_member):
      Set and clear immediate_quit before and after loop instead of
      executing QUIT each time through the loop.  This is OK for loops
      that affect only locals.
      * src/eval.c (process_quit_flag): Now static.
      (maybe_quit): New function, containing QUIT’s old body.
      * src/fns.c (rarely_quit): New function.
      (Fmember, Fassoc, Frassoc, Fdelete, Fnreverse, Freverse)
      (Flax_plist_get, Flax_plist_put, internal_equal, Fnconc):
      Use it instead of QUIT, for
      speed in tight loops that might modify non-locals.
      * src/keyboard.h (pending_signals, process_pending_signals):
      These belong to keyboard.c, so move them here ...
      * src/lisp.h: ... from here.
      (QUIT): Redefine in terms of the new maybe_quit function, which
      contains this macro’s old definiens.  This works well with branch
      prediction on processors with return stack buffers, e.g., x86
      other than the original Pentium.
      1392ec74
    • Paul Eggert's avatar
      Simplify make-list implementation · 0dfd9a69
      Paul Eggert authored
      * src/alloc.c (Fmake_list): Don’t unroll loop, as the complexity
      is not worth it these days.
      0dfd9a69
    • Mark Oteiza's avatar
      Make use of cl-loop destructuring · 44765de2
      Mark Oteiza authored
      * lisp/progmodes/js.el (js--get-tabs): Replace extraneous bits with
      destructuring.
      (with-js): Add declare forms.
      44765de2
  2. 25 Jan, 2017 19 commits
    • Lars Ingebrigtsen's avatar
      Revert "Bind C-c keys in the article buffer" · d32dfc2c
      Lars Ingebrigtsen authored
      This reverts commit 6b4195f2.
      
      The commit somehow lead to problems in other parts of Emacs.
      d32dfc2c
    • Eli Zaretskii's avatar
    • Lars Ingebrigtsen's avatar
      Document how to quote MML tags · 097b1686
      Lars Ingebrigtsen authored
      * doc/misc/emacs-mime.texi (MML Definition): Mention how to
      quote MML tags (bug#18881).
      097b1686
    • Lars Ingebrigtsen's avatar
      Make address parsing more robust · 27accec9
      Lars Ingebrigtsen authored
      * lisp/mail/ietf-drums.el (ietf-drums-parse-address): Don't
      bug out on addresses like
      (ietf-drums-parse-address "\"Foo \"bar\" <larsi@gnus.org>")
      (bug#18572).
      27accec9
    • Lars Ingebrigtsen's avatar
      Fix the %P (line number) thing in Gnus summary buffers · e0e95199
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-salt.el (gnus-pick-line-number): Remove hack.
      
      * lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Reset the
      "pick" mode line number on entry instead of relying in a hack (bug#18311).
      e0e95199
    • Lars Ingebrigtsen's avatar
      Fix wrong documentation on nnmairix keystrokes · 36cbe217
      Lars Ingebrigtsen authored
      * doc/misc/gnus.texi (nnmairix keyboard shortcuts): The
      nnmairix commands are on G G, not $ (bug#18260).
      36cbe217
    • Lars Ingebrigtsen's avatar
      Bind C-c keys in the article buffer · 6b4195f2
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-art.el (gnus-article-mode-map): Also bind the
      C-c keys so that they execute in the summary buffer
      (bug#18257).  This makes commands like `C-c C-f' work from the
      article buffer.
      6b4195f2
    • Lars Ingebrigtsen's avatar
      Don't mark articles in Gnus as displayed when they aren't · c5442ada
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Don't
      mark any articles as selected if we're not selecting any
      articles (bug#18255).
      c5442ada
    • Mark Oteiza's avatar
      Move cXXXr and cXXXXr to subr.el · 43eba495
      Mark Oteiza authored
      * etc/NEWS: Mention new core Elisp.
      * doc/lispref/lists.texi (List Elements): Document and index the new
      functions.
      * doc/misc/cl.texi (List Functions): Change "defines" to "aliases".
      * lisp/subr.el (caaar, caadr, cadar, caddr, cdaar, cdadr, cddar)
      (cdddr, caaaar caaadr, caadar, caaddr, cadaar, cadadr, caddar):
      (cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar):
      (cddddr): New functions.
      * lisp/emacs-lisp/cl-lib.el (cl-caaar, cl-caadr, cl-cadar, cl-caddr):
      (cl-cdaar, cl-cdadr, cl-cddar cl-cdddr, cl-caaaar cl-caaadr):
      (cl-caadar, cl-caaddr, cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr):
      (cl-cdaaar, cl-cdaadr, cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr):
      (cl-cdddar, cl-cddddr): Alias to new subr functions.
      * lisp/emacs-lisp/cl.el (cl-unload-function): Remove cXXXr and cXXXXr
      elements.
      43eba495
    • Lars Ingebrigtsen's avatar
      Only save .newsrc file if the native method is NNTP · ff9ccf68
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Only save
      the .newsrc file if the native select method is NNTP
      (bug#18198).  This avoids problems with invalid IMAP group
      names and the like in the .newsrc file.
      ff9ccf68
    • Lars Ingebrigtsen's avatar
      Only save .newsrc file if the native method is NNTP · 544b9969
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Only save
      the .newsrc file if the native select method is NNTP
      (bug#18198).  This avoids problems with invalid IMAP group
      names and the like in the .newsrc file.
      544b9969
    • Lars Ingebrigtsen's avatar
      Gnus custom spec fix · 7a7c0b17
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-art.el (gnus-signature-limit): Fix customize
      spec to match the doc string (bug#17679).
      7a7c0b17
    • Lars Ingebrigtsen's avatar
      Clarify confusing Gnus error message · 87e2657b
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-topic.el (gnus-topic-unindent): Clarify
      confusing error message (bug#17677).
      87e2657b
    • Lars Ingebrigtsen's avatar
      Make C-u C-x m work with Message as documented · 00591a8e
      Lars Ingebrigtsen authored
      * lisp/gnus/message.el (message-mail): Respect the CONTINUE
      parameter (bug#17175).
      00591a8e
    • Lars Ingebrigtsen's avatar
      Fix problem with auto-mode and dir-locals-collect-variables · 82b6b3cf
      Lars Ingebrigtsen authored
      * lisp/files.el (dir-locals-collect-variables): When run from
      auto-mode, the file in question may not be an absolute path
      name (bug#24016).
      
      Example backtrace:
      
      Debugger entered--Lisp error: (args-out-of-range "compile-1st-in-loa
        dir-locals-collect-variables(((emacs-lisp-mode (indent-tabs-mode))
        hack-dir-local-variables()
        hack-local-variables(no-mode)
        run-mode-hooks(diff-mode-hook)
        diff-mode()
        mm-display-inline-fontify((#<buffer  *mm*-923037> ("text/x-diff" (
      82b6b3cf
    • Lars Ingebrigtsen's avatar
      Attach text files correctly in Message · 97934ffb
      Lars Ingebrigtsen authored
      * lisp/gnus/mml.el (mml-generate-mime-1): Detect which coding
      system has been used in attached text files, and don't try to
      do any encoding of these files (bug#13808).
      97934ffb
    • Lars Ingebrigtsen's avatar
      Build fix for older gnutls versions · 6bfa9e9a
      Lars Ingebrigtsen authored
      * src/gnutls.c (emacs_gnutls_handle_error):
      GNUTLS_E_PREMATURE_TERMINATION is apparently only present in
      gnutls-3.
      6bfa9e9a
    • Tino Calancha's avatar
      ediff-difference-vector-alist: Drop duplicated definition · cf9ce4fc
      Tino Calancha authored
      * lisp/vc/ediff-init.el (ediff-difference-vector-alist):
      Drop duplicated definition.
      (ediff-difference-vector-A, ediff-difference-vector-B)
      (ediff-difference-vector-C, ediff-difference-vector-Ancestor):
      Move definition before 'ediff-difference-vector-alist'.
      cf9ce4fc
    • Lars Ingebrigtsen's avatar
      Revert "nnimap.el: support additional expunge options" · f580ea19
      Lars Ingebrigtsen authored
      This reverts commit 4e9baea6.
      
      The patch broke fetching new mail:
      
      Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type")
        format("%d .*\n" (t ("OK" ("HIGHESTMODSEQ" "914696") "Expunge" "completed.") ("VANISHED" "1825937") ("0" "RECENT")))
        (looking-at (format "%d .*\n" sequence))
        (not (looking-at (format "%d .*\n" sequence)))
        (progn (while (and (not (bobp)) (progn (forward-line -1) (looking-at "\\*\\|[0-9]+ OK NOOP")))) (not (looking-at (format "%d .*\n" sequence))))
      f580ea19
  3. 24 Jan, 2017 12 commits
    • Nikolaus Rath's avatar
      nnimap.el: support additional expunge options · 4e9baea6
      Nikolaus Rath authored
      * lisp/gnus/nnimap.el (nnimap-close-group)
      (nnimap-request-expire-articles, nnimap-delete-article)
      (nnimap-request-scan): add new 'never, 'immediate, and 'on-exit
      settings for nnimap-expunge (bug#20670).
      4e9baea6
    • Lars Ingebrigtsen's avatar
      Don't tag Gnus bugs with "gnus" · b6fa5807
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-msg.el (gnus-bug): Remove the bug package tags.
      
      * lisp/gnus/gnus.el (gnus-bug-package): Removed; Gnus doesn't
      have its own package any more in the bug tracker.
      b6fa5807
    • Lars Ingebrigtsen's avatar
      Tweak TLS error messaging on closed connections · 42e23674
      Lars Ingebrigtsen authored
      * src/gnutls.c (emacs_gnutls_handle_error): Demote the normal
      peer-closed-connection "The TLS connection was non-properly
      terminated" message to a lower level so that it isn't shown to
      the user by default.
      42e23674
    • Lars Ingebrigtsen's avatar
      Avoid having eww unexpectedly open external browsers · 456696a8
      Lars Ingebrigtsen authored
      * lisp/net/eww.el (eww-render): Instead of opening unsupported
      content types like audio/mpeg directly in an external browser
      (which can be very confusing especially when something
      redirects to a file like that), just display a simple
      interstitial that people can choose to click on or not
      (bug#22671).
      456696a8
    • Lars Ingebrigtsen's avatar
      When opening new eww buffers, use buffer names based on the host name · fd42a192
      Lars Ingebrigtsen authored
      * lisp/net/eww.el (eww-browse-url): When opening in a new
      window, use a buffer name based on the host name (bug#23738).
      (eww--dwim-expand-url): Refactored out into its own function
      for easier reuse.
      fd42a192
    • David Engster's avatar
      xml: Fix parsing of default namespace with quoted names · aea67018
      David Engster authored
      * lisp/xml.el (xml-parse-attlist): Properly extract namespace when
        parsing is done with quoted symbol names (bug#23440).
      * test/lisp/xml-tests.el (xml-parse-test--default-namespace-qnames)
        (xml-parse-test-default-namespace-qnames): Test for the above.
      aea67018
    • Lars Ingebrigtsen's avatar
      Fix rendering of some complex SVG images · 267c98ae
      Lars Ingebrigtsen authored
      * lisp/net/shr.el (shr-parse-image-data): Don't transform
      SVG->DOM->XML unless we're blocking images, as this is apt to
      destroy the SVG (bug#24111).
      267c98ae
    • Lars Ingebrigtsen's avatar
      Clarify the last clarification · 3180deac
      Lars Ingebrigtsen authored
      * lisp/net/shr.el (shr-width): Clarify the interaction with
      `shr-use-fonts' (bug#24928).
      3180deac
    • Lars Ingebrigtsen's avatar
      shr-width doc clarification · 253fdf79
      Lars Ingebrigtsen authored
      * lisp/net/shr.el (shr-width): Clarify the interaction with
      `shr-use-fonts' (bug#24928).
      253fdf79
    • Lars Ingebrigtsen's avatar
      Allow passing in max-width/height · 37567393
      Lars Ingebrigtsen authored
      * lisp/net/shr.el (shr-rescale-image): Allow passing in
      max-width/height (bug#25287).
      37567393
    • Stefan Monnier's avatar
      * lisp/progmodes/vhdl-mode.el: Avoid add-to-list on local vars · 52a87c89
      Stefan Monnier authored
      Require `cl' for `pushnew'.
      (vhdl-scan-project-contents, vhdl-compose-wire-components)
      (vhdl-uniquify): Use `pushnew' instead of `add-to-list'.
      52a87c89
    • Noam Postavsky's avatar
      Fix comment detection on open parens · 201dfe31
      Noam Postavsky authored
      Characters having both open paren syntax and comment start syntax were
      being detected as open parens even when they should have been part a
      comment starter (Bug#24870).
      
      * src/syntax.c (in_2char_comment_start): New function, extracted from
      `scan_sexps_forward'.
      (scan_sexps_forward): Add check for a 2-char comment starter before the
      loop.  Inside the loop, do that check after incrementing the 'from'
      character index.  Move the single char comment syntax cases into the
      switch instead of special casing them before.
      * test/src/syntax-tests.el (parse-partial-sexp-paren-comments):
      (parse-partial-sexp-continue-over-comment-marker): New tests.
      201dfe31
  4. 23 Jan, 2017 1 commit
    • Alan Mackenzie's avatar
      Give , and .@ doc strings. Fixes bug #24561. · 0c31ff43
      Alan Mackenzie authored
      Also make *Help* links to ``' possible.  Also make usable as such doc strings
      on the function-documentation property of a symbol.
      
      * lisp/emacs-lisp/backquote.el (top-level): Give , and '@ doc strings on the
      function-documentation property.  Also give these symbols a reader-construct
      property.
      
      * lisp/help-fns.el (describe-function): Allow the function-documentation
      property to work.  Use princ rather than prin1 to print the function's name
      when it has a reader-construct property.
      (help-fns-signature): Don't insert `high-usage' for a reader-construct.
      (describe-function-1): Adapt to process documentation on the
      function-documentation property.  Print "a reader construct" when appropriate.
      
      * lisp/help-mode.el (help-xref-symbol-regexp): Amend this regexp also to match
      ``'.
      0c31ff43
  5. 22 Jan, 2017 3 commits
    • Mark Oteiza's avatar
      ; Fix previous commit · 03de82fe
      Mark Oteiza authored
      * lisp/play/dunnet.el (dun-drop): Nix assignment of nonexistent binding.
      03de82fe
    • Paul Eggert's avatar
      Improve uses of CHECK_LIST etc. · 0a49f158
      Paul Eggert authored
      * src/eval.c (FletX): Report an error for invalid constructs like
      ‘(let* (a . 0))’, so that ‘let*’ is more consistent with ‘let’.
      (lambda_arity): Use plain CHECK_CONS.
      * src/fns.c (CHECK_LIST_END): Move from here to lisp.h.
      (Fcopy_alist): Remove unnecessary CHECK_LIST call, since
      concat does that for us.
      (Fnthcdr, Fmember, Fmemql, Fdelete, Fnreverse):
      Use CHECK_LIST_END, not CHECK_LIST_CONS.  This hoists a
      runtime check out of the loop.
      (Fmemq): Simplify and use CHECK_LIST_END instead of CHECK_LIST.
      (Fassq, Fassoc, Frassq, Frassoc):
      Simplify and use CHECK_LIST_END instead of CAR.
      (assq_no_quit, assoc_no_quit): Simplify and assume proper list.
      (Fnconc): Use plain CHECK_CONS, and do-while instead of while loop.
      * src/fontset.c (Fnew_fontset):
      * src/frame.c (Fmodify_frame_parameters):
      Use CHECK_LIST_END at end, rather than CHECK_LIST at start, for a
      more-complete check.
      * src/gfilenotify.c (Fgfile_add_watch):
      Omit unnecessary CHECK_LIST, since Fmember does that for us.
      * src/lisp.h (lisp_h_CHECK_LIST_CONS, CHECK_LIST_CONS):
      Remove; no longer used.
      (CHECK_LIST_END): New inline function.
      0a49f158
    • Tino Calancha's avatar
      Prevent to use tabulated-list--near-rows unbound · ade0652c
      Tino Calancha authored
      * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry):
      Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506).
      ade0652c
  6. 21 Jan, 2017 1 commit