summaryrefslogtreecommitdiff
path: root/lisp/vc/diff-mode.el
Commit message (Collapse)AuthorAgeFilesLines
...
* * lisp/vc/diff-mode.el (diff-hunk-text): Handle better "\ No newline at end".Juri Linkov2021-05-201-1/+8
|
* Convert many more links to use HTTPSStefan Kangas2021-03-241-1/+1
|
* * lisp/emacs-lisp/pcase.el: Fix bug#46786Stefan Monnier2021-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Revert commit a218c9861573b5ec4979ff2662f5c0343397e3ff, but in order to avoid the spurious warnings that this commit tried to squash, keep track of the vars used during the match so as to add corresponding annotations to explicitly silence the spurious warnings. To do this, we change the VARS used in `pcase-u` (and throughout the pcase code): they used to hold elements of the form (NAME . VAL) and now they hold elements of the form (NAME VAL . USED). (pcase--expand): Bind all vars instead of only those found via fgrep. (pcase-codegen): Silence "unused var" warnings for those vars that have already been referenced during the match itself. (pcase--funcall, pcase--eval): Record the vars that are used. (pcase--u1): Record the vars that are used via non-linear patterns. * lisp/textmodes/mhtml-mode.el (mhtml-forward): * lisp/vc/diff-mode.el (diff-goto-source): Silence newly discovered warnings. * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-bug46786): New test.
* lisp/vc/*.el: Use lexical-bindings in all the filesStefan Monnier2021-02-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | Also remove some redundant `:group` arguments. * lisp/vc/vc.el (vc-ignore): Autoload. * lisp/vc/pcvs-util.el (cvs-every, cvs-union, cvs-map): Delete functions. * lisp/vc/cvs-status.el: Require `cl-lib` at runtime. (cvs-tree-tags-insert): Use `cl-mapcar` and `cl-every` instead. * lisp/vc/pcvs.el: Require `cl-lib` at runtime. (cvs-do-removal): Use `cl-every` instead. * lisp/vc/ediff-init.el: Require `ediff-util` (for `ediff-cleanup-mess` and `ediff-default-suspend-function`). * lisp/vc/pcvs-info.el (cvs-fileinfo<): Remove unused vars `subtypea` and `subtypeb`. * lisp/vc/vc-git.el: * lisp/vc/vc-bzr.el: Require `vc-dispatcher` at runtime for `vc-do-async-command`.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Prefer setq-local in vc/*.elStefan Kangas2020-12-051-30/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/add-log.el (find-change-log, change-log-mode): * lisp/vc/cvs-status.el (cvs-status-mode): * lisp/vc/diff-mode.el (diff-restrict-view, diff-find-file-name): (diff-mode, diff-setup-whitespace, diff-apply-hunk): * lisp/vc/diff.el (diff-no-select): * lisp/vc/ediff-util.el (ediff-setup): * lisp/vc/log-edit.el (log-edit, log-edit-mode): * lisp/vc/log-view.el (log-view-mode): * lisp/vc/pcvs.el (cvs-temp-buffer, cvs-make-cvs-buffer): (cvs-update-filter, cvs-mode, cvs-mode-commit) (cvs-mode-edit-log, cvs-vc-command-advice): * lisp/vc/smerge-mode.el (smerge-match-conflict): (smerge-ediff, smerge-mode): * lisp/vc/vc-annotate.el (vc-annotate-mode): (vc-annotate, vc-annotate-display): * lisp/vc/vc-bzr.el (vc-bzr-log-view-mode): * lisp/vc/vc-dir.el (vc-dir-mode): * lisp/vc/vc-dispatcher.el (vc-setup-buffer): (vc-compilation-mode, vc-start-logentry): * lisp/vc/vc-git.el (vc-git-log-view-mode): * lisp/vc/vc-hg.el (vc-hg-log-view-mode): * lisp/vc/vc-hooks.el (vc-refresh-state): * lisp/vc/vc-mtn.el (vc-mtn-log-view-mode): * lisp/vc/vc-svn.el (vc-svn-log-view-mode): * lisp/vc/vc.el (vc-register, vc-diff-internal): (vc-find-revision-save, vc-find-revision-no-save): (vc-log-internal-common, vc-region-history): Prefer setq-local.
* Use null-device where appropriateMichael Albinus2020-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/filesets.el (filesets-select-command): * lisp/shell.el (shell-mode): * lisp/term.el (term-exec-1): * lisp/wdired.el (wdired-do-symlink-changes): * lisp/cedet/ede/pmake.el (ede-proj-makefile-create): * lisp/eshell/esh-io.el (eshell-set-output-handle): * lisp/gnus/gnus-fun.el (gnus-grab-cam-x-face): * lisp/gnus/mml2015.el (mml2015-epg-key-image): * lisp/gnus/smime.el (smime-noverify-region): * lisp/org/ob-picolisp.el (org-babel-execute:picolisp): * lisp/org/ob-screen.el (org-babel-prep-session:screen) (org-babel-prep-session:screen): * lisp/play/fortune.el (fortune-quiet-strfile-options): * lisp/progmodes/cperl-mode.el (cperl-pod2man-build-command): * lisp/progmodes/sh-script.el (sh-tmp-file): * lisp/vc/diff-mode.el (diff-add-log-current-defuns) (diff--font-lock-prettify): * lisp/vc/ediff-mult.el (ediff-patch-file-form-meta): * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer) (ediff-fixup-patch-map, ediff-dispatch-file-patching-job): * lisp/vc/vc.el (vc-diff-internal): Use null-device or (null-device), respectively. (Bug#3736)
* Clarify that 'diff-error' is part of Emacs 28.1Protesilaos Stavrou2020-11-181-1/+2
| | | | * lisp/vc/diff-mode.el (diff-error): Add :version tag (bug#44727).
* Add a new command to regenerate a hunk in diff-modeDima Kogan2020-10-301-4/+21
| | | | | * lisp/vc/diff-mode.el (diff-refresh-hunk): New function (bug#44312). (diff-mode-map): Bind C-c C-l.
* Avoid infloop in which-function-mode when a vc file has changedLars Ingebrigtsen2020-10-171-1/+4
| | | | | | * lisp/vc/diff-mode.el (diff-find-source-location): Avoid warnings when called from which-function-mode and the file has changed (bug#42818).
* diff-update-on-the-fly doc string clarificationLars Ingebrigtsen2020-10-161-1/+4
| | | | | * lisp/vc/diff-mode.el (diff-update-on-the-fly): Mention what the nil value does (bug#43297).
* Make diff--refine-hunk bug out less on broken patchesLars Ingebrigtsen2020-09-131-2/+3
| | | | | * lisp/vc/diff-mode.el (diff--refine-hunk): Don't bug out on broken patches where we can't find the middle.
* Revert "Use format-prompt in read-file-name calls that have a default"Lars Ingebrigtsen2020-09-131-4/+3
| | | | | | | | This reverts commit de4f347901adffd07bc9bff028dc073fb3c6df33. read-file-name already displays a long path when given a default (like INITIAL in many other prompting functions), so using format-prompt here is superfluous.
* Mark some diff tests as failing in nonascii directoriesGlenn Morris2020-09-121-1/+5
| | | | | | | | * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock) (diff-mode-test-font-lock-syntax-one-line): Expect failure in non-ascii directories. ; * lisp/vc/diff-mode.el (diff-hunk-file-names): Comment.
* Use format-prompt in read-file-name calls that have a defaultLars Ingebrigtsen2020-09-071-3/+4
| | | | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-save-as-file): * lisp/vc/vc.el (vc-backend-for-registration, vc-delete-file) (vc-rename-file): * lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file): * lisp/vc/diff-mode.el (diff-tell-file-name): * lisp/progmodes/etags.el (visit-tags-table) (visit-tags-table-buffer): * lisp/misearch.el (multi-isearch-read-files): * lisp/mail/rmailmm.el (rmail-mime-save): * lisp/help-fns.el (doc-file-to-man, doc-file-to-info): * lisp/gnus/gnus-bookmark.el (gnus-bookmark-load): * lisp/files.el (write-file, basic-save-buffer): * lisp/dired.el (dired-read-dir-and-switches): * lisp/bookmark.el (bookmark-save, bookmark-load): * lisp/abbrev.el (write-abbrev-file, abbrev-edit-save-to-file): Use format-prompt in read-file-name calls that have a default.
* Highlight error messages from diff in diff-modeLars Ingebrigtsen2020-08-211-0/+7
| | | | | | | * lisp/vc/diff-mode.el (diff-error): New face (bug#2739). (diff-font-lock-keywords): Use it to highlight lines like "diff: " which are error messages from diff (for instance, when a file doesn't exist).
* Don't message the hunk status when just going to itLars Ingebrigtsen2020-08-201-2/+1
| | | | | | * lisp/vc/diff-mode.el (diff-goto-source): Don't output a status about the hunk just when jumping to it (bug#38370). This would output "Hunk already applied" when browsing diffs.
* Fix visual fringe glitch in diff-modeGregory Heytings2020-08-141-1/+1
| | | | | | | * lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix problems with visual gaps in the fringes when changing font size (bug#42300). Copyright-paperwork-exempt: yes
* Fix bugs, inefficiencies and bad style in regexpsMattias Engdegård2020-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Found by relint. See discussion at https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html * lisp/org/org-table.el (org-table-finish-edit-field): * lisp/arc-mode.el (archive-rar-summarize): Avoid wrapped subsumption in repeated sequences. * lisp/erc/erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Replace inefficient repeated empty-matching expression with a plain greedy form. (erc-dcc-handle-ctcp-send): Adjust group numbers. * lisp/net/puny.el (puny-encode-domain): Fix fast-path shortcut pattern so that it actually works as intended. * lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp): * lisp/vc/diff-mode.el (diff-imenu-generic-expression): Remove superfluous backslashes. * lisp/progmodes/scheme.el (scheme-imenu-generic-expression): Correct confused definition-matching pattern which would match more than intended. * lisp/textmodes/sgml-mode.el (sgml-tag-name-re): Avoid inefficient matching by using the fact that the first character cannot match the last char of sgml-name-re.
* Disable enable-local-variables for hunk-only in diff-syntax-fontify-propsJuri Linkov2020-03-271-1/+3
| | | | | * lisp/vc/diff-mode.el (diff-syntax-fontify-props): Let-bind enable-local-variables to nil when hunk-only is non-nil (bug#39190)
* Fix a couple of problems in changelog generating functionsNoam Postavsky2020-03-221-23/+26
| | | | | | | | | | | * lisp/vc/diff-mode.el (diff-add-log-current-defuns): If there is a scan-error when calling end-of-defun, go to end of hunk. This can easily happen since we are calling end-of-defun on a partial code fragment from a diff. * lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff): Bind display-buffer-overriding-action around the log-edit-show-diff call only. Otherwise, it can affect, for example, debugger windows triggered by the diff-add-log-current-defuns call.
* Wrap some set-auto-mode calls with delay-mode-hooks (bug#39190)Juri Linkov2020-02-061-1/+3
| | | | | | | | | * lisp/gnus/mm-view.el (mm-display-inline-fontify): * lisp/vc/diff-mode.el (diff-syntax-fontify-props): * lisp/vc/vc.el (vc-find-revision-no-save): Add delay-mode-hooks around set-auto-mode calls to not run hooks that might assume buffer-file-name really associates buffer with a file.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* * lisp/vc/diff-mode.el (diff-context): Set 'extend t' (bug#37774).Dmitry Gutov2019-12-021-2/+2
|
* Add ':extend' attribute to faces and themesEli Zaretskii2019-11-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/themes/wombat-theme.el: * etc/themes/wheatgrass-theme.el: * etc/themes/tsdh-light-theme.el: * etc/themes/tsdh-dark-theme.el: * etc/themes/tango-theme.el: * etc/themes/tango-dark-theme.el: * etc/themes/misterioso-theme.el: * etc/themes/manoj-dark-theme.el: * etc/themes/light-blue-theme.el: * etc/themes/leuven-theme.el: * etc/themes/dichromacy-theme.el: * etc/themes/deeper-blue-theme.el: * etc/themes/adwaita-theme.el: Add ':extend' attribute to all faces that are by default defined with it. * lisp/vc/smerge-mode.el (smerge-upper, smerge-lower) (smerge-base): * lisp/vc/log-view.el (log-view-file, log-view-message): * lisp/vc/ediff-init.el (ediff-current-diff-A) (ediff-current-diff-B, ediff-current-diff-C) (ediff-current-diff-Ancestor, ediff-even-diff-A) (ediff-even-diff-B, ediff-even-diff-C) (ediff-even-diff-Ancestor, ediff-odd-diff-A) (ediff-odd-diff-B, ediff-odd-diff-C) (ediff-odd-diff-Ancestor): * lisp/vc/diff-mode.el (diff-header, diff-file-header) (diff-removed, diff-added): Make sure all definitions of faces have the same value of the ':extend' property, otherwise customizing background color or underline etc. attributes of these faces on some displays will produce effects different from other displays.
* Add ':extend t' face attribute to diff faces (bug#37774)Juri Linkov2019-10-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-header, diff-file-header) (diff-removed, diff-added): Add ':extend t' face attribute. * lisp/vc/ediff-init.el (ediff-current-diff-A) (ediff-current-diff-B, ediff-current-diff-C) (ediff-current-diff-Ancestor, ediff-even-diff-A) (ediff-even-diff-B, ediff-even-diff-C, ediff-even-diff-Ancestor) (ediff-odd-diff-A, ediff-odd-diff-B, ediff-odd-diff-C) (ediff-odd-diff-Ancestor): Add ':extend t' face attribute. * lisp/vc/smerge-mode.el (smerge-upper, smerge-lower) (smerge-base, smerge-markers): Add ':extend t' face attribute. * lisp/vc/log-view.el (log-view-file, log-view-message): Add ':extend t' face attribute. * lisp/faces.el (secondary-selection): Add ':extend t' face attribute. (line-number-major-tick, line-number-minor-tick): Change :foreground to :background.
* Make diff-mode understand git-format-patch separatorsKonstantin Kharlamov2019-10-131-2/+21
| | | | | | | | | | | * lisp/vc/diff-mode.el (diff-prev-line-if-patch-separator): A function to return prev. line if it has git-format-patch separator. (diff-end-of-hunk): Make use of diff-prev-line-if-patch-separator diff-buffer-type: whether a buffer is a git-diff (define-derived-mode): set diff-buffer-type to appropriate value (bug#37395).
* Improve documentation of 'diff-font-lock-prettify'Eli Zaretskii2019-08-131-1/+5
| | | | | | * lisp/vc/diff-mode.el (diff-font-lock-prettify): Doc fix. * etc/NEWS: Minor copyedits.
* Add conditional operator xor to subr.elMattias Engdegård2019-08-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Oleh Krehel and implemented by Basil Contovounesios in the following thread: https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00547.html * 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 implementation. * doc/lispref/control.texi (Control Structures): Extend menu entry for new combining condition. (Combining Conditions): * etc/NEWS (Lisp Changes): Document xor. * test/lisp/subr-tests.el (subr-test-xor): New test.
* Improved ChangeLog generation for vc log (Bug#16301)Noam Postavsky2019-08-031-4/+127
| | | | | | | | | | | | | | | | | | | | * 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) (change-log-insert-entries): * 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 `fill-paragraph-function'. (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.
* Fix diff-mode face problem when used in terminals (Bug#35695)Anders Lindgren2019-05-151-4/+20
| | | | | | | | | In a terminal supporting 256 colors, both diff-added and diff-removed was mapped to the same greyish color. * lisp/vc/diff-mode.el: Modify the colors of diff-removed, diff-added, diff-refine-removed, and diff-refine-added when used in a 256 color environment.
* * lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): Erase bufferJuri Linkov2019-04-161-4/+5
| | | | | before inserting file contents to *diff-syntax-file*. Use absolute file names.
* * lisp/vc/diff-mode.el: Avoid re-initializing buffer in diff-syntaxStefan Monnier2019-04-111-18/+24
| | | | | | | | | (diff--syntax-file-attributes): New var. (diff-syntax-fontify-hunk): Detect when we're reusing the same buffer as last time, to avoid re-initializing it. Skip the diff-syntax-fontify-revisions hash-table, since buffer-alist plays the same role. (diff-syntax-fontify-revisions): Delete var.
* diff-font-lock-syntax: clarify distinction between t and hunk-alsoStefan Monnier2019-04-091-69/+63
| | | | | | * lisp/vc/diff-mode.el (diff-font-lock-syntax): Rework docstring. (diff-syntax-fontify-hunk): Never use the hunk method when diff-font-lock-syntax is just t.
* * lisp/vc/diff-mode.el: Cosmetic changes in diff-syntax-fontify-hunkStefan Monnier2019-04-091-82/+113
| | | | | | | | (diff-default-directory): Use defvar-local. (diff-syntax-fontify-hunk): Use 'setq' less. Fit within 80 columns. Simplify some looking-at tests. (diff-syntax-fontify-props): Don't check the buffer-local part of find-file-hook.
* * lisp/vc/diff-mode.el (diff-syntax-fontify-props): Check both buffer-localJuri Linkov2019-04-081-1/+2
| | | | and default value of find-file-hook.
* 2019-03-26 regex cleanupPaul Eggert2019-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2019-03/msg01028.html * lisp/align.el (align-rules-list): * lisp/speedbar.el (speedbar-check-read-only, speedbar-check-vc): * lisp/vc/diff-mode.el (diff-add-change-log-entries-other-window): * lisp/woman.el (woman-parse-numeric-arg): Put "-" at end of character alternatives, since a range was not intended. * lisp/erc/erc.el (font-lock): * lisp/mail/footnote.el (cl-seq): Avoid duplicate character alternatives by using cl-seq API. * lisp/mail/footnote.el (footnote--current-regexp): * lisp/textmodes/css-mode.el (css--font-lock-keywords): Avoid repetition of repetition. * lisp/net/webjump.el (webjump-url-encode): Add ~ to character alternatives, and rewrite confusing range. * lisp/progmodes/verilog-mode.el (verilog-compiler-directives) (verilog-assignment-operator-re): Remove duplicate. * lisp/progmodes/verilog-mode.el (verilog-preprocessor-re): * lisp/textmodes/css-mode.el (css--font-lock-keywords): Don’t escape a char that doesn’t need it. * lisp/textmodes/picture.el (picture-tab-chars): In docstring, do not say regexp characters will be quoted; merely say in another way that the syntax is that of character alternatives. (picture-set-tab-stops, picture-tab-search): Don’t attempt to regexp-quote picture-tab-chars. (picture-tab-search): Quote \ in picture-tab-chars for skip-chars-backwards, which treats \ differently than regexp character alternatives do.
* * lisp/vc/diff-mode.el: Better handle empty lines in context diffsStefan Monnier2019-03-251-2/+3
| | | | | (diff-end-of-hunk): Obey diff-valid-unified-empty-line for context style. (diff--refine-hunk): Don't look further than the end.
* Fix regular-expression glitches and typosPaul Eggert2019-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2019-03/msg00085.html * admin/admin.el (set-version): * lisp/allout.el (allout-latexify-one-item): * lisp/arc-mode.el (archive-arc-rename-entry) (archive-rar-summarize): * lisp/calc/calc-graph.el (calc-graph-set-styles) (calc-graph-hide): * lisp/calc/calc-help.el (calc-describe-key): * lisp/calc/calc-lang.el (math-compose-tex-func, eqn): * lisp/calc/calc.el (calcDigit-key): * lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/comint.el (comint-substitute-in-file-name): * lisp/dired.el (dired-actual-switches): * lisp/emacs-lisp/chart.el (chart-rmail-from): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/rx.el (rx-not, rx-atomic-p): * lisp/emulation/viper-ex.el (viper-get-ex-token) (viper-get-ex-pat, ex-set-read-variable): * lisp/epg.el (epg--status-SIG_CREATED): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-user): (erc-speedbar-expand-channel, erc-speedbar-expand-server) * lisp/erc/erc.el (erc-is-message-ctcp-and-not-action-p) (erc-banlist-update): * lisp/eshell/em-dirs.el (eshell-parse-drive-letter, eshell/pwd): * lisp/find-dired.el (find-dired): * lisp/frame.el (frame-set-background-mode): * lisp/generic-x.el (apache-log-generic-mode): * lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp): * lisp/gnus/gnus.el (gnus-short-group-name): * lisp/gnus/message.el (message-mailer-swallows-blank-line): * lisp/ibuffer.el (ibuffer-fontification-alist): * lisp/ido.el (ido-set-matches-1): * lisp/info-xref.el (info-xref-lock-file-p): * lisp/info.el (Info-dir-remove-duplicates) (Info-unescape-quotes, Info-split-parameter-string) (Info-speedbar-expand-node): * lisp/international/mule.el (sgml-html-meta-auto-coding-function): * lisp/isearch.el (isearch-pre-command-hook): * lisp/language/ethio-util.el (ethio-fidel-to-tex-buffer): * lisp/mail/rmail.el (rmail-collect-deleted): * lisp/mh-e/mh-alias.el (mh-alias-suggest-alias): * lisp/mh-e/mh-comp.el (mh-forward): * lisp/mh-e/mh-search.el (mh-index-next-folder) (mh-index-create-imenu-index): * lisp/mh-e/mh-xface.el (mh-picon-get-image): * lisp/minibuffer.el (completion--embedded-envvar-re): * lisp/net/ange-ftp.el (ange-ftp-ls-parser): * lisp/net/goto-addr.el (goto-address-mail-regexp) (goto-address-find-address-at-point): * lisp/net/pop3.el (pop3-read-response, pop3-user) (pop3-pass, pop3-apop): * lisp/net/tramp.el (tramp-ipv6-regexp) (tramp-replace-environment-variables): * lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set): * lisp/nxml/rng-uri.el (rng-uri-escape-multibyte): * lisp/nxml/rng-xsd.el (rng-xsd-convert-any-uri): * lisp/obsolete/pgg.el (pgg-fetch-key): * lisp/obsolete/vip.el (vip-get-ex-token): * lisp/org/ob-core.el (org-babel-string-read): * lisp/org/org-agenda.el: (org-agenda-add-entry-to-org-agenda-diary-file): * lisp/org/org-element.el (org-element-keyword-parser): * lisp/org/org-list.el (org-list-indent-item-generic): * lisp/org/org-mhe.el (org-mhe-get-message-folder-from-index): * lisp/org/org-mobile.el (org-mobile-apply): * lisp/org/org-mouse.el (org-mouse-context-menu): * lisp/org/org-plot.el (org-plot/gnuplot): * lisp/org/org-protocol.el (org-protocol-flatten-greedy): * lisp/org/org-table.el (org-table-copy-down) (org-table-formula-make-cmp-string) (org-table-get-stored-formulas, org-table-recalculate) (org-table-edit-formulas): * lisp/org/org.el (org-translate-link-from-planner) (org-fill-line-break-nobreak-p): * lisp/org/ox-ascii.el (org-ascii-item): * lisp/org/ox-latex.el (org-latex-clean-invalid-line-breaks): * lisp/org/ox.el (org-export-expand-include-keyword): * lisp/progmodes/ada-xref.el (ada-treat-cmd-string): * lisp/progmodes/cfengine.el (cfengine2-font-lock-keywords): * lisp/progmodes/cperl-mode.el (cperl-to-comment-or-eol) (cperl-find-pods-heres, cperl-fix-line-spacing) (cperl-have-help-regexp, cperl-word-at-point-hard) (cperl-make-regexp-x): * lisp/progmodes/dcl-mode.el (dcl-option-value-offset): * lisp/progmodes/etags.el (tag-implicit-name-match-p): * lisp/progmodes/fortran.el (fortran-fill): * lisp/progmodes/gdb-mi.el (gdb-speedbar-expand-node) (gdb-locals-handler-custom): * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): * lisp/progmodes/gud.el (gud-jdb-find-source-using-classpath): * lisp/progmodes/js.el (js--continued-expression-p): * lisp/progmodes/m4-mode.el (m4-font-lock-keywords): * lisp/progmodes/meta-mode.el (meta-indent-level-count): * lisp/progmodes/mixal-mode.el (mixal-font-lock-keywords): * lisp/progmodes/opascal.el (opascal-find-unit-in-directory): * lisp/progmodes/pascal.el (pascal-progbeg-re): * lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re) (ruby-expr-beg, ruby-parse-partial) (ruby-toggle-string-quotes, ruby-font-lock-keywords): * lisp/progmodes/sql.el (sql--make-help-docstring): * lisp/progmodes/verilog-mode.el (verilog-coverpoint-re) (verilog-skip-forward-comment-p) (verilog-read-sub-decls-gate) (verilog-read-auto-template-middle): * lisp/progmodes/vhdl-mode.el (vhdl-resolve-env-variable) (vhdl-speedbar-expand-project, vhdl-speedbar-expand-entity) (vhdl-speedbar-expand-architecture) (vhdl-speedbar-expand-config, vhdl-speedbar-expand-package) (vhdl-speedbar-dired): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords): * lisp/textmodes/flyspell.el (flyspell-debug-signal-word-checked): * lisp/textmodes/ispell.el (ispell-process-line): * lisp/textmodes/reftex-cite.el (reftex-end-of-bib-entry): * lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes): * lisp/url/url-parse.el (url-generic-parse-url): * lisp/url/url-util.el (url-truncate-url-for-viewing): * lisp/vc/diff-mode.el (diff-unified->context): * lisp/vc/vc-bzr.el (vc-bzr-error-regexp-alist): * lisp/vc/vc-cvs.el (vc-cvs-parse-status): * lisp/woman.el (woman0-el, woman-if-ignore) (woman-change-fonts): * lisp/xdg.el (xdg--substitute-home-env): Fix regular-expression infelicities and typos. Fix regular expression typos Fix typos reported by Mattias Engdegård in: that occurred in preloaded modules. * lisp/frame.el (frame-set-background-mode): * lisp/international/mule.el (sgml-html-meta-auto-coding-function): * lisp/isearch.el (isearch-pre-command-hook): * lisp/minibuffer.el (completion--embedded-envvar-re):
* Merge diff-font-lock-refine and diff-auto-refine-mode into diff-refineCharles A. Roelli2019-03-031-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was discussed in Bug#32991. * admin/gitmerge.el (gitmerge-resolve): Bind 'diff-refine' instead of 'diff-auto-refine-mode' to nil. * doc/emacs/files.texi (Diff Mode): Explain 'diff-refine' instead of 'diff-auto-refine-mode' in the documentation of 'diff-hunk-next' and 'diff-hunk-prev'. Mention in the documentation of 'diff-refine-hunk' that refining is already done by default. * etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable and mention deprecation and disabling of 'diff-auto-refine-mode'. * lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to 'diff-refine' and allow choices nil, 'font-lock' and 'navigation'. (diff-auto-refine-mode): Disable it by default, make it obsolete and make it set 'diff-refine' appropriately to keep backward compatibility. (diff-hunk-next, diff-hunk-prev): Adapt to rename of diff-auto-refine-mode and ensure that refining only happens when calling these commands interactively. (diff--font-lock-refined): Adapt to rename of diff-font-lock-refine. * lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check that 'diff-refine' is set instead of checking 'diff-auto-refine-mode' when deciding whether to refine a conflict.
* * lisp/vc/diff-mode.el (diff-font-lock-keywords): Add more Git headers.Juri Linkov2019-02-251-0/+1
| | | | | * lisp/gnus/mm-view.el (mm-display-inline-fontify): Set mode to the selected major-mode, so diff-mode could be detected afterwards.
* * lisp/vc/diff-mode.el: Reduce redundancy in diff-syntax-fontify codeStefan Monnier2019-02-211-60/+62
| | | | | | | | | | | | (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.
* * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test.Juri Linkov2019-02-021-3/+5
| | | | | | | | | | | | | (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.
* Small fixesJuri Linkov2019-01-281-0/+2
| | | | | | | | * 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.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Tone down diff-refine-removed and diff-refine-added as wellDmitry Gutov2018-12-271-2/+2
| | | | | | | | | | * lisp/vc/diff-mode.el (diff-refine-removed, diff-refine-added): Change backgrounds in light backgrounds themes (bug#33567).
* | Tone down diff-added and diff-removed in light themesDmitry Gutov2018-12-261-2/+2
| | | | | | | | | | * lisp/vc/diff-mode.el (diff-removed, diff-added): Tone down light background colors (bug#33567).
* | * lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): Add `*' to namesJuri Linkov2018-12-251-3/+3
| | | | | | | | | | | | of ephemeral buffers like in " *org-src-fontification:%s*" from `org-src-font-lock-fontify-block'. (Bug#33567) (diff-header, diff-file-header): Tone down light background colors.
* | * lisp/vc/diff-mode.el (diff-syntax-fontify-props): Use font-lock-ensureJuri Linkov2018-12-191-8/+1
| | | | | | | | unconditionally. (Bug#33798)