1. 08 Jul, 2017 3 commits
    • Paul Eggert's avatar
      Fix more ungetc bugs with encoding errors · b8ead34f
      Paul Eggert authored
      * src/lread.c (infile): New variable, replacing ...
      (instream): ... this.  All uses changed.
      (readbyte_from_stdio): New function, which deals with lookahead.
      (readbyte_from_file, Fget_file_char): Use it.
      (Fget_file_char): When misused, signal an error instead of
      relying on undefined behavior.
      (close_infile_unwind): New function.
      (Fload): Use it.
      (readevalloop): 2nd arg is now struct infile *, not FILE *.
      All callers changed.
      (read1): Handle lookahead when copying doc strings with
      encoding errors.
      b8ead34f
    • Paul Eggert's avatar
      Avoid ungetc when loading charset maps from files · 16283058
      Paul Eggert authored
      * src/charset.c (read_hex): New args LOOKAHEAD and TERMINATOR,
      replacing the old EOF.  All callers changed.  This avoids the
      need to call ungetc.
      16283058
    • Paul Eggert's avatar
      Fix ungetc bug when reading an encoding error · d2832063
      Paul Eggert authored
      * src/lread.c (readchar, read_emacs_mule_char): Fix off-by-one
      error when reading an encoding error from a file, e.g., a symbol
      in an .elc file whose name is "\360\220\200\360".
      d2832063
  2. 07 Jul, 2017 8 commits
    • Noam Postavsky's avatar
      ; Fix extra "," in previous commit · c819c053
      Noam Postavsky authored
      c819c053
    • Stefan Monnier's avatar
    • Stefan Monnier's avatar
    • Stephen Berman's avatar
      Add new todo-mode.el tests · c24748ad
      Stephen Berman authored
      * test/lisp/calendar/todo-mode-tests.el (with-todo-test):
      Declare an Edebug spec.  Restore pre-test-run state of test files.
      (todo-test--show, todo-test--move-item)
      (todo-test--insert-item): New functions.
      (todo-test-get-archive): Remove, as subsumed by
      todo-test--show.  Adjust all callers.
      (todo-test--is-current-buffer): Rename from
      todo-test-is-current-buffer and adjust uses.
      (todo-test-item-highlighting): Use todo-test--show.
      (todo-test-revert-buffer01, todo-test-revert-buffer02)
      (todo-test-raise-lower-priority)
      (todo-test-todo-mark-unmark-category, todo-test-move-item01)
      (todo-test-move-item02, todo-test-move-item03)
      (todo-test-move-item04, todo-test-move-item05)
      (todo-test-toggle-item-header01)
      (todo-test-toggle-item-header02)
      (todo-test-toggle-item-header03)
      (todo-test-toggle-item-header04)
      (todo-test-toggle-item-header05)
      (todo-test-toggle-item-header06)
      (todo-test-toggle-item-header07): New tests.
      
      * test/lisp/calendar/todo-mode-resources/todo-test-1.toda:
      * test/lisp/calendar/todo-mode-resources/todo-test-1.todo:
      Modify to accommodate new tests.
      c24748ad
    • Stephen Berman's avatar
      todo-mode.el: Fix handling of hidden item headers (bug#27609) · 264dd81d
      Stephen Berman authored
      * lisp/calendar/todo-mode.el (todo--item-headers-hidden): New variable.
      (todo-toggle-item-header): Use it.  Make this command a noop
      if the file has no items.
      (todo-move-item, todo-item-done): Instead of concatenating the
      items to move into one string, make a list of them to
      facilitate handling hidden headers.  Adjust insertion accordingly.
      (todo-archive-done-item): Handle hidden headers in archive file.
      (todo-unarchive-items): Handle hidden headers in todo file.
      (todo-backward-item): Use todo--item-headers-hidden and handle
      moving backward work when item date-time headers are hidden.
      (todo-remove-item): Delete date-time header overlay.
      (todo-get-overlay, todo-insert-with-overlays): Make them work
      with hidden date-time headers.
      (todo-modes-set-2): Make todo--item-headers-hidden buffer local.
      264dd81d
    • Stephen Berman's avatar
      Fix several todo-mode bugs found while debugging bug#27609 · 1cf6b157
      Stephen Berman authored
      * lisp/calendar/todo-mode.el (todo-toggle-mark-item): Calculate
      current category only once.
      (todo-mark-category): Update number of marked items to avoid
      spurious duplication in todo-categories-with-marks alist and
      corruption of the todo-categories alist.  Handle empty line
      when there are no todo items and done items are shown.
      (todo-set-item-priority): Make noop if called from
      todo-raise-item-priority or todo-lower-item-priority when
      point is on a done todo item or an empty line.
      (todo-move-item): Use markers instead of integer positions to
      correctly handle deleting the now moved items from the source
      category (without markers an infinite loop arises when moving
      marked item to a preceding category).
      (todo-unarchive-items): Put point on the (first) restored done
      item, instead of leaving it at the end of the done items
      separator string.
      (todo-revert-buffer): Ensure buffer remains read-only after
      reverting.
      1cf6b157
    • Martin Rudalics's avatar
      Remove Vwindow_text_change_functions and related code · 579a9ee2
      Martin Rudalics authored
      Vwindow_text_change_functions had been provided for implementing
      line numbers but apparently was never functional or in use.
      
      * src/xdisp.c (redisplay_window): Remove handling of
      Vwindow_text_change_functions.
      (syms_of_xdisp): Remove Qwindow_text_change_functions.
      (Vwindow_text_change_functions): Remove variable.
      * doc/lispref/hooks.texi (Standard Hooks): Remove entry for
      `window-text-change-functions'.
      579a9ee2
    • Mark Oteiza's avatar
      Convert more uses of looking-at to following-char · 51275358
      Mark Oteiza authored
      More followup to Karl Fogel's commit a84da83c.
      * lisp/dired-aux.el (dired-add-entry, dired-subdir-hidden-p):
      * lisp/dired-x.el (dired-mark-unmarked-files, dired-mark-sexp):
      * lisp/help-fns.el (doc-file-to-man, doc-file-to-info):
      * lisp/proced.el (proced-toggle-marks):
      * lisp/progmodes/f90.el (f90-indent-line):
      * lisp/ses.el (ses-load):
      * lisp/tar-mode.el (tar-expunge): Replace instances of looking-at with
      char comparisons using following-char.
      51275358
  3. 06 Jul, 2017 8 commits
    • Noam Postavsky's avatar
      Don't skip epg tests (Bug#23561) · 1eefada3
      Noam Postavsky authored
      * test/lisp/epg-tests.el (with-epg-tests): Ignore REQUIRE-PASSPHRASE
      parameter, since we supply the passphrase via pinentry-program for all
      GPG versions (as of 2017-02-28 "Fix epg-tests with dummy-pinentry
      program (Bug#23619)").
      (epg-tests-program-alist-for-passphrase-callback): Remove.
      1eefada3
    • Noam Postavsky's avatar
      Fix lisp-comment-indent for single-semicolon case · 386918f0
      Noam Postavsky authored
      * lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): Only check for
      open paren if we're looking at multiple comment characters.
      * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-comment-indent-1)
      (lisp-comment-indent-2): New tests.
      386918f0
    • Paul Eggert's avatar
      Spelling fixes · 20e9a00f
      Paul Eggert authored
      * lisp/org/org-table.el (org-table-sort-lines):
      Fix misspelling in prompt.
      * lisp/org/ox-ascii.el (org-ascii--describe-datum):
      Fix misspelling in call to org-element-lineage.
      20e9a00f
    • Noam Postavsky's avatar
      Don't put whitespace between open paren and comment in Lisp modes (Bug#19740) · 7a0170de
      Noam Postavsky authored
      * lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): If current
      line's code ends in open paren, set comment indentation exactly to
      column following it.
      (lisp-mode-variables): Set `comment-indent-function' to
      `lisp-comment-indent'.
      7a0170de
    • Noam Postavsky's avatar
      Allow comment-indent-functions to specify exact indentation (Bug#385) · e832febf
      Noam Postavsky authored
      * lisp/newcomment.el (comment-choose-indent): Interpret a cons of two
      integers as indicating a range of acceptable indentation.
      (comment-indent): Don't apply `comment-inline-offset',
      `comment-choose-indent' already does that.
      (comment-indent-function):
      * doc/emacs/programs.texi (Options for Comments): Document new
      acceptable return values.
      * etc/NEWS: Announce it.
      e832febf
    • Paul Eggert's avatar
      Check for integer overflow in xbm images · 018600f8
      Paul Eggert authored
      * src/image.c (XBM_TK_OVERFLOW): New constant.
      (xbm_scan): Check for integer overflow instead of relying on
      undefined behavior.  Check that octal digits are actually octal.
      018600f8
    • Paul Eggert's avatar
      Convert hex digits more systematically · d6662694
      Paul Eggert authored
      This makes the code a bit smaller and presumably faster, as
      it substitutes a single lookup for conditional jumps.
      * src/character.c (hexdigit): New constant.
      (syms_of_character) [HEXDIGIT_IS_CONST]: Initialize it.
      * src/character.h (HEXDIGIT_CONST, HEXDIGIT_IS_CONST): New macros.
      (hexdigit): New decl.
      (char_hexdigit): New inline function.
      * src/charset.c: Do not include c-ctype.h.
      * src/charset.c (read_hex):
      * src/editfns.c (styled_format):
      * src/image.c (xbm_scan):
      * src/lread.c (read_escape):
      * src/regex.c (ISXDIGIT) [emacs]:
      Use char_hexdigit insted of doing it by hand.
      d6662694
    • Paul Eggert's avatar
      Don’t use -Woverride-init · 24faf6b0
      Paul Eggert authored
      I have some further changes in mind that would also need to
      disable the -Woverride-init warnings.  In practice these warnings
      seem to be more trouble than they’re worth, so disable them in the
      cc command line.
      * configure.ac: Disable -Woverride-init here ...
      * src/bytecode.c: ... rather than here.
      24faf6b0
  4. 05 Jul, 2017 20 commits
  5. 03 Jul, 2017 1 commit