1. 27 Feb, 2021 10 commits
    • Lars Ingebrigtsen's avatar
      Compute grep defaults earlier · f8b4623d
      Lars Ingebrigtsen authored
      * lisp/progmodes/grep.el (grep): Always compute the defaults
      (bug#46801).
      (grep-highlight-matches): Clarify that it's not just used
      interactively.
      f8b4623d
    • Lars Ingebrigtsen's avatar
      Change defcustom types of two non-standard hooks · 7ac99eee
      Lars Ingebrigtsen authored
      * lisp/erc/erc.el (erc-before-connect, erc-after-connect): Change
      type from 'hook to 'function (bug#34657).
      7ac99eee
    • F. Jason Park's avatar
      Accept string argument in erc-add-to-input-ring · c9f5c314
      F. Jason Park authored
      * lisp/erc/erc-ring.el: (erc-add-to-input-ring)
      (erc-previous-command): Use existing API to grab input.
      * test/lisp/erc/erc-tests.el: (erc-ring-previous-command)
      See (bug#46339).
      c9f5c314
    • Lars Ingebrigtsen's avatar
      2a9ce136
    • Glenn Morris's avatar
      Fixes for doc/misc org source files · b3d310fa
      Glenn Morris authored
      * doc/misc/org-setup.org: Fix "version" file lookup.  Add copyright.
      * doc/misc/modus-themes.org: Fix up doclicense include.
      * doc/misc/org.org: Remove non-working and unused "modification-time".
      Fix up doclicense include.  Adjust setupfile inclusion.
      b3d310fa
    • Glenn Morris's avatar
      Distribute the real source for some doc/misc manuals (bug#45143) · fddd63f8
      Glenn Morris authored
      * doc/misc/modus-themes.texi, doc/misc/org.texi:
      Remove generated files from repository.
      * doc/misc/Makefile.in: Add rules for building .texi from .org.
      (ORG_SRC, abs_top_builddir, EMACS, emacs):
      New variables.
      (org_template): New template.
      (orgclean): New phony target.
      * Makefile.in (info): Depend on lisp.
      * lisp/org/ox-texinfo.el (org-texinfo-export-to-texinfo-batch):
      New function.
      * doc/misc/org.org, doc/misc/org-setup.org: New files.
      Import from https://code.orgmode.org d8e8a97a14.
      fddd63f8
    • Protesilaos Stavrou's avatar
      Import org source file for modus-themes manual · 3984044a
      Protesilaos Stavrou authored
      * doc/misc/modus-themes.org: New file.
      Import from https://gitlab.com/protesilaos/modus-themes 515180ac.
      3984044a
    • Stefan Kangas's avatar
      Use lexical-binding in progmodes/icon.el · 3b1fb618
      Stefan Kangas authored
      * lisp/progmodes/icon.el: Use lexical-binding.
      (electric-icon-brace): Very minor cleanup.
      3b1fb618
    • Stefan Kangas's avatar
      Convert change-log-mode menu to easy-menu-define · 9abee2ac
      Stefan Kangas authored
      * lisp/vc/add-log.el (change-log-mode-map): Move menu from here...
      (change-log-mode-menu): ...to here; convert to easy-menu-define.
      9abee2ac
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cconv.el: Improve line-nb info of unused var warnings · a350ae05
      Stefan Monnier authored
      Instead of warning about unused vars during the analysis phase of
      closure conversion, do it in the actual closure conversion by
      annotating the code with "unused" warnings, so that the warnings
      get emitted later by the bytecomp phase, like all other warnings,
      at which point the line-number info is a bit less imprecise.
      
      Take advantage of this change to wrap the expressions of unused
      let-bound vars inside (ignore ...) so the byte-compiler can better
      optimize them away.
      
      Finally, promote `macroexp--warn-and-return` to "official" status
      by removing its "--" marker.
      
      (cconv-captured+mutated, cconv-lambda-candidates): Remove vars.
      (cconv-var-classification): New var to replace them.
      (cconv-warnings-only): Delete function.
      (cconv--warn-unused-msg, cconv--var-classification): New functions.
      (cconv--convert-funcbody): Add warnings for unused args.
      (cconv-convert): Add warnings for unused vars in `let` and `condition-case`.
      (cconv--analyze-use): Don't emit an "unused var" warning any more,
      but instead remember the fact in `cconv-var-classification`.
      
      * lisp/emacs-lisp/bytecomp.el (byte-compile-force-lexical-warnings):
      Remove variable.
      (byte-compile-preprocess): Remove corresponding case.
      
      * lisp/emacs-lisp/pcase.el (pcase--if): Don't throw away `test` effects.
      (\`):
      * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Use `car-safe` instead
      of `car`, so it can more easily be removed by the optimizer if the
      result is not used.
      
      * lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): New function.
      (macroexp-warn-and-return): Rename from `macroexp--warn-and-return`.
      a350ae05
  2. 26 Feb, 2021 13 commits
    • Stefan Monnier's avatar
      lisp/vc/*.el: Use lexical-bindings in all the files · 99340ad1
      Stefan Monnier authored
      Also remove some redundant `:group` arguments.
      
      * lisp/vc/vc.el (vc-ignore): Autoload.
      
      * lisp/vc/pcvs-util.el (cvs-every, cvs-union, cvs-map): Delete functions.
      * lisp/vc/cvs-status.el: Require `cl-lib` at runtime.
      (cvs-tree-tags-insert): Use `cl-mapcar` and `cl-every` instead.
      * lisp/vc/pcvs.el: Require `cl-lib` at runtime.
      (cvs-do-removal): Use `cl-every` instead.
      
      * lisp/vc/ediff-init.el: Require `ediff-util` (for `ediff-cleanup-mess`
      and `ediff-default-suspend-function`).
      
      * lisp/vc/pcvs-info.el (cvs-fileinfo<): Remove unused vars `subtypea`
      and `subtypeb`.
      
      * lisp/vc/vc-git.el:
      * lisp/vc/vc-bzr.el: Require `vc-dispatcher` at runtime for
      `vc-do-async-command`.
      99340ad1
    • Stefan Monnier's avatar
      * lisp/cedet/semantic/idle.el: Fix compilation warning · 2987376b
      Stefan Monnier authored
      (eldoc-last-message): Remove var declaration.
      (eldoc-message): Remove function declaration.
      (semantic--eldoc-info): Rename from semantic-idle-summary-idle-function.
      Make it usable on `eldoc-documentation-functions`.
      (semantic-idle-summary-mode): Use `eldoc-mode`.
      (semantic-idle-summary-refresh-echo-area): Delete function.
      2987376b
    • Stefan Monnier's avatar
      * lisp/cedet/semantic/analyze*.el: Use lexical-binding · 49bad2a0
      Stefan Monnier authored
      * lisp/cedet/semantic/analyze.el: Use lexical-binding.
      Rename the dynbound var `prefixtypes` to `semantic--prefixtypes`.
      (semantic--prefixtypes): Declare var.
      
      * lisp/cedet/semantic/analyze/complete.el: Use lexical-binding.
      (semantic--prefixtypes): Declare var.
      (semantic-analyze-possible-completions-default): Remove unused var `any`.
      Rename `prefixtypes` to `semantic--prefixtypes`.
      
      * lisp/cedet/semantic/analyze/debug.el: Use lexical-binding.
      (semantic-analyzer-debug-global-symbol): Remove no-op use of `prefixtypes`.
      
      * lisp/cedet/semantic/analyze/refs.el:
      * lisp/cedet/semantic/analyze/fcn.el: Use lexical-binding.
      49bad2a0
    • Michael Albinus's avatar
      Fix Tramp manual · 496fa1c0
      Michael Albinus authored
      * doc/misc/tramp.texi (External methods): Mention "about-args".
      (Remote shell setup): Use sshx.
      496fa1c0
    • Stefan Kangas's avatar
    • Stefan Kangas's avatar
      e95b3e4d
    • Stefan Kangas's avatar
      Convert some more progmode menus to easy-menu-define · ffdb0a2d
      Stefan Kangas authored
      * lisp/progmodes/dcl-mode.el (dcl-mode-map):
      * lisp/progmodes/icon.el (icon-mode-map):
      * lisp/progmodes/scheme.el (scheme-mode-map):
      Move menu definitions from here...
      * lisp/progmodes/dcl-mode.el (dcl-mode-menu):
      * lisp/progmodes/icon.el (icon-mode-menu)
      * lisp/progmodes/scheme.el (scheme-mode-menu):
      ...to here, and use easy-menu-define.
      
      * lisp/progmodes/icon.el
      (icon-mode-map, icon-mode-syntax-table): Simplify.
      ffdb0a2d
    • Stefan Kangas's avatar
      Convert simula-mode menu to easy-menu-define · 47f2a39f
      Stefan Kangas authored
      * lisp/progmodes/simula.el (simula-mode-map): Move menu definition
      from here...
      (simula-mode-menu): ...to here, and use easy-menu-define.
      (simula-popup-menu): Declare unused function obsolete.
      47f2a39f
    • Stefan Kangas's avatar
      Fix syntax highlighting of easy-menu-define docstrings · 1205301e
      Stefan Kangas authored
      * lisp/emacs-lisp/easymenu.el (easy-menu-define): Add doc-string
      declaration for correct syntax highlighting.
      1205301e
    • Stefan Kangas's avatar
      Remove redundant requires of easymenu · 54af0d42
      Stefan Kangas authored
      * lisp/allout.el:
      * lisp/emacs-lisp/edebug.el:
      * lisp/emacs-lisp/ert.el:
      * lisp/erc/erc-menu.el:
      * lisp/help-mode.el:
      * lisp/net/dictionary.el:
      * lisp/nxml/rng-nxml.el:
      * lisp/progmodes/ebrowse.el:
      * lisp/progmodes/meta-mode.el:
      * lisp/progmodes/prolog.el:
      * lisp/progmodes/ps-mode.el:
      * lisp/progmodes/vera-mode.el:
      * lisp/wid-browse.el: Remove redundant require of easymenu.  We only
      use the autoloaded macro 'easy-menu-define' here.
      54af0d42
    • Stefan Kangas's avatar
      Remove check for missing easymenu from cperl-mode.el · f83775b4
      Stefan Kangas authored
      * lisp/progmodes/cperl-mode.el (cperl-menu): Don't wrap definition
      in condition-case; easymenu always exists in Emacs.
      (easymenu): Remove redundant require.
      f83775b4
    • Basil L. Contovounesios's avatar
      Function-quote completion property of declare form · 75227883
      Basil L. Contovounesios authored
      For discussion, see the following thread:
      https://lists.gnu.org/r/emacs-devel/2021-02/msg01666.html
      
      * lisp/emacs-lisp/byte-run.el (byte-run--set-completion): Quote with
      'function' for syntactical consistency with other declare form
      properties.  This allows writing (declare (completion foo)) instead
      of (declare (completion 'foo)).
      * lisp/emacs-lisp/easymenu.el (easy-menu-do-define):
      * lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Prefer
      function-put over put for function symbols.
      * lisp/subr.el (ignore, undefined): Remove #'-quoting from declare
      form; it is no longer needed.
      75227883
    • Mattias Engdegård's avatar
      Fix pcase rx pattern bugs · 70f2d658
      Mattias Engdegård authored
      Two unrelated bugs: A missing type check caused an error in rx
      patterns for non-string match targets, and rx patterns did not work at
      all in pcase-let or pcase-let*.
      
      Second bug reported by Basil Contovounesios and Ag Ibragimov; fixes
      proposed by Stefan Monnier.  Discussion and explanation in thread at
      https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg01924.html
      
      * lisp/emacs-lisp/rx.el (rx): Add (pred stringp) to avoid type errors,
      and replace the `pred` clause for the actual match with something that
      works with pcase-let(*) without being optimised away.
      * test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test cases.
      70f2d658
  3. 25 Feb, 2021 9 commits
    • Eli Zaretskii's avatar
      Fix documentation of a recent change · 6bf56a36
      Eli Zaretskii authored
      * src/fns.c (Fyes_or_no_p): Don't use braces around one-line
      block.
      (syms_of_fns) <use-short-answers>: Improve the wording of the doc
      string.
      * etc/NEWS: Improve wording of the entry about 'use-short-answers'.
      6bf56a36
    • Juri Linkov's avatar
      New variable 'use-short-answers' to use 'y-or-n-p' instead of 'yes-or-no-p' · 297c0e03
      Juri Linkov authored
      * lisp/cus-start.el: Add use-short-answers.
      
      * lisp/emacs-lisp/map-ynp.el (read-answer): Handle use-short-answers.
      (read-answer-short): Add use-short-answers to docstring.
      
      * src/fns.c (Fyes_or_no_p): Call y-or-n-p if use_short_answers is true.
      (syms_of_fns): Add DEFVAR_BOOL use-short-answers (bug#46594).
      297c0e03
    • Alan Third's avatar
      Fix freeze on older macOS's (bug#46687) · 056b468f
      Alan Third authored
      * src/nsterm.m ([EmacsView windowDidChangeBackingProperties:]):
      ([EmacsView viewWillDraw]): Only run this code when actually drawing
      to an offscreen bitmap.
      056b468f
    • Robert Pluim's avatar
      Re-enable network-stream-tests.el :nowait t tests · 90ac4057
      Robert Pluim authored
      After the fix for Bug#46709, these no longer fail in the absence of a
      working Internet connection
      
      * test/lisp/net/network-stream-tests.el (internet-is-working): Remove
      defvar, it's no longer needed in this file.
      
      * test/lisp/net/network-stream-tests.el
      (connect-to-tls-ipv4-nowait):
      (connect-to-tls-ipv6-nowait):
      (open-network-stream-tls-nowait):
      (open-gnutls-stream-new-api-nowait):
      (open-gnutls-stream-old-api-nowait): Remove check for internet-is-working.
      90ac4057
    • Robert Pluim's avatar
      Don't crash if gnutls_handshake fails · d84d69df
      Robert Pluim authored
      In some situations involving Internet access not being fully
      functional, gnutls_handshake returns a fatal error, which we were
      ignoring, causing us to call gnutls_handshake again.  Now we check for
      the error and return it to the caller.
      
      * src/gnutls.c (gnutls_try_handshake): Return immediately if
      gnutls_handshake returns a fatal error (Bug#46709).
      d84d69df
    • Robert Pluim's avatar
      * Specify 'ipv4 when testing ipv4 in network-stream-tests.el · 6c5e86fc
      Robert Pluim authored
      * test/lisp/net/network-stream-tests.el
      (connect-to-tls-ipv4-nowait): Specify :family 'ipv4.
      6c5e86fc
    • Robert Pluim's avatar
      ; * src/xfaces.c (realize_gui_face): Correct formatting · a1673d32
      Robert Pluim authored
      * src/xfaces.c (realize_gui_face): Correct code formatting.
      a1673d32
    • Stefan Kangas's avatar
      Convert epa-key-list-mode menu to easy-menu-define · 4d43b9a0
      Stefan Kangas authored
      * lisp/epa.el (epa-key-list-mode-map): Move menu from here...
      (epa-key-list-mode-menu): ...to here, and convert to easy-menu-define.
      4d43b9a0
    • Stefan Monnier's avatar
      Remove last remaining external uses of `edebug-form-spec` · 4b1ace22
      Stefan Monnier authored
      * lisp/emacs-lisp/gv.el (gv-place): Use `def-edebug-elem-spec`.
      
      * lisp/obsolete/erc-compat.el (erc-define-minor-mode): Remove redundant
      `edebug-form-spec`.
      4b1ace22
  4. 24 Feb, 2021 8 commits