1. 08 May, 2016 5 commits
    • Paul Eggert's avatar
      Simplify now that float-time etc. are built-in · e2f78599
      Paul Eggert authored
      This was prompted by warnings about calls to now-obsolete functions.
      * lisp/calendar/time-date.el (encode-time-value):
      Use setq rather than a recursive call, to avoid a warning
      about calling this obsolete function.
      * lisp/calendar/time-date.el (encode-time-value)
      (with-decoded-time-value, time-to-seconds, time-to-number-of-days):
      * lisp/erc/erc.el (erc-emacs-time-to-erc-time):
      * lisp/net/rcirc.el (rcirc-float-time):
      * lisp/org/org-compat.el (org-float-time):
      Simplify now that time-add and float-time are now built-in.
      * lisp/calendar/time-date.el (time-add, time-subtract, time-less-p):
      * lisp/net/newst-backend.el (time-add):
      * lisp/org/org.el (time-subtract):
      Remove backward-compatibility definitions; they are now built-in.
      * lisp/calendar/timeclock.el (timeclock-time-to-seconds)
      (timeclock-seconds-to-time):
      * lisp/net/rcirc.el (rcirc-float-time):
      * lisp/org/org-compat.el (org-float-time):
      Now obsolete, since callers can just use float-time and
      seconds-to-time.  All uses changed.
      * lisp/emacs-lisp/ert.el (ert-results-pop-to-timings):
      * lisp/gnus/gnus-art.el (article-lapsed-string):
      * lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
      * lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
      * lisp/gnus/nndiary.el (nndiary-compute-reminders):
      * lisp/net/tramp.el (tramp-time-diff):
      * lisp/org/org-clock.el (org-clock-timestamps-change):
      Prefer the time-subtract builtin to the subtract-time alias.
      * lisp/files.el (dir-locals-find-file, dir-locals-read-from-dir):
      * test/lisp/character-fold-tests.el (character-fold--speed-test):
      Prefer the float-time builtin to the time-to-seconds alias.
      * lisp/org/org-agenda.el, lisp/org/org-clock.el, lisp/org/org-list.el:
      * lisp/org/org-timer.el, lisp/org/org.el:
      Adjust to org-float-time deprecation.
      e2f78599
    • Alan Mackenzie's avatar
      Add :after-hook facility to define-derived-mode. · 2eb6817b
      Alan Mackenzie authored
      This allow a form to be evaluated _after_ a major mode's hooks have been run.
      It is needed to solve some problems in CC Mode, including bug #16759 and
      bug #23476.
      
      * lisp/emacs-lisp/derived.el (define-derived-mode): introduce the new argument
      `:after-hook', and generate the requisite code for it.
      (derived-mode-make-docstring): Take account of the possibility of :after-hook.
      
      * lisp/subr.el (delayed-after-hook-forms): New variable.
      (run-mode-hooks): As the last thing evaluate the forms in
      delayed-after-hook-forms.
      
      * doc/lispref/modes.texi (Derived Modes): Document :after-hook.
      (Mode Hooks): Document the new feature in run-mode-hooks.
      
      * etc/NEWS: Note the new feature.
      2eb6817b
    • Michael Albinus's avatar
      344eb61a
    • Michael Albinus's avatar
      Fix recursive load of tramp.elc · 6ef59445
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-completion-file-name-handler):
      Check also for `tramp-completion-mode-p'.
      (tramp-completion-mode, tramp-completion-mode-p): Autoload them.
      6ef59445
    • Paul Eggert's avatar
      Prefer grep -E/-F to egrep/fgrep · e8bda380
      Paul Eggert authored
      POSIX marked egrep and fgrep as legacy apps in SUSv2 (1997) and
      withdrew them in SUSv3 (2001), and these days grep -E and grep -F
      are probably more portable.
      * lib-src/etags.c (main):
      * lisp/eshell/em-unix.el (eshell-grep, eshell/egrep)
      (eshell/fgrep):
      * lisp/cedet/semantic/symref.el (semantic-symref-find-text):
      * lisp/eshell/esh-var.el (eshell-apply-indices):
      * lisp/progmodes/ada-xref.el (ada-xref-search-with-egrep)
      (ada-find-in-src-path):
      * lisp/textmodes/ispell.el (ispell-grep-command):
      (ispell-lookup-words):
      Use or document grep -E and grep -F instead of egrep and fgrep.
      * lisp/textmodes/ispell.el (ispell-grep-options):
      Use -Ei on all platforms, not just MS-Windows.
      e8bda380
  2. 07 May, 2016 10 commits
    • Dmitry Gutov's avatar
      Avoid unnecessary work if a chunk is empty · 4c175a6a
      Dmitry Gutov authored
      * lisp/jit-lock.el (jit-lock-fontify-now): Avoid unnecessary work
      if a chunk is empty (bug#23278).
      4c175a6a
    • Dmitry Gutov's avatar
      * test/lisp/jit-lock-tests.el: New file. · 950c9a5d
      Dmitry Gutov authored
      950c9a5d
    • Michael Albinus's avatar
      Continue to fix Bug#10085 · 97776f29
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-completion-file-name-handler-alist)
      <expand-file-name>: Add handler.
      (tramp-completion-handle-expand-file-name): New defun.
      (tramp-handle-file-name-as-directory): Handle completion mode case.
      
      * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
      Fix test.
      (tramp-test24-file-name-completion): Extend test.
      97776f29
    • Alan Mackenzie's avatar
      Revert change 8e4595a4... due to annoyance it causes the development team. · 2ac39b06
      Alan Mackenzie authored
      Change 8e4595a4 from 2016-04-30 17:28:24
      +0000 was an enhancement to .dir-locals to allow correct fontification
      of certain macro constructs.
      
      * .dir-locals.el: Remove the two forms for C Mode dealing with noise macros.
      2ac39b06
    • Alan Mackenzie's avatar
    • Simen Heggestøyl's avatar
      Add tests for CSS mode completion · 29c9803c
      Simen Heggestøyl authored
      * test/lisp/textmodes/css-mode-tests.el (css-test-property-values)
      (css-test-property-values-no-duplicates)
      (css-test-value-class-lookup): Use `seq-sort'.
      (css-mode-tests--completions): New helper function for retrieving CSS
      completions.
      (css-test-complete-bang-rule, scss-test-complete-bang-rule)
      (css-test-complete-property-value, css-test-complete-pseudo-class)
      (css-test-complete-pseudo-element, css-test-complete-at-rule)
      (scss-test-complete-at-rule, css-test-complete-property)
      (css-test-complete-selector, css-test-complete-nested-selector)
      (scss-test-complete-nested-selector): New tests.
      29c9803c
    • Alan Mackenzie's avatar
      Add an option in Edebug to prevent pauses after `h', 'f', and `o'. · ed5282d2
      Alan Mackenzie authored
      Requested by Paul Pogonyshev.  Also add in documentation for Edebug config
      variables which was missing.
      
      * lisp/emacs-lisp/edebug.el (edebug-sit-on-break): New customizable option.
      (edebug--display-1): Test edebug-sit-on-break before pausing 1 second.
      
      * doc/lispref/edebug.texi (Jumping): Document the effect of the new option.
      (Edebug Options): Document the new option.  Also add documentation for
      edebug-eval-macro-args, edebug-print-length, edebug-print-level,
      edebug-print-circle, edebug-sit-for-seconds.
      
      * etc/NEWS: Note the new feature.
      ed5282d2
    • Jorgen Schaefer's avatar
      scheme.el: Turn literal tabs into \t · bf7fc7a8
      Jorgen Schaefer authored
      * lisp/progmodes/scheme.el: The last change to turn tabs into spaces
      also caught some literal tabs in character classes. Fix this by
      adding \t to those classes.
      bf7fc7a8
    • Tino Calancha's avatar
      Make 'backtab' work in table-mode on text terminals · 4a6d39b3
      Tino Calancha authored
      * lisp/textmodes/table.el (table-cell-bindings): Bind 'backtab'
      explicitly.  (Bug#23456)
      4a6d39b3
    • Eli Zaretskii's avatar
      Try to speed-up display of many all-blank lines · fa6a6edd
      Eli Zaretskii authored
      * src/bidi.c (bidi_initialize): Use anchored regexps for
      paragraph start and paragraph separator sequences.  (Bug#23457)
      fa6a6edd
  3. 06 May, 2016 3 commits
    • Alan Mackenzie's avatar
      Correct hack-local-variables change from Thu May 5 11:05:49 2016 +0000 · 26171e02
      Alan Mackenzie authored
      Prevent hack-local-variables being called from the fundamental-mode mode call
      early in normal-mode.  This fixes bug #23460 and bug #23463.
      
      * lisp/files.el (normal-mode) Replace call to fundamental-mode with calls to
      the things it calls, with the exception of hack-local-variables.
      
      * etc/NEWS: Add an entry to note the calling of hack-local-variables at each
      major mode initialization.
      26171e02
    • Paul Eggert's avatar
      Port xref-tests to master branch · 81204b27
      Paul Eggert authored
      Also, add a test to make this problem less likely in the future.
      * test/Makefile.in (check-no-automated-subdir): New rule.
      (check, check-expensive, check-maybe): Depend on it.
      * test/automated/data/xref/file1.txt: Rename to ...
      * test/data/xref/file1.txt: ... here.
      * test/automated/data/xref/file2.txt: Rename to ...
      * test/data/xref/file2.txt: ... here.
      * test/automated/xref-tests.el: Rename to ...
      * test/lisp/progmodes/xref-tests.el: ... here.
      (xref-tests-data-dir): Use EMACS_TEST_DIRECTORY.
      81204b27
    • Paul Eggert's avatar
      Merge from origin/emacs-25 · 89ce83b2
      Paul Eggert authored
      50650cb6 Doc fixes for fclist and grep
      5e814e02 Minor doc fixes for quoting
      3347a733 `nreverse' the marker pairs list
      1a4127db Use save-excursion in xref-location-marker more
      ab3ba912 shell-quote-argument DIR when appropriate
      922c7a3e Rework xref-query-replace-in-results
      3fe35107 * lisp/replace.el (query-replace-read-from): Use minibuffer-w...
      0932b948 Fix todo-mode bug involving archived items (bug#23447)
      e68ad1f3 ; * etc/NEWS: Tiny edit. (Bug#23432)
      adc80b7e ; * test/automated/xref-tests.el: Add copyright and license.
      4d8fd9cf Handle "empty line" regexp in xref searches
      f559b374 Add tests for xref-collect-matches
      6428aa04 Use grep-find-ignored-directories instead of vc-directory-exc...
      6f82d8ef Clear buffer-undo-list when showing xrefs
      c68a0910 Note the quote translation in `message' in section "incompati...
      52f86a75 * etc/NEWS: Mention (message "%s" (format ...)).
      93703c54 (Common Keywords): Correct what missing :group means
      79e58003 Improve documentation of Dired's 'A' and 'Q' commands
      2ea2a2f1 Doc fixes for quoting
      8544b987 posnp doc clarification
      805204f3 Mention what a missing :group does
      ec554d77 Fix documentation of dired-aux search/replace commands
      89ce83b2
  4. 05 May, 2016 11 commits
    • Paul Eggert's avatar
      Doc fixes for fclist and grep · 50650cb6
      Paul Eggert authored
      A newline is needed between two fc-list calls.
      egrep and fgrep have been withdrawn from POSIX,
      so document grep -E and grep -F instead.
      50650cb6
    • Simen Heggestøyl's avatar
      Support completion of HTML tags in CSS selectors · d546ed13
      Simen Heggestøyl authored
      * lisp/textmodes/css-mode.el (css--html-tags): New variable holding a
      list of HTML tags for completion.
      (css--nested-selectors-allowed): New variable for determining whether
      nested selectors are allowed in the current mode.
      (css--complete-selector): New function for completing part of a CSS
      selector.
      (css-completion-at-point): Support completion of selectors.
      (scss-mode): Allow nested selectors.
      d546ed13
    • Lars Ingebrigtsen's avatar
      Make `R' in eww work more reliably · 67fa7f13
      Lars Ingebrigtsen authored
      * lisp/net/eww.el (eww-score-readability): Protect against
      null children.
      67fa7f13
    • Paul Eggert's avatar
      Minor doc fixes for quoting · 5e814e02
      Paul Eggert authored
      * doc/lispref/control.texi (Signaling Errors):
      * doc/lispref/display.texi (Displaying Messages):
      Don’t say that formats “generate”.  Try to word more clearly.
      * etc/NEWS: Coalesce near-duplicate entries.
      5e814e02
    • Dmitry Gutov's avatar
      `nreverse' the marker pairs list · 3347a733
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref--buf-pairs-iterator): `nreverse'
      the marker pairs list for each buffer before returning.
      3347a733
    • Alan Mackenzie's avatar
      Call hack-local-variables from major modes rather than from file visiting · 25f45581
      Alan Mackenzie authored
      This prevents file/directory local variables from being lost when the major
      mode is set or changed.
      
      This fixes bug #15577 and bug #23407.
      
      * lisp/files.el (normal-mode): Call `hack-local-variables' when the major mode
      function hasn't already done so.
      (hack-local-variables): Rename parameter `mode-only' to `handle-mode', make
      its previous non-nil setting be t, and introduce the following action for a
      non-nil non-t value: apply all settings apart from `mode'.
      
      * lisp/subr.el (run-mode-hooks): call `hack-local-variables' for buffers
      which are visiting files.
      
      * doc/emacs/custom.texi (File Variables): Note that setting a major mode also
      sets file variables.
      (Directory Variables): Note that `mode', `eval', and `unibyte' can be set as
      dir local variables, but `coding' can't.
      
      * doc/lispref/modes.texi (Major Mode Conventions): Say that `run-mode-hooks'
      also calls `hack-local-variables'.
      (Auto Major Mode): Say that `find-file' no longer runs `hack-local-variables',
      as from 25.2.  Remove vagueness from `normal-mode' and `set-auto-mode' by
      saying that the mode IS SET, not merely "selected" or "chosen".
      (Mode Hooks): Document change to `run-mode-hooks'.
      
      * doc/lispref/variables.texi (File Local Variables): Document change to
      `hack-local-variables'.
      25f45581
    • Michael Albinus's avatar
      tramp-sh.el: Work around a stat bug · 6aad36ac
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-get-remote-stat): Do not use
      stat versions which produce shell quoted output.  See also
      coreutils Bug#23422.
      6aad36ac
    • Noam Postavsky's avatar
      Fix autogen.sh for separate worktrees · 403cc9fa
      Noam Postavsky authored
      * autogen.sh: Use the $hooks variable in the $sample_hooks loop, instead
      of assuming .git/hooks is a directory.
      403cc9fa
    • Dmitry Gutov's avatar
      Use save-excursion in xref-location-marker more · 1a4127db
      Dmitry Gutov authored
      * lisp/progmodes/elisp-mode.el (xref-location-marker): Use
      save-excursion, in order not to alter the value of point if the
      buffer is currently open in the background (problem reported by
      Robert Weiner).
      
      * lisp/progmodes/etags.el (xref-location-marker): Same.
      1a4127db
    • Dmitry Gutov's avatar
      shell-quote-argument DIR when appropriate · ab3ba912
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-file-completion-table):
      `shell-quote-argument' DIR as well.
      
      * lisp/progmodes/xref.el (xref--rgrep-command): Pass DIR through
      `shell-quote-argument' (bug#23453).  Thanks for Kaushal Modi for
      pointing out the problem.  Assert that DIR doesn't start with `~'.
      ab3ba912
    • Dmitry Gutov's avatar
      Rework xref-query-replace-in-results · 922c7a3e
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-query-replace-in-results): Collect
      all xrefs from the buffer first, then delegate most of the
      processing to the value returned by xref--buf-pairs-iterator.
      (xref--buf-pairs-iterator): New function.  Return an "iterator"
      which partitions returned markers into buffers, and only processes
      markers from one buffer at a time.  When an xref is out of date,
      skip it with a message instead of signaling error (bug#23284).
      (xref--outdated-p): Extract from xref--buf-pairs-iterator.  Trim
      CR from both strings before comparing.
      (xref--query-replace-1): Remove the variable current-buf, no need
      to track it anymore.  Simplify the filter-predicate and search
      functions accordingly.  Iterate over buffer-markers pairs returned
      by the iterator, and call `perform-replace' for each of them.  Use
      multi-query-replace-map (bug#23284).  Use `switch-to-buffer' every
      time after the first, in order not to jump between windows.
      
      * test/automated/xref-tests.el
      (xref--buf-pairs-iterator-groups-markers-by-buffers-1)
      (xref--buf-pairs-iterator-groups-markers-by-buffers-2)
      (xref--buf-pairs-iterator-cleans-up-markers): New tests.
      922c7a3e
  5. 04 May, 2016 8 commits
    • Juri Linkov's avatar
      * lisp/replace.el (query-replace-read-from): Use minibuffer-with-setup-hook · 3fe35107
      Juri Linkov authored
      to set minibuffer-local value of text-property-default-nonsticky.
      (Bug#23418, bug#23127)
      3fe35107
    • Alan Mackenzie's avatar
      Allow `text-quoting-style' to be `leave', i.e. no translation of quotes. · 32f5bf0c
      Alan Mackenzie authored
      * lisp/help-fns.el (describe-function-1): Don't set coding system to UTF-8
      when text-quoting-style is `leave'.
      
      * src/lisp.h (enum text_quoting_style): Add identifier LEAVE_QUOTING_STYLE.
      
      * src/doc.c (syms_of_doc): New symbol "leave".  Amend doc string of
      `text_quoting_style'.
      (text_quoting_style): Handle `leave' by returning LEAVE_QUOTING_STYLE.
      (Fsubstitute_command_keys): Don't translate quotes when quoting_style is
      LEAVE_QUOTING_STYLE.
      
      * src/editfns.c (styled_format): Set quoting_style to -1 when
      text-quoting-style is `leave'.
      32f5bf0c
    • Stephen Berman's avatar
      Fix todo-mode bug involving archived items (bug#23447) · 0932b948
      Stephen Berman authored
      * lisp/calendar/todo-mode.el (todo-jump-to-category): When jumping
      from Todo Categories mode to a category with only archived items
      and todo-skip-archived-categories is non-nil, make sure the
      archive file buffer is in Todo Archive mode to prevent
      todo-category-select from raising an error, and don't set
      todo-current-todo-file, since that makes todo-show display the
      archived category.  Remove a no-op call to kill-buffer, which is
      already called in todo-insert-category-line.
      0932b948
    • Glenn Morris's avatar
      ; * etc/NEWS: Tiny edit. (Bug#23432) · e68ad1f3
      Glenn Morris authored
      e68ad1f3
    • Stefan Monnier's avatar
      * lisp/emulation/viper(-cmd)?.el: Use lexical-binding. · 088acab3
      Stefan Monnier authored
      * lisp/emulation/viper-cmd.el: Use lexical-binding.
      (viper-change-state-to-vi, viper-change-state-to-emacs): Allow dummy
      args, for use in advice-add.
      (viper--init-message): Rename from init-message.
      (viper-minibuffer-standard-hook): Adjust accordingly.
      (viper-undo): Remove unused var `modified'.
      (viper-read-string-with-history, viper-set-searchstyle-toggling-macros):
      Don't use dynamic vars as args.
      (viper-submit-report): Clarify use of dynamic vars.
      
      * lisp/emulation/viper.el: Use lexical-binding and nadvice.
      Remove redundant :group keywords.  Group the (if viper-mode) at top-level.
      Use add-function rather than a `(lambda ...).
      (viper--advice-list): New var.
      (viper--advice-add, viper--deactivate-advice-list): New funs.
      (viper-go-away, viper-set-hooks, viper-non-hook-settings): Use them.
      (viper-non-hook-settings): Don't hook into find-file any more.
      088acab3
    • Stefan Monnier's avatar
      3d8b29bb
    • Stefan Monnier's avatar
    • Glenn Morris's avatar
  6. 03 May, 2016 3 commits