1. 26 Jul, 2018 3 commits
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      %o and %x can now format signed integers · 4a56ca5b
      Paul Eggert authored
      Optionally treat integers as signed numbers with %o
      and %x format specifiers, instead of treating them as
      a machine-dependent two’s complement representation.
      This option is more machine-independent, allows formats
      like "#x%x" to be useful for reading later, and is
      better-insulated for future changes involving bignums.
      Setting the new variable ‘binary-as-unsigned’ to nil
      enables the new behavior (Bug#32252).
      This is a simplified version of the change proposed in:
      I simplified that proposal by omitting bitwidth modifiers, as
      I could not find an any example uses in the Emacs source code
      that needed them and doing them correctly would have been
      quite a bit more work for apparently little benefit.
      * doc/lispref/strings.texi (Formatting Strings):
      Document that %x and %o format negative integers in a
      platform-dependent way.  Also, document how to format
      numbers so that the same values can be read back in.
      * etc/NEWS: Document the change.
      * src/editfns.c (styled_format): Treat integers as signed
      numbers even with %o and %x, if binary-as-unsigned is nil.
      Support the + and space flags with %o and %x, since they’re
      about signs.
      (syms_of_editfns): New variable binary-as-unsigned.
      * test/src/editfns-tests.el (read-large-integer):
      Test that maximal integers can be read after printing
      with all integer formats, if binary-as-unsigned is nil.
    • Lucas Werkmeister's avatar
      Notify systemd in daemon-initialized and kill-emacs (Bug#31498) · 19f5f7b1
      Lucas Werkmeister authored
      With --[bg-]daemon and Type=forking, systemd will only consider the
      daemon to have fully started up once the original process exits, and
      will wait until then to start units depending on the Emacs service.  To
      get the same functionality with --fg-daemon, use Type=notify instead of
      Type=simple and explicitly send a readiness notification to systemd at
      the point where the forked process would in --bg-daemon mode notify its
      parent process and cause it to exit.  Similarly, notify systemd at the
      beginning of the shutdown process as well.  (Both of these calls are
      successful no-ops if emacs was not started by systemd.)
      * etc/emacs.service: Update Type.
      * src/emacs.c (daemon-initialized) [HAVE_LIBSYSTEMD]:
      * src/emacs.c (kill-emacs) [HAVE_LIBSYSTEMD]: Call sd_notify().
  2. 25 Jul, 2018 4 commits
  3. 24 Jul, 2018 5 commits
    • Paul Eggert's avatar
      Move proper-list-p to C · 200195e8
      Paul Eggert authored
      Since C code can use it and it’s simple, we might as well use C.
      * lisp/subr.el (proper-list-p): Move to C code.
      * src/eval.c (signal_error): Simplify by using Fproper_list_p.
      * src/fns.c (Fproper_list_p): New function, moved here from Lisp.
      Simplify signal_error
      * src/eval.c (signal_error): Simplify by using FOR_EACH_TAIL_SAFE.
    • Paul Eggert's avatar
      * etc/NEWS: Omit bug# when not needed. · 0ed21b7b
      Paul Eggert authored
    • Glenn Morris's avatar
      Merge from origin/emacs-26 · 64f94785
      Glenn Morris authored
      f64c2774 (origin/emacs-26) Let bookmark-jump override window-point (Bu...
      1208aaa9 Omit keymap from subword-mode docstring (Bug#32212)
      2b70b547 Prevent line-mode term from showing user passwords
      5de44411 Check for special filenames in eshell (Bug#30724)
      1b4b9659 Fix indent-sexp of #s(...) (Bug#31984)
      59e85332 Add save-match-data to abbreviate-file-name (Bug#32201)
      47f75b1b Fix last change in editfns.c
      671dc5a5 Fix calls to buffer modification hooks from replace-buffer-co...
      cc4ceed1 ; etc/NEWS: Remove unnecessary reference to a bug number.
      e0f33ea3 Fix Bug#32226
      7308fa0e Improve doc strings of several variables in keyboard.c
    • Michael Albinus's avatar
      Fix typo in `find-alternate-file' · 8c6a5023
      Michael Albinus authored
      * lisp/files.el (find-alternate-file): Add missing arguments to
      `find-file-noselect' call.
    • Noam Postavsky's avatar
      Let bookmark-jump override window-point (Bug#31751) · f64c2774
      Noam Postavsky authored
      * lisp/bookmark.el (bookmark-jump): Use pop-to-buffer-same-window
      instead of switch-to-buffer, the latter obeys
      switch-to-buffer-preserve-window-point and so loses the bookmark's
  4. 23 Jul, 2018 6 commits
    • Paul Eggert's avatar
      (format "%#x" 0) yields "0", not "0x0" · 90256285
      Paul Eggert authored
      * doc/lispref/strings.texi (Formatting Strings):
      * src/editfns.c (Fformat): Document this.
    • Noam Postavsky's avatar
      Omit keymap from subword-mode docstring (Bug#32212) · 1208aaa9
      Noam Postavsky authored
      * lisp/progmodes/subword.el (subword-mode): Remove listing of
      subword-mode-map bindings, since it is empty as of 2014-03-23 "Merge
      capitalized-words-mode and subword-mode".
    • Tino Calancha's avatar
      Prevent line-mode term from showing user passwords · 2b70b547
      Tino Calancha authored
      For buffers whose mode derive from comint-mode, the user password is
      read from the minibuffer and it's hidden.  A buffer in term-mode and
      line submode, instead shows the passwords.  Make buffers in line
      term-mode to hide passwords too (Bug#30190).
      * lisp/term.el (term-send-invisible): Prefer the more robust
      `read-passwd' instead of `term-read-noecho'.
      (term-watch-for-password-prompt): New function.
      (term-emulate-terminal): Call it each time we receive non-escape
      sequence output.
      Co-authored-by: default avatarNoam Postavsky <npostavs@gmail.com>
    • Paul Eggert's avatar
      0x%x → %#x in elisp formats · 57c4bc14
      Paul Eggert authored
      * lisp/emacs-lisp/cl-print.el (cl-print-object):
      * lisp/profiler.el (profiler-format-entry):
      * lisp/progmodes/hideif.el (hif-evaluate-macro):
      Prefer %#x to 0x%x in elisp formats when formatting arbitrary
      integers, as it’ll produce more-readable output with negative args
      should we change how negative values are printed with %x.
    • Paul Eggert's avatar
      positive → nonnegative doc fixes · 109cb152
      Paul Eggert authored
      * doc/lispref/numbers.texi (Bitwise Operations)
      (Math Functions):
      * doc/lispref/strings.texi (Formatting Strings):
      * src/editfns.c (Fformat):
      Correct “positive” with “nonnegative” in some documentation.
    • Lars Ingebrigtsen's avatar
      Revert "Make nnimap support IMAP namespaces" · 216b9b2d
      Lars Ingebrigtsen authored
      This reverts commit 7b5b3ddb.
      Insufficiently tested before committing -- bugs out several places
      when not using namespaces.
  5. 22 Jul, 2018 10 commits
    • Arash Esbati's avatar
      Add \eqref to RefTeX's reference styles (Bug#32203) · 8f3bca3a
      Arash Esbati authored
      * lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add entry
      for \eqref provided by amsmath.sty and bind it to "e" key.
    • Noam Postavsky's avatar
      Preserve nonblank whitespace when indenting (Bug#32200) · 8217998b
      Noam Postavsky authored
      * lisp/indent.el (indent-line-to): Remove only spaces and tabs, not
      any whitespace syntax characters.
    • Lars Ingebrigtsen's avatar
      Add further clarifications to gnus-blocked-images · 6e697bce
      Lars Ingebrigtsen authored
      * lisp/gnus/gnus-art.el (gnus-blocked-images): Add further
    • Nikolaus Rath's avatar
      Make nnimap support IMAP namespaces · 7b5b3ddb
      Nikolaus Rath authored
      * lisp/gnus/nnimap.el (nnimap-use-namespaces): Introduc new
      server variable.
      (nnimap-group-to-imap, nnimap-get-groups): Transform IMAP group
      names to Gnus group name by stripping / prefixing personal
      namespace prefix.
      (nnimap-open-connection-1): Ask server for namespaces and store them.
      * lisp/gnus/nnimap.el (nnimap-request-group-scan)
      (nnimap-request-create-group, nnimap-request-delete-group)
      (nnimap-request-rename-group, nnimap-request-move-article)
      (nnimap-request-accept-article, nnimap-request-list)
      (nnimap-retrieve-group-data-early, nnimap-change-group)
      (nnimap-split-incoming-mail): Use nnimap-group-to-imap.
      (nnimap-group-to-imap): New function to map Gnus group names to
      IMAP folder names.
    • Lars Ingebrigtsen's avatar
      Make async :family 'local failures fail correctly again · 92ba34d8
      Lars Ingebrigtsen authored
      * src/fileio.c (get_file_errno_data): Refactor out into its own
      function so that we can reuse the error handling from an async
      context (bug#31901).
      * src/process.c (connect_network_socket): When an async :family
      'local client fails (with a file error, for instance), mark the
      process as failed.
    • Michael Albinus's avatar
      thread-join returns the result of finished thread · e2372797
      Michael Albinus authored
      * doc/lispref/threads.texi (Basic Thread Functions):
      * etc/NEWS: Document return value of `thread-join'.
      * src/thread.c (invoke_thread_function, Fmake_thread)
      (init_main_thread): Set result.
      (Fthread_join): Propagate signals, and return result.
      (Vmain_thread): New defvar.
      * src/thread.h (struct thread_state): Add `result' field.
      * test/src/thread-tests.el (threads-join): Test also return value.
      (threads-join-error): New test.
      (threads-mutex-signal): Check for propagation of `quit' signal.
    • John Shahid's avatar
      Avoid destroying match data in 'setenv' (Bug#32201) · b7ca3d5d
      John Shahid authored
      * lisp/env.el (setenv,setenv-internal): Replace string-match with
    • Jonathan Kyle Mitchell's avatar
      Check for special filenames in eshell (Bug#30724) · 5de44411
      Jonathan Kyle Mitchell authored
      * lisp/eshell/esh-cmd.el (eshell-lisp-command): Check for "~"
      in lisp commands with the eshell-filename-arguments property
      * lisp/eshell/em-dirs.el (eshell/cd, eshell/pushd, eshell/popd):
      * lisp/eshell/em-ls.el (eshell/ls):
      * lisp/eshell/em-unix.el (eshell/rm, eshell/mkdir, eshell/rmdir)
      (eshell/mv, eshell/cp, eshell/ln, eshell/cat, eshell/du, eshell/diff):
      * lisp/eshell/esh-ext.el (eshell/addpath): Add
      eshell-filename-arguments to symbol plist.
    • Noam Postavsky's avatar
      Fix indent-sexp of #s(...) (Bug#31984) · 1b4b9659
      Noam Postavsky authored
      * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Look for a sexp that
      ends after the current line.
      * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-go): New test.
    • Noam Postavsky's avatar
      Add save-match-data to abbreviate-file-name (Bug#32201) · 59e85332
      Noam Postavsky authored
      * lisp/files.el (abbreviate-file-name): Save match-data around
      expand-file-name; it is not guaranteed to preserve match-data, and may
      well do so depending on what file handlers and hooks are in effect.
  6. 21 Jul, 2018 11 commits
    • Eli Zaretskii's avatar
      Fix last change in editfns.c · 47f75b1b
      Eli Zaretskii authored
      * src/editfns.c (Freplace_buffer_contents): Fix last change: always
      call buffer modification hooks, even if nothing was deleted/inserted.
    • Eli Zaretskii's avatar
      Fix calls to buffer modification hooks from replace-buffer-contents · 671dc5a5
      Eli Zaretskii authored
      * src/editfns.c (Freplace_buffer_contents): Don't call buffer
      modification hooks if nothing was deleted/inserted.  (Bug#32237)
    • Eli Zaretskii's avatar
    • Ken Brown's avatar
      Pacify GCC 7 with -Wformat-overflow · f3f67cf0
      Ken Brown authored
      * src/w32term.c (x_draw_glyphless_glyph_string_foreground):
      Force sprintf to write at most 6 bytes, excluding the
      terminating null byte.
    • Eli Zaretskii's avatar
      Minor rewording of last change · d1221532
      Eli Zaretskii authored
      * lisp/vc/add-log.el (add-log-dont-create-changelog-file)
      (add-log--changelog-buffer-p, add-change-log-entry): Doc fixes.
      * etc/NEWS: Improve wording of last change.
      * doc/emacs/maintaining.texi (Change Log Commands): Improve
      wording of last change.
    • João Távora's avatar
      New option to make 'C-x 4 a' use file-less ChangeLog buffers · f96fe57f
      João Távora authored
      * doc/emacs/maintaining.texi (Change Log Commands): Document
      * etc/NEWS (Change Logs Mode): Mention
      * lisp/vc/add-log.el (add-log-file-name): Add comment.
      (add-log-dont-create-changelog-file): New variable.
      (add-log--changelog-buffer-p): New helpers.
      (add-log-find-changelog-buffer): New function.
      (add-log--pseudo-changelog-buffer-name): Respect
      * lisp/vc/log-edit.el (log-edit-changelog-entries): Use
    • Bozhidar Batsov's avatar
      Make ielm accept an optional buffer name param · 6eac401c
      Bozhidar Batsov authored
      The ielm buffer name was hardcoded which made it hard for programs to
      interactively create ielm buffers with different names and switch to
      them (e.g. perhaps you want to have one ielm buffer for each of the
      Elisp projects you're working on).
    • Michael Albinus's avatar
      Fix Bug#32226 · e0f33ea3
      Michael Albinus authored
      * lisp/shadowfile.el (shadow-site-name, shadow-name-site):
      Use "[-.[:word:]]+" as hostname regexp.  (Bug#32226)
      * test/lisp/shadowfile-tests.el (shadow-test06-literal-groups)
      (shadow-test07-regexp-groups, shadow-test08-shadow-todo)
      (shadow-test09-shadow-copy-files): Skip if needed.
    • Eli Zaretskii's avatar
      Improve doc strings of several variables in keyboard.c · 7308fa0e
      Eli Zaretskii authored
      * src/keyboard.c (syms_of_keyboard) <debug-on-event>
      <attempt-orderly-shutdown-on-fatal-signal>: Make sure the first
      sentence of the doc string fits on a single line.
    • Eli Zaretskii's avatar
      Fix recording keyboard macros when input method is active · 03e3440d
      Eli Zaretskii authored
      * lisp/international/quail.el (quail-start-translation)
      (quail-start-conversion): Bind inhibit--record-char to t for
      the first character of a translated sequence.
      * src/keyboard.c (record_char): Don't record events from
      macros to dribble file, per documentation.
      (Fopen_dribble_file): Doc fix.
      (syms_of_keyboard) <inhibit--record-char>: New variable.
      (record_char): Don't record input event if
      inhibit--record-char is non-nil.  (Bug#32108)
    • Paul Eggert's avatar
      Report base of out-of-range input fixnums · 1780502d
      Paul Eggert authored
      * src/lread.c (string_to_number): Report the base of an
      out-of-range fixnum.  Problem reported by Andy Moreton in:
  7. 20 Jul, 2018 1 commit