1. 19 Mar, 2019 1 commit
    • Mattias Engdegård's avatar
      Disallow reversed char ranges in `rx' · 3ed1621d
      Mattias Engdegård authored
      (any "a-Z0-9") generated "[0-9]", and (any (?9 . ?0)) generated "[9-0]".
      Reversed ranges are either mistakes or abuse.  Neither should be allowed.
      etc/NEWS: Explain the change.
      lisp/emacs-lisp/rx.el (rx): Document.
      (rx-check-any-string, rx-check-any): Add error checks for reversed ranges.
      test/lisp/emacs-lisp/rx-tests.el (rx-char-any-range-bad): New test.
  2. 16 Mar, 2019 1 commit
    • Eli Zaretskii's avatar
      Improve locale and language environment setting at startup · 34dd4e0a
      Eli Zaretskii authored
      * lisp/international/mule-cmds.el (locale-language-names): Add
      more locales and their language environments.
      (set-locale-environment): Use w32-multibyte-code-page, if
      non-zero, as locale-coding-system.  (Bug#34684)
      * src/w32fns.c (globals_of_w32fns) <w32-multibyte-code-page>:
      New variable.
      * etc/NEWS: Mention w32-multibyte-code-page.
  3. 15 Mar, 2019 2 commits
    • Philippe Vaucher's avatar
      Customize tabulated-list sort indicators · 18fb250d
      Philippe Vaucher authored
      This allows the user to customize the sorting indicators displayed
      near the current column.
      * lisp/emacs-lisp/tabulated-list.el (tabulated-list): New group.
      (tabulated-list-tty-sort-indicator-desc): New defcustomd.
      (tabulated-list-glyphless-char-display): Remove.
      (tabulated-list-make-glyphless-char-display-table): New function.
      * doc/lispref/modes.texi (Tabulated List Mode): Add documentation
      for new options.
      * etc/NEWS: Mention the new options.
    • Eli Zaretskii's avatar
  4. 11 Mar, 2019 2 commits
    • Martin Rudalics's avatar
      Rewrite minibuffer window resizing code · 95373b69
      Martin Rudalics authored
      * src/frame.c (resize_mini_frames): New variable.
      * src/window.c (resize_mini_window_apply): New function.
      (grow_mini_window, shrink_mini_window): Remove PIXELWISE
      argument.  Call resize_mini_window_apply to apply changes.
      (Fresize_mini_window_internal): Call resize_mini_window_apply
      to apply changes.
      (Qwindow__resize_mini_frame): New symbol.
      * src/window.h (grow_mini_window, shrink_mini_window): Adjust
      external declarations.
      * src/xdisp.c (resize_mini_window): For minibuffer-only frames
      call 'window--resize-mini-frame' if resize_mini_frames is
      non-nil.  Offload parts of logic to grow_mini_window and
      shrink_mini_window which are now called without the PIXELWISE
      (Vresize_mini_windows): Mention 'resize-mini-frames' in
      * lisp/cus-start.el (resize-mini-frames): Add customization
      * lisp/window.el (window--resize-mini-window): Simplify code.
      (window--resize-mini-frame): New function.
      * doc/lispref/minibuf.texi (Minibuffer Windows): Describe new
      option 'resize-mini-frames'.
      * etc/NEWS: Mention new option 'resize-mini-frames'.
    • Paul Eggert's avatar
      Improve binary-as-unsigned treatment (Bug#34792) · 9b4d34fa
      Paul Eggert authored
      * etc/NEWS:
      * src/editfns.c (Fformat, binary_as_unsigned):
      Update now that we always have bignums.
      (syms_of_editfns) [!defined lisp_h_FIXNUMP]: Remove now-obsolete
      code, since lisp_h_FIXNUMP is always defined now.
      * test/src/editfns-tests.el (read-large-integer): Simplify,
      now that we can assume binary-as-unsigned defaults to nil.
  5. 09 Mar, 2019 2 commits
    • Michael Albinus's avatar
      Do not hardcode "/bin/sh" in compile. Bug#24338, Bug#29723 · 21f54fee
      Michael Albinus authored
      * doc/emacs/custom.texi (Connection Variables): New node.
      * doc/emacs/emacs.texi (Top): Add entry for Connection Variables.
      * doc/emacs/misc.texi (Single Shell): Mention default value for
      remote buffers.
      * doc/lispref/variables.texi (Connection Local Variables):
      Describe `with-connection-local-variables' instead of
      * doc/misc/tramp.texi (Remote processes): Refer to Emacs manual.
      Mention default connection-local settings for `shell-file-name'
      and `shell-command-switch'.
      * etc/NEWS: Mention connection-local variables changes.
      * lisp/files-x.el (hack-connection-local-variables):
      Push connection-local variables to `file-local-variables-alist'.
      (connection-local-criteria-for-default-directory): New defsubst.
      (with-connection-local-variables): Rename from
      `with-connection-local-profiles'.  Adapt implementation.
      * lisp/files.el (hack-local-variables):
      Call `hack-connection-local-variables'.
      * lisp/shell.el (shell): Use `with-connection-local-variables'.
      * lisp/subr.el (start-file-process-shell-command):
      * lisp/progmodes/compile.el (compilation-start):
      Use `with-connection-local-variables'.  Do not set "/bin/sh" for
      remote buffers, trust settings of `shell-file-name'.  (Bug#24338),
      * lisp/net/ange-ftp.el (ange-ftp-compress, ange-ftp-uncompress):
      Use `shell-command-switch'.
      * lisp/net/tramp-adb.el (tramp-adb-connection-local-default-profile):
      New defvar.  Add it to connection-local profiles after loading "shell".
      * lisp/net/tramp-integration.el (tramp-compat): Require tramp-compat.
      (tramp-compat-exec-path): Do not declare anymore.
      (tramp-connection-local-safe-shell-file-names): New defvar.
      (tramp-connection-local-default-profile): New defconst.  Activate
      it after loading "shell".
      (shell-file-name, shell-command-switch): Add safe-local-variable
      * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp):
      Add tramp-autoload cookie.
      * test/lisp/files-x-tests.el (remote-shell-file-name):
      Add safe-local-variable property to remote-* variables.
      (tramp-connection-local-default-profile): Declare.
      Rename from `files-x-test-with-connection-local-profiles'.  Adapt
      * test/lisp/net/tramp-tests.el
      (tramp-test34-connection-local-variables): New test.
      (tramp-test34-explicit-shell-file-name): Run it also for tramp-adb.
      Bind connection-local-{profile,criteria}-alist.  Use tramp-adb
      specific `shell-file-name'.  Add safe-local-variable property to
      `explicit-shell-file-name' and `explicit-sh-args'.
    • Martin Rudalics's avatar
      Further redesign of window change functions · 4e082ce3
      Martin Rudalics authored
      * doc/lispref/windows.texi (Window Hooks): Revise description
      of window change functions.  Add documentation for
      'window-state-change-hook' and window state change flag.
      * etc/NEWS: Update entry for window change functions.
      * src/frame.c (Fframe_window_state_change)
      (Fset_frame_window_state_change): New functions.
      * src/frame.h (struct frame): New boolean window_state_change.
      * src/window.c (window_change_record_frames): New static
      (window_change_record_frame): Remove function - code moved to
      (window_change_record): Record frame changes here taking
      window_change_record_frames into account.
      (run_window_change_functions_1): Set window_change_record_frames
      whenever we run one of our hooks.
      (run_window_change_functions): Run hooks also when
      FRAME_WINDOW_STATE_CHANGE has been set.  Run
      Vwindow_state_change_hook.  Leave decision whether to record
      changes for all frames to window_change_record.
      (Vwindow_state_change_functions): Update doc-string.
      (Vwindow_state_change_hook): New normal hook.
  6. 05 Mar, 2019 1 commit
    • Martin Rudalics's avatar
      Fix handling of minibuffer-only child frames (Bug#33498) · a552cc21
      Martin Rudalics authored
      * doc/lispref/frames.texi (Buffer Parameters): Describe how to
      make a minibuffer-only child frame.
      (Child Frames): Describe how minbuffer child frames are
      * src/frame.c (delete_frame): Handle deletion of minibuffer
      child frames (Bug#33498).  In the course, fix reassigning of
      'default-minibuffer-frame' with minibuffer-only frames.
      * lisp/frame.el (frame-notice-user-settings): Handle creation of
      initial minibuffer-only child frame.
      (make-frame): Handle creation of frame with a minibuffer-only
      child frame.
  7. 03 Mar, 2019 1 commit
    • Charles A. Roelli's avatar
      Merge diff-font-lock-refine and diff-auto-refine-mode into diff-refine · d6b3e5bb
      Charles A. Roelli authored
      This change was discussed in Bug#32991.
      * admin/gitmerge.el (gitmerge-resolve): Bind 'diff-refine'
      instead of 'diff-auto-refine-mode' to nil.
      * doc/emacs/files.texi (Diff Mode): Explain 'diff-refine'
      instead of 'diff-auto-refine-mode' in the documentation of
      'diff-hunk-next' and 'diff-hunk-prev'.  Mention in the
      documentation of 'diff-refine-hunk' that refining is already
      done by default.
      * etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable
      and mention deprecation and disabling of
      * lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to
      'diff-refine' and allow choices nil, 'font-lock' and 'navigation'.
      (diff-auto-refine-mode): Disable it by default, make it
      obsolete and make it set 'diff-refine' appropriately to keep
      backward compatibility.
      (diff-hunk-next, diff-hunk-prev): Adapt to rename of
      diff-auto-refine-mode and ensure that refining only happens
      when calling these commands interactively.
      (diff--font-lock-refined): Adapt to rename of
      * lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check
      that 'diff-refine' is set instead of checking
      'diff-auto-refine-mode' when deciding whether to refine a
  8. 02 Mar, 2019 5 commits
    • Phillip Lord's avatar
      Revert "Add hook for all events" · 7523a9e8
      Phillip Lord authored
      This reverts commit 7b31de4d.
    • Phillip Lord's avatar
      Revert "; Fix typos in NEWS" · 5e4b8538
      Phillip Lord authored
      This reverts commit d52bc534.
    • Phillip Lord's avatar
      Revert "; Document input-event-functions" · 325b5dbd
      Phillip Lord authored
      This reverts commit 27fffb27.
    • Mattias Engdegård's avatar
      Correct regexp-opt return value for empty string list · 7bda34af
      Mattias Engdegård authored
      When regexp-opt is called with an empty list of strings, return a regexp
      that doesn't match anything instead of the empty string (Bug#20307).
      * doc/lispref/searching.texi (Regular Expression Functions):
      * etc/NEWS:
      Document the new behaviour.
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt):
      Return a never-match regexp for empty inputs.
    • Mattias Engdegård's avatar
      rx: fix `or' ordering by adding argument to regexp-opt · da758046
      Mattias Engdegård authored
      The rx `or' form may reorder its arguments in an unpredictable way,
      contrary to user expectation, since it sometimes uses `regexp-opt'.
      Add a NOREORDER option to `regexp-opt' for preventing it from
      producing a reordered regexp (Bug#34641).
      * doc/lispref/searching.texi (Regular Expression Functions):
      * etc/NEWS (Lisp Changes in Emacs 27.1):
      Describe the new regexp-opt NOREORDER argument.
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Add NOREORDER.
      Make no attempt at regexp improvement if the set of strings contains
      a prefix of another string.
      (regexp-opt--contains-prefix): New.
      * lisp/emacs-lisp/rx.el (rx-or): Call regexp-opt with NOREORDER.
      * test/lisp/emacs-lisp/rx-tests.el: Test rx `or' form match order.
  9. 01 Mar, 2019 1 commit
    • Federico Tedin's avatar
      Allow control on the threshold for using 'distant-foreground' · 63d0dc79
      Federico Tedin authored
      * src/xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Macro deleted.
      (load_face_colors): Compare against
      face_near_same_color_threshold instead of
      (syms_of_xfaces) <face-near-same-color-threshold>: New
      variable.  (Bug#34001)
      * etc/NEWS: Announce the change.
  10. 28 Feb, 2019 1 commit
  11. 27 Feb, 2019 1 commit
    • Juri Linkov's avatar
      Directional window swap states (bug#34656) · 5962a7c3
      Juri Linkov authored
      * lisp/windmove.el (windmove-swap-states-in-direction)
      (windmove-swap-states-left, windmove-swap-states-up)
      (windmove-swap-states-down, windmove-swap-states-right)
      (windmove-swap-states-default-keybindings): New functions.
  12. 25 Feb, 2019 2 commits
  13. 24 Feb, 2019 1 commit
    • Philipp Stephani's avatar
      Ignore pending_signals when checking for quits. · 72ec233f
      Philipp Stephani authored
      pending_signals is often set if no quit is pending.  This results in
      bugs in module code if the module returns but no quit is actually
      As a better alternative, add a new process_input environment function
      for Emacs 27.  That function processes signals (like maybe_quit).
      * configure.ac: Add module snippet for Emacs 27.
      * src/module-env-27.h: New file.
      * src/emacs-module.h.in: Add process_input function to environment
      * src/emacs-module.c (module_should_quit): Use QUITP macro to check
      whether the caller should quit.
      (module_process_input): New function.
      (initialize_environment): Use it.
      * src/eval.c: Remove obsolete comment.
      * test/data/emacs-module/mod-test.c (signal_wrong_type_argument)
      (signal_errno): New helper functions.
      (Fmod_test_sleep_until): New test module function.
      * test/src/emacs-module-tests.el (mod-test-sleep-until): New unit
      * doc/lispref/internals.texi (Module Misc): Document process_input.
  14. 23 Feb, 2019 1 commit
    • Tassilo Horn's avatar
      Improve replace-buffer-contents/replace-region-contents · e96923c1
      Tassilo Horn authored
      * src/editfns.c (Freplace_buffer_contents): Add two optional arguments
        for mitigating performance issues.
      * lisp/emacs-lisp/subr-x.el (replace-region-contents): Move from
        subr.el.  Add the same two arguments as for replace-buffer-contents.
      * lisp/json.el (json-pretty-print-max-secs): New variable holding the
        default MAX-SECS value json-pretty-print passes to
        (json-pretty-print): Use it.
      * doc/lispref/text.texi (Replacing): Add documentation for
        replace-buffer-contents two new optional arguments.  Document
  15. 22 Feb, 2019 2 commits
  16. 19 Feb, 2019 1 commit
    • Michael R. Mauger's avatar
      * lisp/progmodes/sql.el: Added password wallet using · 1a6bcc91
      Michael R. Mauger authored
      `auth-source' package.
      (sql-auth-source-search-wallet): New function.
      (sql-password-wallet): New variable.
      (sql-password-search-wallet-function): New variable.
      (sql-get-login): Handle password wallet search.
      (sql-product-interactive): Handle password function.
      * test/lisp/progmodes/sql-test.el: Test wallet changes.
      (sql-test-login-params): New test variable.
      (with-sql-test-connect-harness): New macro to wrap test
      configuration around calls to `sql-connect'.
      (sql-test-connect, sql-test-connect-password-func)
      (sql-test-connect-wallet-server): New ERT tests.
      * etc/NEWS: Updated SQL Mode descriptions.
  17. 16 Feb, 2019 1 commit
    • Mattias Engdegård's avatar
      Prevent over-eager rx character range condensation · 478bbf7c
      Mattias Engdegård authored
      `rx' incorrectly considers character ranges between ASCII and raw bytes to
      cover all codes in-between, which includes all non-ASCII Unicode chars.
      This causes (any "\000-\377" ?Å) to be simplified to (any "\000-\377"),
      which is not at all the same thing: [\000-\377] really means
      [\000-\177\200-\377] (Bug#34492).
      * lisp/emacs-lisp/rx.el (rx-any-condense-range): Split ranges going
      from ASCII to raw bytes.
      * test/lisp/emacs-lisp/rx-tests.el (rx-char-any-raw-byte): Add test case.
      * etc/NEWS: Mention the overall change (Bug#33205).
  18. 15 Feb, 2019 1 commit
  19. 14 Feb, 2019 2 commits
  20. 08 Feb, 2019 1 commit
  21. 07 Feb, 2019 2 commits
  22. 06 Feb, 2019 1 commit
    • Robert Pluim's avatar
      Add dwim function for inserting @ref variants · 6ed9d005
      Robert Pluim authored
      * lisp/textmodes/texinfo.el (texinfo-insert-dwim-@ref): New function.
      Insert @ref variant based on surrounding context.
      (texinfo-mode-map): Add binding for texinfo-insert-dwim-@ref.
      * etc/NEWS: Describe new texinfo dwim reference functionality.
  23. 04 Feb, 2019 4 commits
    • Robert Pluim's avatar
      Don't map imaps to 993 anymore except on old Windows versions · f33a5dc9
      Robert Pluim authored
      'open-network-stream' will do the imaps service lookup itself, and
      using 993 forced the user to use the numeric value in .authinfo for
      certificate lookups.
      * lisp/gnus/nnimap.el (nnimap-map-port): Only do mapping for Windows
      XP or earlier.
      * etc/NEWS: Describe imaps mapping change.
    • Eli Zaretskii's avatar
      Support (locale-info 'paper) on MS-Windows · f37000ae
      Eli Zaretskii authored
      * src/w32proc.c (LOCALE_IPAPERSIZE): Define if undefined.
      (nl_langinfo): Support _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
      like glibc does.
      * src/fns.c (Flocale_info): Update the doc string.
      * nt/inc/langinfo.h: Add _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
      to the enumeration.
      (_NL_PAPER_WIDTH, _NL_PAPER_HEIGHT): Define namesake macros.
      * nt/mingw-cfg.site (emacs_cv_langinfo__nl_paper_width): Set
      to 'yes'.
      * doc/lispref/nonascii.texi (Locales): Update the
      documentation of 'locale-info' for the argument of 'paper'.
      * etc/NEWS: Update the locale-info entry.
    • Federico Tedin's avatar
      Allow doc-view to open password-protected PDF files (bug#33684) · d5f629d1
      Federico Tedin authored
      * lisp/doc-view.el (doc-view-ghostscript-options): Removed "-sDEVICE"
      (doc-view-ghostscript-device): New customizable variable, passed as
      "-sDEVICE" option to GhostScript.
      (doc-view-pdf-password-protected-ghostscript-p): New function.
      (doc-view-pdf->png-converter-ghostscript): Can now open
      password-protected PDF files.
      (doc-view-pdfdraw-program-subcommand): New function.
      (doc-view-pdf-password-protected-pdfdraw-p): New function.
      (doc-view-pdf->png-converter-mupdf): Can now open password-protected
      PDF files.
      * etc/NEWS: Mention new doc-view-mode feature.
    • Robert Pluim's avatar
      Use IPv6 localhost when family is 'ipv6 · 49f62430
      Robert Pluim authored
      This fixes Bug#34193
      * src/process.c (Fmake_network_process): Explicitly use ::1 when
      using IPv6 with 'local.  Update docstring.
      * test/lisp/net/network-stream-tests.el
      (make-ipv6-tcp-server-with-specified-port): Test creating ipv6
      local server.
      (make-server): Add optional family argument, default ipv4
      (echo-server-with-local-ipv4): Test connecting to 'local ipv4
      (echo-server-with-local-ipv6): Test connecting to 'local ipv6
      * doc/lispref/processes.texi (Network Processes): Describe
      behavior when using 'local.
      * etc/NEWS: Document new 'make-network-process' behavior when
      connecting to 'local with ipv6.
  24. 02 Feb, 2019 1 commit
  25. 29 Jan, 2019 1 commit
  26. 25 Jan, 2019 1 commit