Stefan Kangas
5f923ff1a6
; Fix typos
2023-12-03 23:31:30 +01:00
Mattias Engdegård
321cbd9a60
Tighten and simplify typescript compilation-mode regexps (bug#61104)
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Tighten regexps and simplify. Translate to rx.
* etc/compilation.txt: Add examples.
In collaboration with Jostein Kjønigsen.
2023-02-06 17:47:00 +01:00
Jostein Kjønigsen
873a0a1508
Add support for TypeScript compilation to compile.el (bug#61104)
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Add regexps.
2023-02-04 09:19:40 +01:00
Eli Zaretskii
cae528457c
; Add 2023 to copyright years.
2023-01-01 05:31:12 -05:00
Stefan Monnier
26243f7b65
compile.el: Fix regression with nb of errors in modeline
...
* lisp/progmodes/compile.el (compilation-mode-line-errors): Mark it as
risky-local, like `defconst` used to do for us.
2022-12-15 13:36:14 -05:00
Stefan Kangas
70ecdebc92
; Fix typos (don't abbreviate "with" or "without")
2022-12-01 16:36:09 +01:00
Stefan Monnier
9bfe00dda6
* lisp/progmodes/compile.el (compilation-mode-line-errors): Use defvar
...
This is not really a constant, e.g. it's modified in `grep.el`.
2022-10-24 14:25:02 -04:00
Eli Zaretskii
b7802190fe
; Update the doc string of 'compilation-auto-jump-to-first-error'
...
* lisp/progmodes/compile.el
(compilation-auto-jump-to-first-error): Doc fix. (Bug#58407)
2022-10-10 12:37:04 +03:00
Lars Ingebrigtsen
ef0c2e9940
Fix some misleading quoting in cl-case
...
* lisp/progmodes/compile.el (compilation-auto-jump):
* lisp/image/image-crop.el (image-crop--crop-image-1):
(image-crop--crop-image-1):
* lisp/image/exif.el (exif--process-value):
* lisp/image-mode.el (image-mode--next-file):
* lisp/dnd.el (dnd-begin-text-drag):
(dnd-begin-file-drag):
(dnd-begin-drag-files): Fix misleading quoting in cl-case (bug#51368).
2022-09-13 18:19:26 +02:00
Lars Ingebrigtsen
9c5d8d59cf
Fix remaining byte-compile warnings in loaddefs.el
...
* lisp/progmodes/compile.el (compilation--default-buffer-name):
* lisp/kmacro.el (kmacro-name-last-macro):
* lisp/emacs-lisp/package.el (package--activate-all): Autoload to
avoid byte-compilation warnings when byte-compiling loaddefs.el.
2022-07-31 11:29:52 +02:00
Lars Ingebrigtsen
02c14216db
Reformulate compile-command condition
...
* lisp/progmodes/compile.el: Reformulate to avoid a byte-compile
warning when compiling loaddefs.el.
2022-07-31 11:17:29 +02:00
João Távora
ffe12ff250
Clean up more robustly in compile.el
...
* lisp/progmodes/compile.el (compilation-sentinel): Use
unwind-protect.
2022-07-25 14:19:02 +01:00
Stefan Monnier
8fac539b50
(compilation-parse-errors-function): Remove obsolete var
...
* lisp/progmodes/compile.el (compilation-parse-errors-function): Remove.
(compilation--parse-region): Simplify accordingly.
(compilation--compat-parse-errors): Remove function, not used any more.
(compilation-error-list, compilation-parsing-end)
(compilation-old-error-list): Remove vars, not used any more.
(compilation-last-buffer): Mark as obsolete (sadly, forgot to do that
back in Emacs-22).
* lisp/textmodes/tex-mode.el: Remove old code that was needed for
Emacs<24.
* lisp/progmodes/prolog.el (prolog-consult-compile): Remove long-dead code.
(compilation-parse-errors-function): Remove declaration, not used any more.
(prolog-parse-sicstus-compilation-errors): Remove function, not used any more.
2022-07-21 18:59:57 -04:00
Lars Ingebrigtsen
c59b8dfefa
Recognize Gradle error messages in compile-mode
...
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Recognize Gradle errors
(bug#56249).
2022-06-30 11:04:15 +02:00
Mattias Engdegård
e4df6203e2
More robust gnu pattern (bug#56249)
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Don't allow spaces in the file names, to avoid false matches.
Don't allow ad-hoc spaces preceding the program name either.
2022-06-29 17:28:24 +02:00
Mattias Engdegård
d462c8133b
Complete transition to rx for compilation gnu pattern
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Change from a mixture of traditional regexp syntax and rx,
to make intentions clearer.
2022-06-29 17:28:24 +02:00
Lars Ingebrigtsen
e73dbcf26d
Fix compilation-mode parsing of file names in Gradle errors
...
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Fix parsing of file names
in Gradle output (bug#56249).
2022-06-29 11:53:16 +02:00
Lars Ingebrigtsen
da736c9f02
Make `M-x grep' work better with "git grep"
...
* lisp/progmodes/compile.el (compilation-start): Bind PAGER to ""
to avoid errors in output from "git grep" and similar commands
(bug#4359).
2022-06-02 17:21:28 +02:00
Lars Ingebrigtsen
092aea9a27
Allow running several commands in compilation-start
...
* lisp/progmodes/compile.el (compilation-start): Allow not erasing
the contents of the buffer (bug#28892).
2022-05-17 22:08:17 +02:00
Lars Ingebrigtsen
ed71839c33
Add new user option compilation-hidden-output
...
* doc/emacs/building.texi (Compilation Mode): Document it.
* lisp/progmodes/compile.el (compilation-hidden-output): New user
option.
(compilation-filter): Use it.
(compilation--hide-output): New function.
2022-05-16 15:30:50 +02:00
Lars Ingebrigtsen
e568c3845c
Add more compilation-auto-jump-to-first-error options
...
* doc/emacs/building.texi (Compilation Mode): Document it.
* lisp/progmodes/compile.el
(compilation-auto-jump-to-first-error): Extend type.
(compilation--file-known-p): New function.
(compilation-auto-jump): Use it to support the new values
(bug#8228).
(compilation-find-file-1): Factored out into own function.
(compilation-find-file): Factored out from here.
2022-05-10 05:58:33 +02:00
Lars Ingebrigtsen
7601a77d8a
Make compilation-parse-errors more resilient
...
* lisp/progmodes/compile.el (compilation-parse-errors): Be more
resilient in the presence of regexp alist not being completely set
up (bug#55282).
2022-05-06 14:15:19 +02:00
Lars Ingebrigtsen
0ea217d646
Fix compilation-max-output-line-length type
...
* lisp/progmodes/compile.el (compilation-max-output-line-length):
Fix the type.
2022-04-30 19:42:42 +02:00
Lars Ingebrigtsen
58398dea25
Truncate output from grep
...
* doc/emacs/building.texi (Compilation): Document it.
* lisp/progmodes/compile.el (compilation-max-output-line-length):
New user option (bug#44983).
(compilation-filter): Use it.
(compilation--insert-abbreviated-line): New function.
2022-04-30 12:57:20 +02:00
Eli Zaretskii
dcd76bd48d
Merge from origin/emacs-28
...
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.
# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex
# lib/cdefs.h
# lisp/erc/erc-dcc.el
# lisp/erc/erc-imenu.el
# lisp/erc/erc-replace.el
# lisp/image-dired.el
# lisp/progmodes/xref.el
# m4/alloca.m4
# m4/byteswap.m4
# m4/errno_h.m4
# m4/getopt.m4
# m4/gnulib-common.m4
# m4/inttypes.m4
# m4/stddef_h.m4
# m4/stdint.m4
# m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5
; Add 2022 to copyright years.
2022-01-01 02:45:51 -05:00
Mattias Engdegård
1a84b7a328
Tighten gnu compile regexp further
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
The -fanalyzer ASCII art does not contain tabs.
2021-11-24 15:07:17 +01:00
Mattias Engdegård
d096e12f44
Simplify gnu compilation-mode regexp
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Remove the pattern ostensibly added for Ruby, because at closer
inspection it could never have matched anything. This lessens the
performance impact of the pattern added for GCC's -fanalyzer,
now slightly tweaked.
2021-11-22 19:11:55 +01:00
Philip Kaludercic
08ccce2257
Improve error parsing for GCC -fanalyzer output
...
* compile.el (compilation-error-regexp-alist-alist): Adjust gnu rule
* compile-tests.el (compile-tests--test-regexps-data): Add testcase
2021-11-21 19:00:40 +01:00
Glenn Morris
536968304b
Merge from origin/emacs-28
...
e8488808df Avoid aborts when a thread is signaled while "waiting for ...
21397cce51 Improve documentation string for 'compilation-error-regexp...
2971a6890f * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix t...
e842d7f29a Fix removal of fringe indication of bookmarks
b5a0eda978 Prefer "graphical displays" to "X terminals" in documentation
4ad0fc0dd0 Precise documentation of file-notify-add-watch
f5b8df14c6 Fixes to account for windows' tab lines
ced72b6e4c * Fix `native-compile-target-directory' effectiveness on t...
502788bc3d Add missing single quotes in the Emacs manual
1af45ad04e ; * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix...
12654b7423 * lisp/menu-bar.el (yank-menu-length): Fix docstring (bug#...
# Conflicts:
# lisp/gnus/gnus-undo.el
# lisp/menu-bar.el
2021-10-16 09:18:37 -07:00
Philipp Stephani
21397cce51
Improve documentation string for 'compilation-error-regexp-alist'.
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist): Clarify
behavior when TYPE is a cons cell.
2021-10-16 12:54:39 +02:00
Lars Ingebrigtsen
3b3211c023
Mark def* macros for indentation
...
* lisp/widget.el (define-widget-keywords):
* lisp/vc/pcvs.el (defun-cvs-mode):
* lisp/subr.el (defvar-local):
(defvar-keymap):
* lisp/skeleton.el (define-skeleton):
* lisp/simple.el (define-alternatives):
* lisp/progmodes/gud.el (gdb-script-mode):
* lisp/progmodes/gdb-mi.el (def-gdb-preempt-display-buffer):
(def-gdb-auto-update-trigger):
(def-gdb-auto-update-handler):
(def-gdb-trigger-and-handler):
(def-gdb-thread-buffer-command):
(def-gdb-thread-buffer-simple-command):
(def-gdb-thread-buffer-gud-command):
(def-gdb-set-positive-number):
(def-gdb-memory-format):
(def-gdb-memory-unit):
(def-gdb-memory-show-page):
* lisp/progmodes/compile.el (define-compilation-mode):
* lisp/progmodes/cc-vars.el (defcustom-c-stylevar):
* lisp/obsolete/cl.el (define-setf-expander):
(defsetf):
(define-modify-macro):
* lisp/obsolete/cl-compat.el (defkeyword):
* lisp/net/hmac-def.el (define-hmac-function):
* lisp/international/mule-conf.el (define-iso-single-byte-charset):
* lisp/international/ccl.el (define-ccl-program):
* lisp/image.el (defimage):
* lisp/gnus/gmm-utils.el (defun-gmm):
* lisp/ezimage.el (defezimage):
* lisp/erc/erc.el (define-erc-module):
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/emacs-lisp/eieio-compat.el (defgeneric):
(defmethod):
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
(define-globalized-minor-mode):
* lisp/emacs-lisp/derived.el (define-derived-mode):
* lisp/emacs-lisp/byte-run.el (defsubst):
(define-obsolete-function-alias):
(define-obsolete-variable-alias):
* lisp/custom.el (defcustom):
(defface):
(defgroup):
(deftheme):
* lisp/cedet/semantic/wisent.el (define-wisent-lexer):
* lisp/cedet/semantic/lex.el (define-lex):
(define-lex-analyzer):
(define-lex-regex-analyzer):
(define-lex-simple-regex-analyzer):
(define-lex-block-analyzer):
(define-lex-keyword-type-analyzer):
(define-lex-sexp-type-analyzer):
(define-lex-regex-type-analyzer):
(define-lex-string-type-analyzer):
(define-lex-block-type-analyzer):
* lisp/cedet/semantic/lex-spp.el
(define-lex-spp-macro-declaration-analyzer):
(define-lex-spp-macro-undeclaration-analyzer):
(define-lex-spp-include-analyzer):
* lisp/cedet/semantic/dep.el
(defcustom-mode-local-semantic-dependency-system-include-path):
* lisp/cedet/semantic/decorate/mode.el
(define-semantic-decoration-style):
* lisp/cedet/mode-local.el (define-child-mode):
(define-overloadable-function):
(define-mode-local-override):
* lisp/calc/calc.el (defcalcmodevar):
(defmath): Explicitly mark all macros that have names that start
with "def" that should indent defunly-like (bug#43329).
2021-10-13 21:52:57 +02:00
Stefan Kangas
aebba085cb
; More minor stylistic fixes found by checkdoc
2021-09-22 20:26:40 +02:00
Lars Ingebrigtsen
43c1ee90cb
Don't use `format' on strings without % format directives
...
* lisp/vc/ediff-init.el (ediff-BAD-INFO):
* lisp/url/url-ldap.el (url-ldap):
* lisp/url/url-http.el (url-http--user-agent-default-string):
* lisp/textmodes/reftex.el (reftex-access-parse-file):
* lisp/textmodes/reftex-index.el (reftex-index-phrases-info):
* lisp/textmodes/ispell.el (ispell-create-debug-buffer):
* lisp/term.el (serial-read-speed):
* lisp/progmodes/verilog-mode.el (verilog-scan-debug):
* lisp/progmodes/idlwave.el (idlwave-find-module):
* lisp/progmodes/compile.el (compilation-revert-buffer):
* lisp/org/org-agenda.el (org-search-view):
* lisp/net/telnet.el (telnet-revert-buffer):
* lisp/net/soap-inspect.el (soap-sample-value-for-xs-simple-type):
* lisp/net/newst-backend.el (newsticker--cache-read):
* lisp/mh-e/mh-seq.el (mh-msg-is-in-seq):
* lisp/mail/smtpmail.el (smtpmail-via-smtp):
* lisp/mail/emacsbug.el (report-emacs-bug):
* lisp/jsonrpc.el (jsonrpc-error):
* lisp/help-fns.el (describe-variable):
* lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt):
* lisp/gnus/gnus.el (gnus-group-startup-message):
(gnus-group-startup-message):
* lisp/gnus/gnus-group.el (gnus-group-restart):
* lisp/frame.el (make-frame-on-display):
* lisp/emulation/viper-ex.el (ex-help):
* lisp/calendar/icalendar.el (icalendar--convert-ical-to-diary):
(icalendar--add-diary-entry):
* lisp/calendar/cal-tex.el (cal-tex-end-document):
* lisp/calc/calcalg3.el (math-ninteg-romberg): Don't use `format'
on strings that have no % format directives in them.
2021-09-21 17:52:53 +02:00
Augusto Stoffel
2172d6a28d
Make 'compile' respect buffer-local process environment
...
* lisp/progmodes/compile.el (compilation-start): Use
`process-environment' from original buffer in the compilation
process (bug#50607).
2021-09-16 16:06:29 +02:00
Stefan Kangas
f02624b342
; Minor doc fixes found by checkdoc
2021-09-13 06:44:52 +02:00
Lars Ingebrigtsen
ee2ffd9c9e
Fix problem with symlinks in compile buffers
...
* lisp/progmodes/compile.el (compilation-find-file): Avoid
`expand-file-name' when computing the file names, because that will
reliably give the wrong result when there's symlinks and ".."
involved (bug#8035).
2021-08-26 19:28:34 +02:00
Mattias Engdegård
5f33ad6954
; compilation-error-regexp-alist-alist): eval-when-compile
2021-07-31 23:44:17 +02:00
Mattias Engdegård
aa5437493b
Off-by-one error in compilation rule end-column function (bug#49624)
...
* lisp/progmodes/compile.el (compilation-error-properties):
When the end-column parameter of a compilation message rule
(in compilation-error-regexp-alist[-alist]) is a function, treat its
return value as if it were matched by the regexp, which is how it is
documented to work, and how all other parameters work.
2021-07-23 15:20:44 +02:00
Mattias Engdegård
88cc9d22df
Count compile errors when FILE is a function
...
* lisp/progmodes/compile.el (compilation-parse-errors):
Don't omit messages from the error count when FILE is a function
rather than a regexp match number.
2021-07-18 20:41:59 +02:00
pillule
8b754ca318
compilation-goto-locus does not handle right display-buffer
...
* lisp/progmodes/compile.el (compilation-goto-locus): Pop to the
source buffer if the match buffer is the selected window (bug#47414).
Copyright-paperwork-exempt: yes
2021-03-28 15:19:47 +02:00
Michael Albinus
6c60ecd2d6
Fix problem in Tramp running two async processes in parallel
...
* lisp/net/tramp-integration.el
(tramp-compile-disable-ssh-controlmaster-options): New defun. Add
it to `compilation-mode-hook'. (Bug#45518)
* lisp/progmodes/compile.el (compilation-get-file-structure):
Revert commit 4ce5646d59 , it isn't needed.
2021-03-16 18:39:51 +01:00
Tino Calancha
9380a7ed90
Add command to recenter errors from Occur/Grep buffers
...
To scroll up/down the current displayed occurrence/error
without abandon the Occur/Grep buffer.
Add also a command 'recenter-other-window' to recenter
the other window from any kind of buffer.
* lisp/window.el (recenter-other-window): New command.
Bind recenter-other-window to S-M-C-l (Bug#46119).
* lisp/simple.el (recenter-current-error): New command.
* lisp/progmodes/grep.el (grep-mode-map):
Delete bidings for n and p.
* lisp/progmodes/compile.el (compilation-minor-mode-map):
Move here the n and p bindings.
Bind `recenter-current-error' to l.
* lisp/replace.el (occur-mode-map):
Same.
* doc/emacs/windows.texi (Other Window):
* doc/emacs/display.texi (Recentering):
Document recenter-other-window.
* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
Announce the changes.
2021-02-07 16:51:07 +01:00
Stefan Kangas
59e8c37d61
Prefer defvar-local in progmodes/*.el
...
This skips libraries that might want compatibility with Emacs 24.2.
* lisp/progmodes/compile.el (compilation-auto-jump-to-next)
(compilation--previous-directory-cache, compilation--parsed)
(compilation-gcpro):
* lisp/progmodes/cpp.el (cpp-overlay-list, cpp-edit-buffer)
(cpp-parse-symbols, cpp-edit-symbols):
* lisp/progmodes/ebnf2ps.el (ebnf-eps-upper-x, ebnf-eps-upper-y)
(ebnf-eps-prod-width, ebnf-eps-max-height, ebnf-eps-max-width):
* lisp/progmodes/f90.el (f90-cache-position):
* lisp/progmodes/gud.el (gud-marker-acc):
* lisp/progmodes/js.el (js--quick-match-re)
(js--quick-match-re-func, js--cache-end, js--last-parse-pos)
(js--state-at-last-parse-pos, js--tmp-location):
* lisp/progmodes/octave.el (inferior-octave-directory-tracker-resync):
* lisp/progmodes/sh-script.el (sh-header-marker): Prefer defvar-local.
2021-01-31 20:08:25 +01:00
Michael Albinus
4ce5646d59
Fix Bug#45518 in compile.el
...
* lisp/progmodes/compile.el (compilation-get-file-structure):
Avoid call of `file-truename' for remote files. (Bug#45518)
2021-01-29 09:44:31 +01:00
Paul Eggert
50f3949119
Merge from origin/emacs-27
...
33d159c36f Fix copyright years by hand
2021-01-01 01:28:16 -08:00
Paul Eggert
ba05d005e5
Update copyright year to 2021
...
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
8c1fe1e5ef
Update copyright year to 2021
...
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2021-01-01 00:32:32 -08:00
Mattias Engdegård
ef5e0785ae
Stricter gradle-kotlin message pattern
...
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Rule 'gradle-kotlin': don't be more forgiving than necessary; we know
exactly what the output looks like (see
https://github.com/JetBrains/kotlin/commit/ \
ffe8ae3840d7b9bdc82170c8181031f05ced68bd) and there is no reason to
risk mismatches or expensive backtracking (bug#18109). Recognise
'info' level messages. Convert to rx.
2020-12-09 19:43:55 +01:00
Stefan Kangas
f33ce525b1
Prefer setq-local in compile.el
...
* lisp/progmodes/compile.el (compile-command, compilation-start)
(compilation-mode, compilation-setup, compilation-filter)
(compilation-forget-errors): Prefer setq-local.
2020-12-08 10:36:16 +01:00