1. 24 Sep, 2018 1 commit
    • Paul Eggert's avatar
      file-attributes cleanup · 662bee7d
      Paul Eggert authored
      Mostly, this replaces magic-number calls like (nth 4 A) with
      more-informative calls like (file-attribute-access-time A).
      It also fixes some documentation and minor timestamp coding
      issues that I noticed while looking into this.
      * doc/lispref/files.texi (File Attributes):
      * lisp/files.el (file-attribute-size)
      (file-attribute-inode-number, file-attribute-device-number):
      * src/dired.c (Fdirectory_files_and_attributes)
      Mention which attributes must be integers, or nonnegative integers,
      as opposed to merely being numbers.  Remove no-longer-correct
      talk about representing large integers as conses of integers.
      * doc/lispref/files.texi (Magic File Names):
      * doc/misc/gnus.texi (Low-level interface to the spam-stat dictionary):
      * lisp/autorevert.el (auto-revert-find-file-function)
      (auto-revert-tail-mode, auto-revert-handler):
      * lisp/auth-source.el (auth-source-netrc-parse):
      * lisp/cedet/ede/files.el (ede--inode-for-dir):
      * lisp/cedet/semantic/db-file.el (object-write):
      * lisp/cedet/semantic/db-mode.el (semanticdb-kill-hook):
      * lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p)
      * lisp/cedet/srecode/table.el (srecode-mode-table-new):
      * lisp/desktop.el (desktop-save, desktop-read):
      * lisp/dired-aux.el (dired-file-set-difference)
      (dired-do-chxxx, dired-do-chmod, dired-copy-file-recursive)
      * lisp/dired.el (dired-directory-changed-p, dired-readin):
      * lisp/dos-w32.el (w32-direct-print-region-helper):
      * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads)
      (autoload-find-destination, update-directory-autoloads):
      * lisp/emacs-lisp/shadow.el (load-path-shadows-same-file-or-nonexistent):
      * lisp/epg.el (epg--start, epg-wait-for-completion):
      * lisp/eshell/em-ls.el (eshell-ls-filetype-p)
      (eshell-ls-applicable, eshell-ls-size-string)
      (eshell-ls-file, eshell-ls-dir, eshell-ls-files)
      * lisp/eshell/em-pred.el (eshell-predicate-alist)
      (eshell-pred-file-type, eshell-pred-file-links)
      * lisp/eshell/em-unix.el (eshell-shuffle-files, eshell/cat)
      (eshell-du-sum-directory, eshell/du):
      * lisp/eshell/esh-util.el (eshell-read-passwd)
      * lisp/files.el (remote-file-name-inhibit-cache)
      (find-file-noselect, insert-file-1, dir-locals-find-file)
      (dir-locals-read-from-dir, backup-buffer)
      (file-ownership-preserved-p, copy-directory)
      * lisp/find-lisp.el (find-lisp-format):
      * lisp/gnus/gnus-agent.el (gnus-agent-unfetch-articles)
      (gnus-agent-read-agentview, gnus-agent-expire-group-1)
      (gnus-agent-request-article, gnus-agent-regenerate-group)
      * lisp/gnus/gnus-cache.el (gnus-cache-read-active)
      * lisp/gnus/gnus-cloud.el (gnus-cloud-file-new-p):
      * lisp/gnus/gnus-score.el (gnus-score-score-files):
      * lisp/gnus/gnus-start.el (gnus-save-newsrc-file)
      * lisp/gnus/gnus-sum.el (gnus-summary-import-article):
      * lisp/gnus/gnus-util.el (gnus-file-newer-than)
      * lisp/gnus/mail-source.el (mail-source-delete-old-incoming)
      (mail-source-callback, mail-source-movemail):
      * lisp/gnus/nneething.el (nneething-create-mapping)
      * lisp/gnus/nnfolder.el (nnfolder-read-folder):
      * lisp/gnus/nnheader.el (nnheader-file-size)
      * lisp/gnus/nnmail.el (nnmail-activate):
      * lisp/gnus/nnmaildir.el (nnmaildir--group-maxnum)
      (nnmaildir--new-number, nnmaildir--update-nov)
      (nnmaildir--scan, nnmaildir-request-scan)
      * lisp/gnus/nnmh.el (nnmh-request-list-1)
      (nnmh-request-expire-articles, nnmh-update-gnus-unreads):
      * lisp/gnus/nnml.el (nnml-request-expire-articles):
      * lisp/gnus/spam-stat.el (spam-stat-save, spam-stat-load)
      (spam-stat-process-directory, spam-stat-test-directory):
      * lisp/ido.el (ido-directory-too-big-p)
      * lisp/image-dired.el (image-dired-get-thumbnail-image)
      * lisp/info.el (info-insert-file-contents):
      * lisp/ls-lisp.el (ls-lisp-insert-directory)
      (ls-lisp-handle-switches, ls-lisp-classify-file)
      * lisp/mail/blessmail.el:
      * lisp/mail/feedmail.el (feedmail-default-date-generator)
      * lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases)
      * lisp/mail/mspools.el (mspools-size-folder):
      * lisp/mail/rmail.el (rmail-insert-inbox-text):
      * lisp/mail/sendmail.el (sendmail-sync-aliases):
      * lisp/mh-e/mh-alias.el (mh-alias-tstamp):
      * lisp/net/ange-ftp.el (ange-ftp-parse-netrc)
      (ange-ftp-write-region, ange-ftp-file-newer-than-file-p)
      * lisp/net/eudcb-mab.el (eudc-mab-query-internal):
      * lisp/net/eww.el (eww-read-bookmarks):
      * lisp/net/netrc.el (netrc-parse):
      * lisp/net/newst-backend.el (newsticker--image-get):
      * lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file):
      * lisp/obsolete/fast-lock.el (fast-lock-save-cache):
      * lisp/obsolete/vc-arch.el (vc-arch-state)
      * lisp/org/ob-eval.el (org-babel--shell-command-on-region):
      * lisp/org/org-attach.el (org-attach-commit):
      * lisp/org/org-macro.el (org-macro-initialize-templates):
      * lisp/org/org.el (org-babel-load-file)
      * lisp/org/ox-html.el (org-html-format-spec):
      * lisp/org/ox-publish.el (org-publish-find-date)
      * lisp/pcmpl-gnu.el (pcomplete/tar):
      * lisp/pcmpl-rpm.el (pcmpl-rpm-packages):
      * lisp/play/cookie1.el (cookie-snarf):
      * lisp/progmodes/cmacexp.el (c-macro-expansion):
      * lisp/ps-bdf.el (bdf-file-mod-time):
      * lisp/server.el (server-ensure-safe-dir):
      * lisp/simple.el (shell-command-on-region):
      * lisp/speedbar.el (speedbar-item-info-file-helper)
      * lisp/thumbs.el (thumbs-cleanup-thumbsdir):
      * lisp/time.el (display-time-mail-check-directory)
      * lisp/url/url-cache.el (url-is-cached):
      * lisp/url/url-file.el (url-file-asynch-callback):
      * lisp/vc/diff-mode.el (diff-delete-if-empty):
      * lisp/vc/pcvs-info.el (cvs-fileinfo-from-entries):
      * lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
      * lisp/vc/vc-cvs.el (vc-cvs-checkout-model)
      (vc-cvs-state-heuristic, vc-cvs-merge-news)
      (vc-cvs-retrieve-tag, vc-cvs-parse-status, vc-cvs-parse-entry):
      * lisp/vc/vc-hg.el (vc-hg--slurp-hgignore-1)
      (vc-hg--cached-dirstate-search, vc-hg-state-fast):
      * lisp/vc/vc-hooks.el (vc-after-save):
      * lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
      * lisp/vc/vc-svn.el (vc-svn-merge-news, vc-svn-parse-status):
      * lisp/vc/vc.el (vc-checkout, vc-checkin, vc-revert-file):
      * lisp/xdg.el (xdg-mime-apps):
      Prefer (file-attribute-size A) to (nth 7 A), and similarly
      for other file attributes accessors.
      * doc/lispref/files.texi (File Attributes):
      * doc/lispref/intro.texi (Version Info):
      * doc/lispref/os.texi (Idle Timers):
      * lisp/erc/erc.el (erc-string-to-emacs-time):
      * lisp/files.el (file-attribute-access-time)
      * lisp/net/tramp-compat.el:
      * src/buffer.c (syms_of_buffer):
      * src/editfns.c (Fget_internal_run_time):
      * src/fileio.c (Fvisited_file_modtime)
      * src/keyboard.c (Fcurrent_idle_time):
      * src/process.c (Fprocess_attributes):
      Defer implementation details about timestamp format to the
      section that talks about timestamp format, to make it easier
      to change the documentation later if timestamp formats are
      * lisp/gnus/gnus-util.el (gnus-file-newer-than):
      * lisp/speedbar.el (speedbar-check-obj-this-line):
      * lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
      Prefer time-less-p to doing it by hand.
      * lisp/ls-lisp.el (ls-lisp-format): Inode numbers are no longer conses.
      * lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
      Use eql, not eq, to compare integers that might be bignums.
      * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
      Prefer float-time to doing time arithmetic by hand.
  2. 23 Sep, 2018 1 commit
  3. 22 Sep, 2018 5 commits
    • Stefan Monnier's avatar
    • Paul Eggert's avatar
      Round bignums consistently with other integers · 0b36041d
      Paul Eggert authored
      * src/bignum.c (mpz_bufsize): New function.
      (bignum_bufsize): Use it.
      (mpz_get_d_rounded): New function.
      (bignum_to_double): Use it.
      * src/bignum.c (bignum_to_double):
      * src/data.c (bignum_arith_driver):
      When converting bignums to double, round instead of
      truncating, to be consistent with what happens with fixnums.
      * test/src/floatfns-tests.el (bignum-to-float): Test rounding.
    • Stefan Monnier's avatar
      Complement to last commit · 596ccc08
      Stefan Monnier authored
    • Stefan Monnier's avatar
      * lisp/multifile.el: New file, extracted from etags.el · 55ec674f
      Stefan Monnier authored
      The main motivation for this change was the introduction of
      project-query-replace.  dired's multi-file query&replace was implemented
      on top of etags.el even though it did not use TAGS in any way, so I moved
      this generic multifile code into its own package, with a nicer interface,
      and then used that in project.el.
      * lisp/progmodes/project.el (project-files): New generic function.
      (project-search, project-query-replace): New commands.
      * lisp/dired-aux.el (dired-do-search, dired-do-query-replace-regexp):
      Use multifile.el instead of etags.el.
      * lisp/progmodes/etags.el: Remove redundant :groups.
      (next-file-list): Remove var.
      (tags-loop-revert-buffers): Make it an obsolete alias.
      (next-file): Don't autoload (it can't do anything useful before some
      other etags.el function setup the multifile operation).
      (tags--all-files): New function, extracted from next-file.
      (tags-next-file): Rename from next-file.
      Rewrite using tags--all-files and multifile-next-file.
      (next-file): Keep it as an obsolete alias.
      (tags-loop-operate, tags-loop-scan): Mark as obsolete.
      (tags--compat-files, tags--compat-initialize): New function.
      (tags-loop-continue): Rewrite using multifile-continue.  Mark as obsolete.
      (tags--last-search-operate-function): New var.
      (tags-search, tags-query-replace): Rewrite using multifile.el.
      * lisp/emacs-lisp/generator.el (iter-end-of-sequence): Use 'define-error'.
      (iter-make): New macro.
      (iter-empty): New iterator.
      * lisp/menu-bar.el (menu-bar-search-menu, menu-bar-replace-menu):
      tags-loop-continue -> multifile-continue.
    • Paul Eggert's avatar
      Fix (+ bignum float) bug · 3727bc7d
      Paul Eggert authored
      * src/data.c (bignum_arith_driver): Fix typo: missing ‘return’.
      * test/src/data-tests.el (data-tests-bignum): Test for the typo.
  4. 21 Sep, 2018 5 commits
    • Paul Eggert's avatar
      Fix ambiguity in nil DST flag · 0bec0644
      Paul Eggert authored
      Formerly nil meant both that DST was not in effect and that
      the DST flag was unknown, and different functions interpreted
      the flag differently.  Now the meaning is consistently nil for
      DST not in effect, and -1 for DST flag not known.
      * doc/lispref/os.texi (Time Conversion): The DST slot is
      now three-valued, not two-.
      * doc/misc/emacs-mime.texi (time-date): Adjust to new behavior.
      * etc/NEWS: Mention this.
      * lisp/calendar/parse-time.el (parse-time-string):
      * src/editfns.c (Fdecode_time):
      Return -1 for unknown DST flag.
      * test/lisp/calendar/parse-time-tests.el (parse-time-tests):
      Adjust tests to match new behavior, and add a new
      test for nil vs -1.
    • Philipp Stephani's avatar
      Avoid an overflow error in emacs-module.c · 167274d4
      Philipp Stephani authored
      * src/emacs-module.c (Fmodule_load): Allow creating a bignum
      to avoid overflow error
    • Philipp Stephani's avatar
      Use new function overflow_error in a few places · ee3be3fd
      Philipp Stephani authored
      * src/emacs-module.c (module_make_global_ref, module_funcall)
      (module_make_string, Fmodule_load):
      * src/json.c (json_to_lisp): Use overflow_error.
    • Philipp Stephani's avatar
      Support bignums when serializing JSON · 9f10e1a0
      Philipp Stephani authored
      * src/json.c (lisp_to_json): Support bignums.
      * test/src/json-tests.el (json-serialize/bignum): New test.
    • Paul Eggert's avatar
      Bindat examples in source, not manual · 7f3877e8
      Paul Eggert authored
      * doc/lispref/processes.texi (Bindat Examples): Remove, fixing
      a FIXME in the manual.  The long example had bitrotted to some
      extent, compared to the more-up-to-date example in bindat.el
      commentary, which apparently what people were referring to
      anyway.  The short example was confusing and not that useful
      and will be obsolescent anyway if we change timestamp format.
  5. 20 Sep, 2018 4 commits
    • Tino Calancha's avatar
      Fix a previous commit · d6f3c2cf
      Tino Calancha authored
      Suggested by Stefan Monnier here:
      * lisp/replace.el (occur--parse-occur-buffer): Since point is at the
      beginning of the buffer, use `point'.
      (occur-revert-function): Prefer `pcase-let' and `point-min'.
      Check whether `region-start' or `region-end' are non-nil.
    • Glenn Morris's avatar
      Merge from origin/emacs-26 · 44c1ce3a
      Glenn Morris authored
      d28d54c7 (origin/emacs-26) More accurate docs for 'text-char-description'
      b3baf997 Document synchronous behavior of eshell/make (Bug#32513)
      98544ea3 Fix bs-show with wide characters (Bug#17822)
      85af51ba Improve Custom menu labels for 2 options
      72a2a366 Improve wording of last change in dired-x.texi
      d4fa83ba Fix GnuTLS test suite with GnuTLS versions 3.4.x
      b5bee6bf Fix build with gnutls versions 3.0 to 3.2 (Bug#32446)
      67eb80e0 ; * etc/enriched.txt (hanging-indents): Remove extra indent.
      c71cfb79 Fix the Bubbles game on TTY frames
      3bbf21b9 Add choice to reshow certificate information (Bug#31877)
      6f2c4716 * src/alloc.c (Fbool_vector, Flist, Fvector): Doc tweak.
      39eecb38 * src/alloc.c (vector): Fix grammatical error in doc string: ...
    • Bob Newell's avatar
      New input methods hawaiian-postfix and hawaiian-prefix · 229c51af
      Bob Newell authored
      * lisp/leim/quail/latin-pre.el ("hawaiian-prefix"):
      * lisp/leim/quail/latin-post.el ("hawaiian-postfix"): New
      input methods.  (Bug#32714)
      * etc/NEWS: Mention the new input methods.
    • Eli Zaretskii's avatar
      More accurate docs for 'text-char-description' · d28d54c7
      Eli Zaretskii authored
      * src/keymap.c (Ftext_char_description):
      * doc/lispref/help.texi (Describing Characters): More accurate
      description of 'text-char-description'.  Remove incorrect
      examples from the ELisp manual.  (Bug#32743)
  6. 19 Sep, 2018 4 commits
  7. 18 Sep, 2018 2 commits
    • Tino Calancha's avatar
      Fix bug 32543 · 75d9a55f
      Tino Calancha authored
      Store the region and orig line into the *Occur* header line.
      Retrieve this information in `occur-revert-function'.
      * lisp/replace.el (occur--parse-occur-buffer): New defun.
      (occur-revert-function): Use it.
      (occur-engine): Store region and original position as text properties
      into the *Occur* header line.
      * lisp/replace.el (occur-engine): Add sensible default values for
      (occur--orig-line and nlines.
    • Eli Zaretskii's avatar
      Fix GnuTLS test suite with GnuTLS versions 3.4.x · d4fa83ba
      Eli Zaretskii authored
      * src/gnutls.c (gnutls_cipher_get_tag_size): Make it return
      zero only for versions of GnuTLS < 3.2.2, where
      gnutls_cipher_get_tag_size was introduced.  This fixes the
      GnuTLS test suite, which assumes that any cipher whose tag
      size is non-zero is AEAD-capable, and doesn't test such ciphers
      if AEAD is not available, i.e. for GnuTLS < 3.5.1.  (Bug#32446)
  8. 17 Sep, 2018 11 commits
    • Noam Postavsky's avatar
      Fix build with gnutls versions 3.0 to 3.2 (Bug#32446) · b5bee6bf
      Noam Postavsky authored
      We previously used functions available only in 3.2+ for all 3.x
      * src/gnutls.c [GNUTLS_VERSION_NUMBER < 0x030501]: Replace calls to
      gnutls_cipher_get_tag_size with 0.
      [GNUTLS_VERSION_NUMBER < 0x030200]: Alias gnutls_cipher_get_iv_size
      to gnutls_cipher_get_block_size, gnutls_digest_list to
      gnutls_mac_list, and gnutls_digest_get_name to gnutls_mac_get_name.
      [WINDOWSNT]: Adjust DLL function definitions and declarations
    • Eli Zaretskii's avatar
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/advice.el: Only use defmacro when needed · 45894818
      Stefan Monnier authored
      (ad-get-advice-info): Mark it inlinable.
      (ad-get-advice-info-macro): Make it an obsolete alias.
      (ad-copy-advice-info, ad-is-advised, ad-get-advice-info-field)
      (ad-find-advice, ad-macrofy, ad-lambdafy, ad-lambda-p, ad-advice-p)
      (ad-compiled-p, ad-compiled-code, ad-get-cache-definition)
      (ad-get-cache-id, ad-set-cache): Turn macros into defsubsts.
      (ad-defadvice-flags): Make it into a plain list.
      (ad-set-advice-info-field): Apply a bit of CSE.
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/advice.el (ad-advised-functions): Make it a plain list · 77c3c464
      Stefan Monnier authored
      (ad-read-advised-function, ad-do-advised-functions): Adjust accordingly.
      (ad-pushnew-advised-function, ad-pop-advised-function): Also make them
      into functions.
    • Eli Zaretskii's avatar
      Fix the Bubbles game on TTY frames · c71cfb79
      Eli Zaretskii authored
      * lisp/play/bubbles.el (bubbles--col-offset)
      (bubbles--row-offset): Doc fixes.
      (bubbles--compute-offsets): Conflate the GUI and TTY code into
      a single common version.  Set the offsets to simple numbers,
      not to lists.
      (bubbles--initialize, bubbles--show-scores): Wrap offset
      values in a list, so that they are interpreted as pixel
      values, not as units of character width.  This fixes the game
      on TTY frames.  (Bug#32744)
    • Paul Eggert's avatar
      Move current_timespec decl to timespec.h · 295bacba
      Paul Eggert authored
      This change was motivated by the desire to remove the weird
      dependency of lib-src/profile.o on src/systime.h.  profile.c
      included systime.h only for current_timespec, and this
      inclusion required systime.h to have #ifdef emacs in multiple
      places and complicated further changes I have in mind.
      The current_timespec decl belongs in timespec.h anyway,
      and the main effect of this change is to move it there.
      * lib-src/profile.c (INLINE): Remove.
      Include timespec.h, not systime.h.
      * lib/gettime.c (gettime): Prefer clock_gettime to nanotime,
      and don’t worry about it failing on a CLOCK_REALTIME arg.
      POSIX requires it to succeed and I don’t know of any
      counterexamples where the fallbacks would work.
      (current_timespec): Move here from src/systime.h.
      Nowadays it seems to be better to not have this function
      be inline.
      * lib/timespec.h: Include arg-nonnull.h.
      (current_timespec): New declaration.
      (gettime, settime): Declare args to be nonnull.
      * lib/gettime.c, lib/timespec.h: Copy from Gnulib.
      * src/systime.h: Simplify by assuming ‘emacs’ is defined,
      which it always is now.
      (current_timespec): Move to lib/timespec.h.
    • Stefan Monnier's avatar
      * lisp/delsel.el (minibuffer-keyboard-quit): Remove old redundant code. · 75ab41d0
      Stefan Monnier authored
      The various minibuffer maps all inherit from minibuffer-local-map nowadays,
      so a single binding in it is all it takes.
    • Allen Li's avatar
      Add choice to reshow certificate information (Bug#31877) · 3bbf21b9
      Allen Li authored
      In various situations, the window displaying the certificate
      information can be hidden (such as if the user accidentally presses ?,
      which causes the read-multiple-choice help window to replace it).
      Instead of leaving the user to make a choice blindly, add a choice to
      reshow the certification information.
      * lisp/net/nsm.el (nsm-query-user): Add reshow choice.
    • Noam Postavsky's avatar
      Clarify condition-case docstring · 3a2ffa62
      Noam Postavsky authored
      * src/eval.c (Fcondition_case): Note that it handles non-error symbols
    • Noam Postavsky's avatar
      ; Add FIXME regarding previous change · bc4f4b6e
      Noam Postavsky authored
    • Pierre Lorenzon's avatar
      Update pconf for compile.el mode-line-process changes · b2c1b03f
      Pierre Lorenzon authored
      * lisp/cedet/ede/pconf.el (ede-proj-configure-synchronize): Check the
      first list element of mode-line-process (Bug#32564).
      Copyright-paperwork-exempt: yes
  9. 16 Sep, 2018 3 commits
  10. 15 Sep, 2018 4 commits