1. 10 Aug, 2019 1 commit
  2. 09 Aug, 2019 3 commits
  3. 08 Aug, 2019 4 commits
    • Michael Albinus's avatar
      Work on Tramp backward compatibility · f9beb2bf
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
      * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
      * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
      Use `tramp-compat-directory-name-p'.
    • Michael Albinus's avatar
      Suppress false alarm in Tramp · 4084c160
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-dissect-file-name): Suppress false alarm.
    • Mattias Engdegård's avatar
      Suppress relint errors in fortran.el · d1ec33ea
      Mattias Engdegård authored
      * lisp/progmodes/fortran.el (fortran-indent-to-column):
      Suppress relint complaints about duplicated character in skip-set;
      it's intentional and harmless.
    • Mattias Engdegård's avatar
      Fix XTerm OSC 52 selection retrieval (bug#36879) · f09dc0b8
      Mattias Engdegård authored
      When asking XTerm for the selection via OSC 52, use ST as string
      terminator in the request to get ST as terminator in the reply,
      because BEL is messy to receive in many ways.
      * lisp/term/xterm.el (gui-backend-get-selection):
      Use ST as string terminator in request and reply.
      Use a time-out when reading the reply.
  4. 07 Aug, 2019 1 commit
  5. 06 Aug, 2019 9 commits
    • Alan Mackenzie's avatar
      C++ Mode: Prevent End of statement being found after {} in "count << vec{} <<" · 7f0de07b
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Check for
      operators which cannot start a statement, which may follow a closing brace.
      Don't recognise an end of statement in such a case.
      * lisp/progmodes/cc-langs.el (c-operator-re, c-bin-tern-operators)
      (c-unary-operators, c-non-after-{}-operators, c-non-after-{}-ops-re): New lang
      consts and vars.
    • Mattias Engdegård's avatar
      Fix various Calc date conversions (bug#36822) · 4ce9c6d0
      Mattias Engdegård authored
      * lisp/calc/calc-forms.el (math-absolute-from-gregorian-dt):
      Rewrite in a way that I understand, and that actually seems to work.
      (math-absolute-from-julian-dt): Use Julian, not Gregorian, leap year
      rules for counting days within a year.
      (math-julian-date-beginning, math-julian-date-beginning-int):
      Change constants to be consistent with their doc strings and the code:
      use Rata Die epoch at Dec 31, 1 BC Gregorian proleptic, not Julian.
      * doc/misc/calc.texi (Date Forms): Correct difference between Julian
      Day and Rata Die.
      * test/lisp/calc/calc-tests.el (calc-test-calendar): New test.
    • Mattias Engdegård's avatar
      Add conditional operator xor to subr.el · c676444a
      Mattias Engdegård authored
      Suggested by Oleh Krehel and implemented by Basil Contovounesios in
      the following thread:
      * lisp/array.el (xor): Move unused function from here...
      * lisp/subr.el: ...to here, and improve.
      * lisp/gnus/spam.el (spam-xor):
      * lisp/play/5x5.el (5x5-xor):
      * lisp/proced.el (proced-xor):
      * lisp/progmodes/idlwave.el (idlwave-xor):
      * lisp/vc/diff-mode.el (diff-xor): Define as obsolete aliases of,
      and replace all uses with, xor.
      * lisp/jsonrpc.el: Remove unused dependency on array.el.
      * lisp/org/org.el (org-xor): Move from here...
      * lisp/org/org-compat.el (org-xor): ...to here, as a compatibility
      shim for xor.
      * lisp/progmodes/idlw-shell.el (idlwave-shell-enable-all-bp):
      * lisp/simple.el (exchange-point-and-mark):
      * lisp/windmove.el (windmove-display-in-direction): Use xor.
      * lisp/strokes.el (strokes-xor): Remove commented-out xor
      * doc/lispref/control.texi (Control Structures): Extend menu ...
    • Stefan Monnier's avatar
      Move cl.el to lisp/obsolete · 1d8b5bc8
      Stefan Monnier authored
      * lisp/emacs-lisp/cl.el: Move from here...
      * lisp/obsolete/cl.el: ...to here.
      * lisp/subr.el (do-after-load-evaluation): Use "deprecated" in the
      message when loading packages from lisp/obsolete.
    • Stefan Monnier's avatar
      * lisp/mail/rfc2047.el (rfc2047-encodable-p): Don't require `message`. · 6231483b
      Stefan Monnier authored
      Use bound-and-true-p rather than requiring `message` to get
      message-posting-charset (since it defaults to nil anyway).
    • Stefan Monnier's avatar
      * lisp/mh-e: Use cl-lib · 74b097b6
      Stefan Monnier authored
      Also, use underscore prefixes and defvar in preparation for lexical binding
      * lisp/mh-e/mh-acros.el: Require cl-lib instead of cl.
      Rename all cl.el uses by adding `cl-` prefix.
      (mh-require-cl): Remove.  Not needed any more.  Remove all calls.
      (mh-defstruct): Remove.  Replace all uses with cl-defstruct.
      (mh-dlet*): New macro.
      * lisp/mh-e/mh-comp.el (mh-user-agent-compose): Fold all ignored
      optional args into the &rest arg.
      * lisp/mh-e/mh-e.el: Require cl-lib instead of using mh-require-cl.
      (mh-variants): Don't add-to-list on a local var.
      * lisp/mh-e/mh-folder.el (mh-restore-desktop-buffer): Use shorter arg
      names that don't collide with global vars.
      * lisp/mh-e/mh-mime.el (mh-insert-mime-button):
      (mh-insert-mime-security-button): Use mh-dlet*.
      * lisp/mh-e/mh-search.el (mh-swish-next-result, mh-grep-next-result)
      (mh-namazu-next-result): Use `or`.
      * lisp/mh-e/mh-thread.el (mh-thread-generate)
      (mh-thread-prune-containers): Use underscore rather than declare+ignore.
      * lisp/mh-e/mh-tool-bar.el (mh-tool-bar-define): Use mh-dlet*.
      (mh-tool-bar-define): Prefer the more precise \`...\' regexp ops.
      Prefer Elisp's `eval-and-compile` over `cl-eval-when`.
      * lisp/mh-e/mh-xface.el (mh-picon-get-image): Don't use
      mh-funcall-if-exists for ietf-drums-parse-address.
      Avoid the use of `cl-return` and hence use plain `defun`.
      Replace some `cl-loop` with `dolist`.
    • Paul Eggert's avatar
      decode-time now returns subsec too · b06917a4
      Paul Eggert authored
      The list that decode-time returns now contains an extra
      trailing component that counts the subseconds part of the
      original timestamp (Bug#36549).
      This builds on a suggestion by Lars Ingebrigtsen in:
      * doc/lispref/os.texi (Time Conversion):
      * doc/misc/emacs-mime.texi (time-date):
      * etc/NEWS: Document this.
      * lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
      * lisp/calendar/iso8601.el (iso8601-parse)
      (iso8601-parse-time, iso8601-parse-duration)
      * lisp/calendar/parse-time.el (parse-time-string):
      * lisp/calendar/time-date.el (make-decoded-time)
      * lisp/org/org.el (org-fix-decoded-time)
      * src/timefns.c (Fdecode_time):
      Generate subsec member for decoded time.
      * lisp/calendar/time-date.el (decoded-time-add)
      Add the decoded subsec too.
      * lisp/simple.el (decoded-time): New subsec member.
      * src/data.c (Frem): Simplify zero-check to match that of new Fmod.
      (integer_mod): New function, with most of the guts of the old Fmod.
      Remove redundant zero-check.
      (Fmod): Use it.
      * src/timefns.c (Fencode_time): Handle new subsec member
      or (with the obsolescent calling convention) subsec arg.
      It defaults to 0.
      * test/lisp/calendar/icalendar-tests.el:
      * test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years)
      (test-iso8601-date-dates, test-iso8601-date-obsolete)
      (test-iso8601-date-weeks, test-iso8601-date-ordinals)
      (test-iso8601-time, test-iso8601-combined)
      (test-iso8601-duration, test-iso8601-intervals)
      (standard-test-dates, standard-test-time-of-day-fractions)
      (standard-test-date-and-time-of-day, standard-test-interval):
      * test/lisp/calendar/parse-time-tests.el (parse-time-tests):
      * test/src/timefns-tests.el (format-time-string-with-zone)
      Adjust to match new behavior.
    • Paul Eggert's avatar
      New function time-convert · 89c63b35
      Paul Eggert authored
      This replaces the awkward reuse of encode-time to both convert
      calendrical timestamps to Lisp timestamps, and to convert Lisp
      timestamps to other forms.  Now, encode-time does just the
      former and the new function does just the latter.
      The new function builds on a suggestion by Lars Ingebrigtsen in:
      and refined by Stefan Monnier in:
      * doc/lispref/os.texi (Time of Day, Time Conversion):
      * doc/misc/emacs-mime.texi (time-date):
      * etc/NEWS: Update documentation.
      * lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
      * lisp/calendar/time-date.el (seconds-to-time, days-to-time):
      * lisp/calendar/timeclock.el (timeclock-seconds-to-time):
      * lisp/cedet/ede/detect.el (ede-detect-qtest):
      * lisp/completion.el (cmpl-hours-since-origin):
      * lisp/ecomplete.el (ecomplete-add-item):
      * lisp/emacs-lisp/cl-extra.el (cl--random-time):
      * lisp/emacs-lisp/timer.el (timer--time-sette...
    • Paul Eggert's avatar
      Fix minor Org timestamp inefficiencies · c6ba8100
      Paul Eggert authored
      * lisp/org/org-id.el (org-id-time-to-b36):
      Remove unnecessary ‘or’.
      * lisp/org/org.el (org-parse-time-string):
      Remove unnecessary ‘encode-time’.
  6. 05 Aug, 2019 10 commits
    • Juri Linkov's avatar
      * lisp/cus-start.el: Add :safe to display-fill-column-indicator (bug#36861) · aa624a09
      Juri Linkov authored
      (display-fill-column-indicator-character): Add :safe predicates.
    • Juri Linkov's avatar
      * lisp/frameset.el (frameset--minibufferless-last-p): Fix pcase-let. · 0c9075f0
      Juri Linkov authored
      This makes frameset sorting stable.  (Bug#36894)
    • Juri Linkov's avatar
      * lisp/dired-x.el (dired-guess-shell-alist-default): Use git when possible. · bf276b79
      Juri Linkov authored
      Check for Git backend and provide "git apply" for patch files (bug#36895).
    • Juri Linkov's avatar
      * lisp/dired.el (dired-special): Rename face from dired-socket (bug#24547). · f986269f
      Juri Linkov authored
      (dired-re-special): Rename from dired-re-socket.
    • Juri Linkov's avatar
      * lisp/isearch.el (isearch-define-mode-toggle): Ensure isearch-mode is active. · 883438ef
      Juri Linkov authored
      Call 'isearch-mode' when it's nil.  (Bug#36871)
    • Lars Ingebrigtsen's avatar
      Revert "Make `view-lossage' output of chars read from `read-char' more logical" · 0bbcd89c
      Lars Ingebrigtsen authored
      This reverts commit 1abf7687.
      This change apparently led to problems with kmacro.
    • Michael Albinus's avatar
      Improve Tramp's caching · 6c1d0d53
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-add-name-to-file)
      * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory)
      (tramp-adb-handle-delete-file, tramp-adb-handle-write-region)
      (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file)
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
      (tramp-gvfs-handle-set-file-times, tramp-gvfs-set-file-uid-gid):
      * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file)
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
      (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
      (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file)
      (tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file)
      * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
      (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
      (tramp-smb-handle-rename-file, tramp-smb-handle-write-region):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-add-name-to-file)
      (tramp-sudoedit-handle-make-symbolic-link): Do not flush all file
      properties of upper directory.
      * lisp/net/tramp-cache.el (tramp-flush-file-upper-properties):
      New defun.
      (tramp-flush-file-properties, tramp-flush-directory-properties):
      Use it.
      * test/lisp/net/tramp-tests.el (tramp-time-diff): Declare.
      (tramp--test-file-attributes-equal-p): Handle also modification
      and status change time.
    • Lars Ingebrigtsen's avatar
      Make `view-lossage' output of chars read from `read-char' more logical · 1abf7687
      Lars Ingebrigtsen authored
      * lisp/help.el (view-lossage): Use the new data format to output
      data from `read-char' and the like in a more understandable
      fashion (bug#21867).
      * src/keyboard.c (command_loop_1): Record (in recent_keys) the end
      of commands.
      (Frecent_keys): Don't include `end-of-command' in non-command outputs.
      (syms_of_keyboard): Define `end-of-command'.
    • Lars Ingebrigtsen's avatar
      save-some-buffers-default-predicate doc clarification · f1f6f20c
      Lars Ingebrigtsen authored
      * lisp/files.el (save-some-buffers-default-predicate): Clarify
      calling convention.
    • Martin Rudalics's avatar
      Fix doc-strings of 'display-buffer-*' functions (Bug#19461) · 88be35e1
      Martin Rudalics authored
      * lisp/window.el (display-buffer-in-atom-window)
      (display-buffer-in-side-window, display-buffer-record-window)
      (display-buffer-use-some-frame, display-buffer-same-window)
      (display-buffer-reuse-window, display-buffer-pop-up-frame)
      (display-buffer-pop-up-window, display-buffer-in-child-frame)
      (display-buffer-in-direction, display-buffer-below-selected)
      (display-buffer-at-bottom, display-buffer-in-previous-window)
      (display-buffer--maybe-pop-up-frame): Fix doc-strings
  7. 04 Aug, 2019 9 commits
    • Paul Eggert's avatar
      Fix one more 2019-08-04 regex lint · 543568b6
      Paul Eggert authored
      Problem clarified by Mattias Engdegård in:
      * lisp/isearch.el (isearch-symbol-regexp):
      Remove \s@ from regexp as it cannot match.
    • Basil L. Contovounesios's avatar
      Support reverting Apropos buffers (bug#36588) · 4cd41ba8
      Basil L. Contovounesios authored
      * lisp/apropos.el (apropos--current): New variable akin to
      help-xref-stack-item storing information for revert-buffer.
      (apropos--revert-buffer): New function.
      (apropos-mode): Use it as revert-buffer-function.
      (apropos-command, apropos, apropos-library, apropos-value)
      (apropos-local-value, apropos-documentation): Set apropos--current
      in low-level commands, i.e., those which do not call other commands.
    • Paul Eggert's avatar
      Fix 2019-08-04 regex lint · a5b796a8
      Paul Eggert authored
      Problem reported by Mattias Engdegård in:
      * lisp/calendar/diary-lib.el (diary-glob-file-regexp-prefix):
      Omit unnecessary ‘\’ before ordinary char.
      * lisp/cedet/inversion.el (inversion-decoders):
      * lisp/org/ob-haskell.el (org-babel-haskell-export-to-lhs):
      Omit unnecessary ‘?’ after nullable pattern.
      * lisp/org/org-capture.el (org-capture-fill-template):
      Match upper-case as well as lower-case letters.
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
      Simplify ‘.|\r’ to ‘.’.
      * lisp/progmodes/gdb-mi.el (gdb-jsonify-buffer):
      Put ‘-’ at end of bracket expression.
    • Paul Eggert's avatar
      Improve time function doc · 5f3f3884
      Paul Eggert authored
      * doc/misc/emacs-mime.texi (time-date): Don’t give
      parse-iso8601-time-string in the example, as the function is
      not autoloaded.
      * lisp/gnus/nndiary.el (nndiary-compute-reminders):
      No need to call encode-time or use floating point here.
    • Michael Heerdegen's avatar
      Clarify macroexp-let* doc string · bbb41a20
      Michael Heerdegen authored
      * lisp/emacs-lisp/macroexp.el (macroexp-let2*): Clarify doc
      string (bug#19371).
    • Michael Albinus's avatar
      Implement set-file-* functions for tramp-gvfs.el · 2abcca23
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping):
      Add "gvfs-set-attribute".
      Add `tramp-gvfs-handle-set-file-modes',
      `tramp-gvfs-handle-set-file-times' and
      (tramp-sh-handle-set-file-uid-gid): New defuns.
      * lisp/net/tramp.el (tramp-handle-write-region): Set file modes.
      * test/lisp/net/tramp-tests.el (tramp-test20-file-modes)
      (tramp-test22-file-times): Do not skip for tramp-gvfs.el.
    • Martin Rudalics's avatar
      Fix two mouse drag and drop issues (Bug#28620, Bug#36269) · 5ec3f705
      Martin Rudalics authored
      Allow 'mouse-drag-and-drop-region' to move/copy text from one
      frame to another (Bug#28620).  Prevent mouse avoidance mode from
      interfering with 'mouse-drag-and-drop-region' (Bug#36269).
      * lisp/avoid.el (mouse-avoidance-ignore-p): Suspend avoidance
      when 'track-mouse' equals 'dropping'.
      * lisp/mouse.el (mouse-drag-and-drop-region): Set
      'track-mouse' to 'dropping'.  Continue reading events also
      when switching frames.
      * src/keyboard.c (Finternal_track_mouse): Rename from
      (some_mouse_moved): Return NULL also when mouse is not tracked.
      (show_help_echo, readable_events, kbd_buffer_get_event): Don't
      check whether mouse is tracked, some_mouse_moved does it now.
      (track_mouse): Rename variable from do_mouse_tracking.  Adjust
      all users.  In doc-string explain meanings of special values
      'dragging' and 'dropping'.
      * src/nsterm.m (ns_mouse_position): During drag and drop
      consider last mouse frame only when there is no currently
      focused frame.
      * src/w32fns.c (w32_wnd_proc): Don't set mouse capture during a
      drag and drop operation.
      * src/w32term.c (w32_mouse_position): Track frame under mouse
      during mouse drag and drop.
      (mouse_or_wdesc_frame): New function.
      (w32_read_socket): Call mouse_or_wdesc_frame on mouse events.
      * src/xdisp.c (define_frame_cursor1): Don't change mouse cursor
      shape during mouse drag and drop.
      (syms_of_xdisp): New symbol Qdropping.
      * src/xterm.c (XTmouse_position): Allow mouse drag and drop move
      to another frame
      (mouse_or_wdesc_frame): New function.
      (handle_one_xevent): Use mouse_or_wdesc_frame for mouse events.
    • Noam Postavsky's avatar
      Improved ChangeLog generation for vc log (Bug#16301) · 01661f33
      Noam Postavsky authored
      * lisp/vc/diff-mode.el (diff-find-source-location): Fix docstring.
      * lisp/vc/add-log.el (change-log-unindented-file-names-re)
      (change-log-read-entries, change-log-read-defuns)
      * lisp/vc/diff-mode.el (diff-add-log-current-defuns):
      * lisp/vc/log-edit.el (log-edit--insert-filled-defuns)
      (log-edit-fill-entry): New functions.
      (log-edit-mode): Set `log-edit-fill-entry' as
      (log-edit-generate-changelog-from-diff): New command.
      (log-edit-mode-map): Bind it to C-c C-w.
      * doc/emacs/maintaining.texi (Types of Log File, Log Buffer):
      * CONTRIBUTE: Document it.
      * etc/NEWS: Announce it.
      * test/lisp/vc/log-edit-tests.el (log-edit-fill-entry)
      (log-edit-fill-entry-joining): New tests.
    • Eric Abrahamsen's avatar
      Fix Gnus group name reference in gnus-mark-xrefs-as-read · 2d47483e
      Eric Abrahamsen authored
      * lisp/gnus/gnus-sum.el (gnus-mark-xrefs-as-read): There's already a
      local binding for "group", don't need another "name". This was left
      over from the obarray-to-hashtable change.
  8. 03 Aug, 2019 3 commits
    • Eric Abrahamsen's avatar
      Temporarily preserve encoded Gnus group names in Gnus files · 727e0eab
      Eric Abrahamsen authored
      Non-ascii Gnus groups should be written to files in their encoded
      version until we're ready to bump Gnus' version and add an upgrade
      * lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format):
      * lisp/gnus/gnus-agent.el (gnus-category-read):
        (gnus-category-write): Handle non-ascii group names appropriately.
      * lisp/gnus/gnus-registry.el (gnus-registry--munge-group-names): New
        function to encode/decode group names.
        (gnus-registry-save): Use function.
    • Eric Abrahamsen's avatar
      Remove Gnus group name encoding/decoding · cb12a84f
      Eric Abrahamsen authored
      This completes the process started in c1b63af4. Gnus group names are
      now fully decoded inside the Gnus system.
      * lisp/gnus/gnus-agent.el (gnus-agent-file-coding-system): Change
        default to utf-8-emacs.
        (gnus-agent-decoded-group-names, gnus-agent-decoded-group-name):
        Remove variable and function. Remove all usage in this file.
      * lisp/gnus/gnus-cache.el (gnus-cache-decoded-group-names,
        gnus-cache-unified-group-names, gnus-cache-decoded-group-name):
        Remove these variables and function. Remove all usage in this file.
      * lisp/gnus/gnus-group.el (gnus-tmp-decoded-group): Remove this
        variable, gnus-tmp-group is now decoded.
        (gnus-group-completing-read): Don't encode or decode group names
        (gnus-group-make-group): Remove ENCODED argument.
      * lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Decode group
        names here.
      * lisp/gnus/gnus-start.el (gnus-make-hashtable-from-newsrc-alist):
        check for encoded group names and decode.
        (gnus-active-to-gnus-format): Make sure incoming group names are
        (gnus-read-newsrc-el-file): Check for encoded group names in
      * lisp/gnus/nnagent.el: Don't use a unibyte buffer.
      * lisp/gnus/nnheader.el (nnheader-file-coding-system): Switch default
        from 'raw-text to 'undecided, on the assumption that 'undecided will
        probably write 'utf-8-emacs unless the user has arranged things
      * lisp/gnus/nnimap.el (nnimap-decode-gnus-group,
        nnimap-encode-gnus-group): Remove functions and their use.
      * lisp/gnus/nnmail.el (nnmail-parse-active): Remove encoding.
        (nnmail-active-file-coding-system): Default to 'utf-8-emacs instead
        of 'raw-text.
        (nnmail-group-names-not-encoded-p): Obsolete this variable; stop
        using it.
      * lisp/gnus/gnus-art.el:
      * lisp/gnus/gnus-cus.el:
      * lisp/gnus/gnus-msg.el:
      * lisp/gnus/gnus-start.el:
      * lisp/gnus/gnus-sum.el:
      * lisp/gnus/gnus.el:
      * lisp/gnus/nnml.el:
      * lisp/gnus/message.el:
      * lisp/gnus/nnrss.el: Stop using gnus-group-decoded-name in all these
    • Eric Abrahamsen's avatar
      Fix ordering of Gnus groups after yanking · c6b4eed8
      Eric Abrahamsen authored
      * lisp/gnus/gnus-start.el (gnus-group-change-level): Fix docstring to
      note that the inserted group is inserted *before* the PREVIOUS
      group. Fix indexing -- shouldn't have been adding one to the index.