1. 21 Feb, 2019 1 commit
    • Stefan Monnier's avatar
      * lisp/vc/diff-mode.el: Reduce redundancy in diff-syntax-fontify code · 3432f554
      Stefan Monnier authored
      (diff--iterate-hunks): New function extracted from diff--font-lock-refined.
      (diff--font-lock-refined, diff--font-lock-syntax): Use it.
      (diff--overlay-auto-delete): Rename from diff--font-lock-refine--refresh.
      (diff--font-lock-syntax--refresh): Delete.
      (diff-syntax-fontify-hunk): Don't completely silence errors.
      (diff-syntax-fontify-props): Remove `no-init` arg, testing if `file` is
      nil instead.  Adjust all callers.
      (diff-syntax-fontify-props): Remove redundant code since we don't
      modify the buffer.
      3432f554
  2. 18 Feb, 2019 2 commits
  3. 11 Feb, 2019 1 commit
    • Paul Eggert's avatar
      Simplify use of encode-time · 988e37fa
      Paul Eggert authored
      Most uses of (apply #'encode-time foo) can now be replaced
      with (encode-time foo).  Make similar simplifications.
      * lisp/calendar/time-date.el (date-to-time):
      * lisp/calendar/timeclock.el (timeclock-when-to-leave)
      (timeclock-day-base, timeclock-generate-report):
      * lisp/emacs-lisp/timer.el (timer-set-idle-time):
      * lisp/eshell/esh-util.el (eshell-parse-ange-ls):
      * lisp/gnus/gnus-art.el (article-make-date-line):
      * lisp/gnus/gnus-delay.el (gnus-delay-article)
      (gnus-delay-send-queue):
      * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--decode-datefield):
      * lisp/gnus/gnus-logic.el (gnus-advanced-date):
      * lisp/gnus/message.el (message-make-expires-date):
      * lisp/gnus/nndiary.el (nndiary-compute-reminders):
      * lisp/mail/ietf-drums.el (ietf-drums-parse-date):
      * lisp/net/tramp-adb.el (tramp-adb-ls-output-time-less-p):
      * lisp/org/org-agenda.el (org-agenda-get-timestamps)
      (org-agenda-get-progress, org-agenda-show-clocking-issues):
      * lisp/org/org-capture.el (org-capture-set-target-location):
      * lisp/org/org-clock.el (org-clock-get-sum-start, org-clock-sum)
      (org-clocktable-steps):
      * lisp/org/org-colview.el (org-colview-construct-allowed-dates)
      * lisp/org/org-macro.el (org-macro--vc-modified-time):
      * lisp/org/org-table.el (org-table-eval-formula):
      * lisp/org/org.el (org-current-time, org-store-link)
      (org-time-today, org-read-date, org-read-date-display)
      (org-display-custom-time, org-time-string-to-time)
      (org-timestamp-change, org-timestamp--to-internal-time):
      * lisp/url/url-dav.el (url-dav-process-date-property):
      * lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time)
      (vc-cvs-parse-entry):
      Simplify use of encode-time.
      * lisp/org/org-clock.el (org-clock-get-clocked-time):
      (org-clock-resolve, org-resolve-clocks, org_clock_out)
      (org-clock-update-time-maybe):
      Avoid some rounding problems with encode-time and float-time.
      * lisp/org/org-clock.el (org-clock-in, org-clock-update-time-maybe):
      * lisp/org/org-colview.el (org-columns--age-to-minutes):
      * lisp/org/org.el (org-get-scheduled-time, org-get-deadline-time)
      (org-add-planning-info, org-2ft, org-time-string-to-absolute)
      (org-closest-date):
      Use org-time-string-to-time instead of doing it by hand with
      encode-time.
      * lisp/org/org.el (org-current-time): Simplify rounding.
      (org-read-date): Avoid extra trip through encode-time.
      988e37fa
  4. 08 Feb, 2019 1 commit
    • Eli Zaretskii's avatar
      Fix failures of vc-find-revision with non-ASCII file names · 459b669b
      Eli Zaretskii authored
      * lisp/vc/vc.el (vc-find-revision): Instead of binding
      coding-system-for-write, make the buffer-file-coding-system of
      the temporary buffer be no-conversion.  This avoids the
      unwanted side effect of not encoding the command-line
      arguments of the VCS commands invoked by the backend.
      (Bug#34350)
      459b669b
  5. 07 Feb, 2019 1 commit
  6. 02 Feb, 2019 1 commit
    • Juri Linkov's avatar
      * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test. · 42c83990
      Juri Linkov authored
      (diff-mode-test-font-lock-syntax-one-line): New test for one line.
      
      * test/data/vc/diff-mode/hello_world.c:
      * test/data/vc/diff-mode/hello_world_1.c:
      * test/data/vc/diff-mode/hello_emacs.c:
      * test/data/vc/diff-mode/hello_emacs_1.c: New fixtures.
      
      * lisp/vc/diff-mode.el (diff-syntax-fontify): Move remove-overlays
      from diff-syntax-fontify-hunk.  (Bug#33567)
      (diff-syntax-fontify-hunk): Remove VISIT arg from insert-file-contents.
      42c83990
  7. 28 Jan, 2019 1 commit
    • Juri Linkov's avatar
      Small fixes · 137b65a9
      Juri Linkov authored
      * lisp/generic-x.el (etc-passwd-generic-mode): Add comment.  (Bug#34225)
      
      * lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): Set overlay
      property 'diff-mode to 'syntax.  (Bug#33567)
      (diff-syntax-fontify-props): Reset buffer-file-name to nil.
      137b65a9
  8. 01 Jan, 2019 1 commit
  9. 26 Dec, 2018 2 commits
  10. 25 Dec, 2018 1 commit
  11. 23 Dec, 2018 1 commit
    • Michael Albinus's avatar
      Handle `make-process' in Tramp and ange-ftp · 3ea89aca
      Michael Albinus authored
      * doc/lispref/processes.texi (Asynchronous Processes):
      Explain, that not all file name handlers support `make-process'.
      
      * lisp/net/ange-ftp.el:
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-process'.
      
      * lisp/vc/ediff-util.el:
      * src/process.c:
      * test/src/process-tests.el: Use "file name handler" consequently.
      3ea89aca
  12. 22 Dec, 2018 1 commit
    • Michael Albinus's avatar
      Use "file name handler" consequently · 88b41c40
      Michael Albinus authored
      * doc/lispref/files.texi:
      * doc/lispref/processes.texi:
      * doc/misc/ediff.texi:
      * lisp/simple.el:
      * lisp/vc/ediff-ptch.el:
      * src/buffer.c:
      * src/dired.c:
      * src/fileio.c:
      * src/image.c:
      * src/insdel.c:
      * src/w32fns.c: Use "file name handler" consequently.
      88b41c40
  13. 19 Dec, 2018 1 commit
  14. 18 Dec, 2018 2 commits
    • Juri Linkov's avatar
      More font-lock improvements for diff-mode · fb163130
      Juri Linkov authored
      * lisp/vc/diff-mode.el (diff-font-lock-keywords): Use diff-header face
      for git index lines (like already used for bzr index lines).
      Use diff-file-header face for binary file headers.
      (diff-find-source-location): Use expand-file-name for vc-find-revision.
      (diff--font-lock-prettify): Use diff-indicator-* faces for
      left-fringe indicators.
      (diff-syntax-fontify-props): Optimize to not use text-property-not-all
      for font-lock-ensure.
      
      * lisp/replace.el (occur-engine-line): Simplify to use font-lock-ensure
      without text-property-not-all.
      fb163130
    • Juri Linkov's avatar
      Fontify one-line diffs without the final newline (bug#33567) · 8cbbf4ba
      Juri Linkov authored
      * lisp/vc/diff-mode.el (diff-hunk-text, diff-syntax-fontify-hunk):
      Skip lines beginning with backslash like "\ No newline at end of file".
      (diff-syntax-fontify-hunk): Use string-trim-right.
      For one-line diffs use 1 explicitly in the list of line numbers.
      8cbbf4ba
  15. 17 Dec, 2018 1 commit
    • Juri Linkov's avatar
      Syntactic fontification of diff hunks (bug#33567) · 6973b148
      Juri Linkov authored
      * lisp/vc/diff-mode.el (diff-font-lock-syntax): New defcustom.
      (diff-default-directory): New buffer-local variable.
      (diff-indicator-removed, diff-indicator-added)
      (diff-indicator-changed): Set foreground to distinctive colors.
      (diff-context): Remove colors to make room for syntax highlighting.
      (diff-font-lock-keywords): Add diff--font-lock-syntax.
      (diff--font-lock-cleanup): Remove diff-mode syntax overlays.
      (diff--font-lock-syntax, diff--font-lock-syntax--refresh)
      (diff-syntax-fontify-revisions, diff-syntax-fontify-hunk)
      (diff-syntax-fontify-props): New functions.
      
      * lisp/vc/diff.el (diff-no-select): Set diff-default-directory to
      default-directory.
      
      * doc/emacs/files.texi (Diff Mode): Document diff-font-lock-syntax.
      6973b148
  16. 12 Dec, 2018 1 commit
  17. 10 Dec, 2018 2 commits
  18. 08 Dec, 2018 2 commits
  19. 06 Dec, 2018 1 commit
  20. 04 Dec, 2018 1 commit
  21. 27 Nov, 2018 1 commit
  22. 25 Nov, 2018 1 commit
    • Michael Heerdegen's avatar
      Replace insignificant backquotes · 1808d254
      Michael Heerdegen authored
      Replace most insignificant occurrences of '`' with a straight quote,
      sharp quote or nothing.  This includes backquotes in 'pcase' patterns.
      
      * admin/admin.el:
      * lisp/apropos.el:
      * lisp/arc-mode.el:
      * lisp/auth-source.el:
      * lisp/avoid.el:
      * lisp/bindings.el:
      * lisp/bs.el:
      * lisp/calculator.el:
      * lisp/calendar/todo-mode.el:
      * lisp/cedet/semantic.el:
      * lisp/cedet/semantic/analyze/debug.el:
      * lisp/cedet/semantic/bovine.el:
      * lisp/cedet/semantic/dep.el:
      * lisp/cedet/semantic/grammar.el:
      * lisp/cedet/semantic/wisent/comp.el:
      * lisp/cedet/semantic/wisent/grammar.el:
      * lisp/cedet/srecode/mode.el:
      * lisp/cus-edit.el:
      * lisp/doc-view.el:
      * lisp/elec-pair.el:
      * lisp/electric.el:
      * lisp/emacs-lisp/autoload.el:
      * lisp/emacs-lisp/benchmark.el:
      * lisp/emacs-lisp/byte-opt.el:
      * lisp/emacs-lisp/bytecomp.el:
      * lisp/emacs-lisp/cconv.el:
      * lisp/emacs-lisp/cl-extra.el:
      * lisp/emacs-lisp/cl-generic.el:
      * lisp/emacs-lisp/cl-macs.el:
      * lisp/emacs-lisp/copyright.el:
      * lisp/emacs-lisp/debug.el:
      * lisp/emacs-lisp/eieio-compat.el:
      * lisp/emacs-lisp/ert.el:
      * lisp/emacs-lisp/generator.el:
      * lisp/emacs-lisp/inline.el:
      * lisp/emacs-lisp/macroexp.el:
      * lisp/emacs-lisp/map.el:
      * lisp/emacs-lisp/package-x.el:
      * lisp/emacs-lisp/package.el:
      * lisp/emacs-lisp/radix-tree.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/epa.el:
      * lisp/erc/erc-dcc.el:
      * lisp/erc/erc-track.el:
      * lisp/erc/erc.el:
      * lisp/eshell/em-ls.el:
      * lisp/eshell/esh-cmd.el:
      * lisp/files.el:
      * lisp/filesets.el:
      * lisp/font-lock.el:
      * lisp/frameset.el:
      * lisp/gnus/gnus-agent.el:
      * lisp/gnus/gnus-art.el:
      * lisp/gnus/gnus-cite.el:
      * lisp/gnus/gnus-group.el:
      * lisp/gnus/gnus-msg.el:
      * lisp/gnus/gnus-salt.el:
      * lisp/gnus/gnus-srvr.el:
      * lisp/gnus/gnus-sum.el:
      * lisp/gnus/gnus-topic.el:
      * lisp/gnus/gnus-util.el:
      * lisp/gnus/gnus.el:
      * lisp/gnus/message.el:
      * lisp/gnus/mm-util.el:
      * lisp/gnus/mml.el:
      * lisp/gnus/nnheader.el:
      * lisp/gnus/nnimap.el:
      * lisp/gnus/nnmairix.el:
      * lisp/gnus/spam.el:
      * lisp/hexl.el:
      * lisp/hi-lock.el:
      * lisp/ibuf-ext.el:
      * lisp/ibuffer.el:
      * lisp/ido.el:
      * lisp/info.el:
      * lisp/international/mule-cmds.el:
      * lisp/international/mule-util.el:
      * lisp/json.el:
      * lisp/jsonrpc.el:
      * lisp/language/cyrillic.el:
      * lisp/language/european.el:
      * lisp/language/georgian.el:
      * lisp/language/tibetan.el:
      * lisp/language/utf-8-lang.el:
      * lisp/language/vietnamese.el:
      * lisp/ldefs-boot.el:
      * lisp/mail/mail-extr.el:
      * lisp/man.el:
      * lisp/menu-bar.el:
      * lisp/mh-e/mh-acros.el:
      * lisp/mh-e/mh-folder.el:
      * lisp/mh-e/mh-mime.el:
      * lisp/mh-e/mh-show.el:
      * lisp/mh-e/mh-speed.el:
      * lisp/minibuffer.el:
      * lisp/mpc.el:
      * lisp/net/ange-ftp.el:
      * lisp/net/hmac-def.el:
      * lisp/net/newst-backend.el:
      * lisp/net/quickurl.el:
      * lisp/net/tramp-archive.el:
      * lisp/net/tramp-compat.el:
      * lisp/notifications.el:
      * lisp/obsolete/pgg-parse.el:
      * lisp/obsolete/vc-arch.el:
      * lisp/obsolete/xesam.el:
      * lisp/org/ob-C.el:
      * lisp/org/ob-core.el:
      * lisp/org/ob-exp.el:
      * lisp/org/ob-groovy.el:
      * lisp/org/ob-haskell.el:
      * lisp/org/ob-io.el:
      * lisp/org/ob-lisp.el:
      * lisp/org/ob-lob.el:
      * lisp/org/ob-lua.el:
      * lisp/org/ob-octave.el:
      * lisp/org/ob-perl.el:
      * lisp/org/ob-python.el:
      * lisp/org/ob-ref.el:
      * lisp/org/ob-ruby.el:
      * lisp/org/ob-sql.el:
      * lisp/org/org-agenda.el:
      * lisp/org/org-capture.el:
      * lisp/org/org-clock.el:
      * lisp/org/org-colview.el:
      * lisp/org/org-duration.el:
      * lisp/org/org-element.el:
      * lisp/org/org-entities.el:
      * lisp/org/org-gnus.el:
      * lisp/org/org-indent.el:
      * lisp/org/org-info.el:
      * lisp/org/org-inlinetask.el:
      * lisp/org/org-lint.el:
      * lisp/org/org-list.el:
      * lisp/org/org-mouse.el:
      * lisp/org/org-plot.el:
      * lisp/org/org-src.el:
      * lisp/org/org-table.el:
      * lisp/org/org.el:
      * lisp/org/ox-ascii.el:
      * lisp/org/ox-html.el:
      * lisp/org/ox-latex.el:
      * lisp/org/ox-man.el:
      * lisp/org/ox-md.el:
      * lisp/org/ox-org.el:
      * lisp/org/ox-publish.el:
      * lisp/org/ox-texinfo.el:
      * lisp/org/ox.el:
      * lisp/play/bubbles.el:
      * lisp/play/gamegrid.el:
      * lisp/progmodes/autoconf.el:
      * lisp/progmodes/cc-defs.el:
      * lisp/progmodes/cc-engine.el:
      * lisp/progmodes/cc-fonts.el:
      * lisp/progmodes/cc-langs.el:
      * lisp/progmodes/cperl-mode.el:
      * lisp/progmodes/ebrowse.el:
      * lisp/progmodes/elisp-mode.el:
      * lisp/progmodes/flymake-cc.el:
      * lisp/progmodes/flymake.el:
      * lisp/progmodes/fortran.el:
      * lisp/progmodes/grep.el:
      * lisp/progmodes/gud.el:
      * lisp/progmodes/idlwave.el:
      * lisp/progmodes/js.el:
      * lisp/progmodes/m4-mode.el:
      * lisp/progmodes/make-mode.el:
      * lisp/progmodes/mixal-mode.el:
      * lisp/progmodes/modula2.el:
      * lisp/progmodes/octave.el:
      * lisp/progmodes/opascal.el:
      * lisp/progmodes/prolog.el:
      * lisp/progmodes/ps-mode.el:
      * lisp/progmodes/python.el:
      * lisp/progmodes/ruby-mode.el:
      * lisp/progmodes/sh-script.el:
      * lisp/progmodes/sql.el:
      * lisp/progmodes/verilog-mode.el:
      * lisp/ps-mule.el:
      * lisp/rtree.el:
      * lisp/ruler-mode.el:
      * lisp/ses.el:
      * lisp/simple.el:
      * lisp/startup.el:
      * lisp/subr.el:
      * lisp/term/ns-win.el:
      * lisp/textmodes/bibtex.el:
      * lisp/textmodes/conf-mode.el:
      * lisp/textmodes/css-mode.el:
      * lisp/textmodes/refill.el:
      * lisp/textmodes/sgml-mode.el:
      * lisp/textmodes/tex-mode.el:
      * lisp/tutorial.el:
      * lisp/url/url-dav.el:
      * lisp/url/url-gw.el:
      * lisp/url/url-http.el:
      * lisp/url/url-methods.el:
      * lisp/url/url-privacy.el:
      * lisp/vc/cvs-status.el:
      * lisp/vc/diff-mode.el:
      * lisp/vc/ediff-init.el:
      * lisp/vc/ediff-ptch.el:
      * lisp/vc/log-edit.el:
      * lisp/vc/log-view.el:
      * lisp/vc/pcvs-info.el:
      * lisp/vc/pcvs.el:
      * lisp/vc/smerge-mode.el:
      * lisp/vc/vc-git.el:
      * lisp/vc/vc-hg.el:
      * lisp/vc/vc-mtn.el:
      * lisp/vc/vc-rcs.el:
      * lisp/whitespace.el:
      * lisp/window.el:
      * test/lisp/electric-tests.el:
      * test/lisp/emacs-lisp/cl-lib-tests.el:
      * test/lisp/emacs-lisp/ert-tests.el:
      * test/lisp/epg-tests.el:
      * test/lisp/jsonrpc-tests.el:
      * test/src/data-tests.el:
      * test/src/json-tests.el: Replace most insignificant backquotes.
      1808d254
  23. 17 Nov, 2018 1 commit
  24. 14 Nov, 2018 2 commits
    • Juri Linkov's avatar
      New option vc-find-revision-no-save to not write revision to file · f561c6a1
      Juri Linkov authored
      * lisp/vc/vc.el (vc-find-revision-no-save): New defcustom (bug#33319).
      (vc-find-revision): Depending on vc-find-revision-no-save,
      call either vc-find-revision-no-save or vc-find-revision-save.
      (vc-find-revision-save): Rename from vc-find-revision.
      (vc-find-revision-no-save): New function.
      
      * lisp/vc/diff-mode.el (diff-find-source-location):
      Let-bind vc-find-revision-no-save to t.
      f561c6a1
    • Juri Linkov's avatar
      Support VC revisions in diff-goto-source (bug#33319) · 2ccfb4b5
      Juri Linkov authored
      * lisp/vc/diff-mode.el (diff-vc-revisions): New defvar.
      (diff-find-source-location): Call vc-find-revision for
      non-nil values of 'other', diff-vc-backend, diff-vc-revisions.
      
      * lisp/vc/vc.el (vc-diff-internal): Set buffer-local
      diff-vc-revisions to the list of used revisions.
      
      * doc/emacs/files.texi (Diff Mode): Update diff-goto-source
      for VC-related prefix argument.
      2ccfb4b5
  25. 07 Nov, 2018 2 commits
    • Juri Linkov's avatar
      Support VC single file operations from Dired (bug#32596). · 6b7e492f
      Juri Linkov authored
      * lisp/vc/vc.el (vc-ensure-vc-buffer): Use dired-get-filename for dired-mode.
      Move error-checking outside of the last branch of cond.
      (vc-dired-deduce-fileset): Remove unused error signaling.
      6b7e492f
    • Juri Linkov's avatar
      * lisp/vc/log-view.el: Better error handling (bug#33295). · 7aa5056b
      Juri Linkov authored
      * lisp/vc/log-view.el (log-view-find-revision)
      (log-view-annotate-version): Add condition to signal an error
      when log-view-vc-fileset contains a directory.
      Use user-error instead of error.
      
      * lisp/dired.el (dired-get-file-for-visit):
      * lisp/locate.el (locate-do-setup):
      Use user-error instead of error.
      7aa5056b
  26. 03 Nov, 2018 1 commit
    • Daniel Pittman's avatar
      Fix interaction between vc-hg find-file-hook and vc state caching · 9d5c4d07
      Daniel Pittman authored
      Bad assumptions in the `vc-hg-find-file-hook' prevented it from
      working. This correctly them.  (Bug#33129).
      
      2018-10-23  Daniel Pittman  <slippycheeze@google.com>
      
      	* lisp/vc/vc-hg.el (vc-hg-find-file-hook): This function made two
      	assumptions about conflicted files that were not accurate,
      	preventing conflicts in files ever being detected.
      
      	The first was that the `vc-state' was cache by the time this was
      	invoked, which it is not - at least when visiting the file, or
      	using `vc-refresh-state'.
      
      	The second was that a file with the ".orig" extension would be
      	present, next to the file being visited.  This is the default
      	behavior of Mercurial, but can be overridden by the user.
      
      	Since the VC mode-line code will shortly calculate the state for
      	display, the optimization of testing for the ".orig" file only
      	delayed this work by a few moments.
      9d5c4d07
  27. 21 Oct, 2018 1 commit
    • Stefan Monnier's avatar
      * lisp/vc/diff-mode.el: Improve diff-font-lock-prettify · 17252062
      Stefan Monnier authored
      A few tweaks to the previous code for corner case problems, and a new
      feature, which is to move the +/- signs to the left fringe.
      
      (diff--font-lock-cleanup, diff--filter-substring): New functions.
      (diff-mode): Use them.
      (diff--font-lock-refined): Mark the overall overlays as `diff-mode
      fine` as well, so they get properly cleaned up when changing mode.
      (diff-fringe-add, diff-fringe-del, diff-fringe-rep, diff-fringe-nul):
      New bitmaps.
      (diff--font-lock-prettify): Move the +/- signs to the fringe.
      (diff-wiggle): Use 'user-error'.
      17252062
  28. 09 Oct, 2018 1 commit
  29. 08 Oct, 2018 1 commit
  30. 01 Oct, 2018 1 commit
  31. 29 Sep, 2018 1 commit
    • Michael Albinus's avatar
      Finish fix for Bug#21559 · fd369be7
      Michael Albinus authored
      * lisp/vc/vc-git.el (vc-git--call):
      If `revert-buffer-in-progress-p' flag is set, prepend
      "GIT_OPTIONAL_LOCKS=0" to "process-environment".  (Bug#21559)
      fd369be7
  32. 28 Sep, 2018 1 commit
  33. 26 Sep, 2018 1 commit