Merge from origin/emacs-27
9f08524748
(origin/emacs-27) Fix broken regexps1d10885763
; spelling and comment fix614203bc80
; make change-history-commit28399e585e
* Makefile.in (PREFERRED_BRANCH): Now emacs-27.62afbc513a
Fix bug when visiting euc-jp-encoded directoriesa2c4eeeecd
Clarify when fixnums are used.4e5ac4b0c6
Reorder discussion of integer basicsf765aad28b
Make OMake support slightly less expensive (bug#39595)39410cfc5a
Speed up 'msft' and 'watcom' compilation error regexps96a269d045
Speed up 'maven' compilation error message regexpefc9d4fe3e
Amend c-backward-sws better to handle multiline block comm...
This commit is contained in:
commit
398afbaf6f
10 changed files with 72848 additions and 62 deletions
72735
ChangeLog.3
72735
ChangeLog.3
File diff suppressed because it is too large
Load diff
|
@ -1136,7 +1136,7 @@ ChangeLog:
|
|||
./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
|
||||
|
||||
# Check that we are in a good state for changing history.
|
||||
PREFERRED_BRANCH = emacs-26
|
||||
PREFERRED_BRANCH = emacs-27
|
||||
preferred-branch-is-current:
|
||||
git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
|
||||
unchanged-history-files:
|
||||
|
|
|
@ -34,39 +34,6 @@ numbers have a fixed amount of precision.
|
|||
@node Integer Basics
|
||||
@section Integer Basics
|
||||
|
||||
Integers in Emacs Lisp are not limited to the machine word size.
|
||||
|
||||
Under the hood, though, there are two kinds of integers: smaller
|
||||
ones, called @dfn{fixnums}, and larger ones, called @dfn{bignums}.
|
||||
Some functions in Emacs accept only fixnums. Also, while fixnums can
|
||||
be compared for numeric equality with @code{eq}, bignums require
|
||||
more-heavyweight equality predicates like @code{eql} and @code{=}.
|
||||
|
||||
The range of values for bignums is limited by the amount of main
|
||||
memory, by machine characteristics such as the size of the word used
|
||||
to represent a bignum's exponent, and by the @code{integer-width}
|
||||
variable. These limits are typically much more generous than the
|
||||
limits for fixnums. A bignum is never numerically equal to a fixnum;
|
||||
if Emacs computes an integer in fixnum range, it represents the
|
||||
integer as a fixnum, not a bignum.
|
||||
|
||||
The range of values for a fixnum depends on the machine. The
|
||||
minimum range is @minus{}536,870,912 to 536,870,911 (30 bits; i.e.,
|
||||
@ifnottex
|
||||
@minus{}2**29
|
||||
@end ifnottex
|
||||
@tex
|
||||
@math{-2^{29}}
|
||||
@end tex
|
||||
to
|
||||
@ifnottex
|
||||
2**29 @minus{} 1),
|
||||
@end ifnottex
|
||||
@tex
|
||||
@math{2^{29}-1}),
|
||||
@end tex
|
||||
but many machines provide a wider range.
|
||||
|
||||
The Lisp reader reads an integer as a nonempty sequence
|
||||
of decimal digits with optional initial sign and optional
|
||||
final period.
|
||||
|
@ -145,6 +112,46 @@ arguments to such functions may be either numbers or markers, we often
|
|||
give these arguments the name @var{number-or-marker}. When the argument
|
||||
value is a marker, its position value is used and its buffer is ignored.
|
||||
|
||||
In Emacs Lisp, text characters are represented by integers. Any
|
||||
integer between zero and the value of @code{(max-char)}, inclusive, is
|
||||
considered to be valid as a character. @xref{Character Codes}.
|
||||
|
||||
Integers in Emacs Lisp are not limited to the machine word size.
|
||||
Under the hood, though, there are two kinds of integers: smaller ones,
|
||||
called @dfn{fixnums}, and larger ones, called @dfn{bignums}. Although
|
||||
Emacs Lisp code ordinarily should not depend on whether an integer is
|
||||
a fixnum or a bignum, older Emacs versions support only fixnums, some
|
||||
functions in Emacs still accept only fixnums, and older Emacs Lisp
|
||||
code may have trouble when given bignums. For example, while older
|
||||
Emacs Lisp code could safely compare integers for numeric equality
|
||||
with @code{eq}, the presence of bignums means that equality predicates
|
||||
like @code{eql} and @code{=} should now be used to compare integers.
|
||||
|
||||
The range of values for bignums is limited by the amount of main
|
||||
memory, by machine characteristics such as the size of the word used
|
||||
to represent a bignum's exponent, and by the @code{integer-width}
|
||||
variable. These limits are typically much more generous than the
|
||||
limits for fixnums. A bignum is never numerically equal to a fixnum;
|
||||
Emacs always represents an integer in fixnum range as a fixnum, not a
|
||||
bignum.
|
||||
|
||||
The range of values for a fixnum depends on the machine. The
|
||||
minimum range is @minus{}536,870,912 to 536,870,911 (30 bits; i.e.,
|
||||
@ifnottex
|
||||
@minus{}2**29
|
||||
@end ifnottex
|
||||
@tex
|
||||
@math{-2^{29}}
|
||||
@end tex
|
||||
to
|
||||
@ifnottex
|
||||
2**29 @minus{} 1),
|
||||
@end ifnottex
|
||||
@tex
|
||||
@math{2^{29}-1}),
|
||||
@end tex
|
||||
but many machines provide a wider range.
|
||||
|
||||
@cindex largest fixnum
|
||||
@cindex maximum fixnum
|
||||
@defvar most-positive-fixnum
|
||||
|
@ -207,10 +214,6 @@ Setting this variable to a large number can be costly if a computation
|
|||
creates huge integers.
|
||||
@end defvar
|
||||
|
||||
In Emacs Lisp, text characters are represented by integers. Any
|
||||
integer between zero and the value of @code{(max-char)}, inclusive, is
|
||||
considered to be valid as a character. @xref{Character Codes}.
|
||||
|
||||
@node Float Basics
|
||||
@section Floating-Point Basics
|
||||
|
||||
|
|
|
@ -341,6 +341,8 @@ makepp: bla bla `/foo/bar.c' and `/foo/bar.h'
|
|||
symbol: maven
|
||||
|
||||
FooBar.java:[111,53] no interface expected here
|
||||
[ERROR] /Users/cinsk/hello.java:[651,96] ';' expected
|
||||
[WARNING] /foo/bar/Test.java:[27,43] unchecked conversion
|
||||
|
||||
|
||||
* MIPS lint; looks good for SunPro lint also
|
||||
|
@ -382,6 +384,22 @@ symbol: watcom
|
|||
..\src\ctrl\lister.c(120): Warning! W201: Unreachable code
|
||||
|
||||
|
||||
* OMake
|
||||
|
||||
symbol: omake
|
||||
|
||||
When using in -p or -P mode, OMake will detect changes to files and
|
||||
report critical build errors indented by 6 spaces.
|
||||
|
||||
*** omake: file alpha.c changed
|
||||
*** omake: targets were not rebuilt because of errors:
|
||||
alpha.o
|
||||
depends on: alpha.c
|
||||
- build . alpha.o
|
||||
+ cc -I. -c -o alpha.o alpha.c
|
||||
alpha.c:5:15: error: expected ';' after expression
|
||||
|
||||
|
||||
* Oracle pro*c
|
||||
|
||||
symbol: oracle
|
||||
|
|
|
@ -1278,7 +1278,7 @@ point is then left undefined."
|
|||
place ,property nil ,(or limit '(point-min)))))
|
||||
(when (> place ,(or limit '(point-min)))
|
||||
(goto-char place)
|
||||
(search-backward-regexp "\\(n\\|.\\)") ; to set the match-data.
|
||||
(search-backward-regexp "\\(\n\\|.\\)") ; to set the match-data.
|
||||
(point))))
|
||||
|
||||
(defun c-clear-char-property-with-value-function (from to property value)
|
||||
|
|
|
@ -327,6 +327,8 @@ comment at the start of cc-engine.el for more info."
|
|||
(when (or (null lim)
|
||||
(>= here lim))
|
||||
(save-match-data
|
||||
;; Note the similarity of the code here to some in
|
||||
;; `c-backward-sws'.
|
||||
(while
|
||||
(progn
|
||||
(while (eq (char-before (1- (point))) ?\\)
|
||||
|
@ -2461,17 +2463,34 @@ comment at the start of cc-engine.el for more info."
|
|||
(/= cmt-skip-pos simple-ws-beg)
|
||||
(c-beginning-of-macro))
|
||||
;; Inside a cpp directive. See if it should be skipped over.
|
||||
(let ((cpp-beg (point)))
|
||||
(let ((cpp-beg (point))
|
||||
pause pos)
|
||||
|
||||
;; Move back over all line continuations in the region skipped
|
||||
;; over by `c-backward-comments'. If we go past it then we
|
||||
;; started inside the cpp directive.
|
||||
;; Move back over all line continuations and block comments in
|
||||
;; the region skipped over by `c-backward-comments'. If we go
|
||||
;; past it then we started inside the cpp directive.
|
||||
(goto-char simple-ws-beg)
|
||||
(beginning-of-line)
|
||||
(while (and (> (point) cmt-skip-pos)
|
||||
(progn (backward-char)
|
||||
(eq (char-before) ?\\)))
|
||||
(beginning-of-line))
|
||||
;; Note the similarity of the code here to some in
|
||||
;; `c-beginning-of-macro'.
|
||||
(setq pause (point))
|
||||
(while
|
||||
(progn
|
||||
(while (and (> (point) cmt-skip-pos)
|
||||
(progn (backward-char)
|
||||
(eq (char-before) ?\\)))
|
||||
(beginning-of-line))
|
||||
(setq pos (point))
|
||||
(when (and c-last-c-comment-end-on-line-re
|
||||
(re-search-forward
|
||||
c-last-c-comment-end-on-line-re pause t))
|
||||
(goto-char (match-end 1))
|
||||
(if (c-backward-single-comment)
|
||||
(progn
|
||||
(beginning-of-line)
|
||||
(setq pause (point)))
|
||||
(goto-char pos)
|
||||
nil))))
|
||||
|
||||
(if (< (point) cmt-skip-pos)
|
||||
;; Don't move past the cpp directive if we began inside
|
||||
|
|
|
@ -221,7 +221,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
|
|||
;; considered before EDG.
|
||||
;; The message may be a "warning", "error", or "fatal error" with
|
||||
;; an error code, or "see declaration of" without an error code.
|
||||
"^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) ?\
|
||||
"^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)) ?\
|
||||
: \\(?:see declaration\\|\\(?:warnin\\(g\\)\\|[a-z ]+\\) C[0-9]+:\\)"
|
||||
2 3 nil (4))
|
||||
|
||||
|
@ -268,12 +268,24 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
|
|||
(jikes-file
|
||||
"^\\(?:Found\\|Issued\\) .* compiling \"\\(.+\\)\":$" 1 nil nil 0)
|
||||
|
||||
|
||||
;; This used to be pathologically slow on long lines (Bug#3441),
|
||||
;; due to matching filenames via \\(.*?\\). This might be faster.
|
||||
(maven
|
||||
;; Maven is a popular free software build tool for Java.
|
||||
"\\(\\[WARNING\\] *\\)?\\([^ \n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] " 2 3 4 (1))
|
||||
,(rx bol
|
||||
;; It is unclear whether the initial [type] tag is always present.
|
||||
(? "["
|
||||
(or "ERROR" (group-n 1 "WARNING") (group-n 2 "INFO"))
|
||||
"] ")
|
||||
(group-n 3 ; File
|
||||
(not (any "\n ["))
|
||||
(* (or (not (any "\n :"))
|
||||
(: " " (not (any "\n/-")))
|
||||
(: ":" (not (any "\n ["))))))
|
||||
":["
|
||||
(group-n 4 (+ digit)) ; Line
|
||||
","
|
||||
(group-n 5 (+ digit)) ; Column
|
||||
"] ")
|
||||
3 4 5 (1 . 2))
|
||||
|
||||
(jikes-line
|
||||
"^ *\\([0-9]+\\)\\.[ \t]+.*\n +\\(<-*>\n\\*\\*\\* \\(?:Error\\|Warnin\\(g\\)\\)\\)"
|
||||
|
@ -294,7 +306,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
|
|||
1 2 3 (4 . 5))
|
||||
|
||||
(ruby-Test::Unit
|
||||
"^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
|
||||
"^ [[ ]?\\([^ (].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
|
||||
|
||||
(gmake
|
||||
;; Set GNU make error messages as INFO level.
|
||||
|
@ -394,7 +406,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
|
|||
(omake
|
||||
;; "omake -P" reports "file foo changed"
|
||||
;; (useful if you do "cvs up" and want to see what has changed)
|
||||
"omake: file \\(.*\\) changed" 1 nil nil nil nil
|
||||
"^\\*\\*\\* omake: file \\(.*\\) changed" 1 nil nil nil nil
|
||||
;; FIXME-omake: This tries to prevent reusing pre-existing markers
|
||||
;; for subsequent messages, since those messages's line numbers
|
||||
;; are about another version of the file.
|
||||
|
@ -443,7 +455,7 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?"
|
|||
"^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., (-]" 1 2 3)
|
||||
|
||||
(watcom
|
||||
"^[ \t]*\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)): ?\
|
||||
"^[ \t]*\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)): ?\
|
||||
\\(?:\\(Error! E[0-9]+\\)\\|\\(Warning! W[0-9]+\\)\\):"
|
||||
1 2 nil (4))
|
||||
|
||||
|
@ -1441,7 +1453,7 @@ to `compilation-error-regexp-alist' if RULES is nil."
|
|||
((not (memq 'omake compilation-error-regexp-alist)) nil)
|
||||
((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat)
|
||||
nil) ;; Not anchored or anchored but already allows empty spaces.
|
||||
(t (setq pat (concat "^ *" (substring pat 1)))))
|
||||
(t (setq pat (concat "^\\(?: \\)?" (substring pat 1)))))
|
||||
|
||||
(if (consp file) (setq fmt (cdr file) file (car file)))
|
||||
(if (consp line) (setq end-line (cdr line) line (car line)))
|
||||
|
|
|
@ -367,7 +367,7 @@ Turning on SIMULA mode calls the value of the variable simula-mode-hook
|
|||
with no arguments, if that value is non-nil."
|
||||
(set (make-local-variable 'comment-column) 40)
|
||||
;; (set (make-local-variable 'end-comment-column) 75)
|
||||
(set (make-local-variable 'paragraph-start) "[ \t]*$\\|\\f")
|
||||
(set (make-local-variable 'paragraph-start) "[ \t]*$\\|\f")
|
||||
(set (make-local-variable 'paragraph-separate) paragraph-start)
|
||||
(set (make-local-variable 'indent-line-function) 'simula-indent-line)
|
||||
(set (make-local-variable 'comment-start) "! ")
|
||||
|
|
|
@ -2916,7 +2916,7 @@ See `file-symlink-p' to distinguish symlinks. */)
|
|||
if (!NILP (handler))
|
||||
return call2 (handler, Qfile_directory_p, absname);
|
||||
|
||||
return file_directory_p (absname) ? Qt : Qnil;
|
||||
return file_directory_p (ENCODE_FILE (absname)) ? Qt : Qnil;
|
||||
}
|
||||
|
||||
/* Return true if FILE is a directory or a symlink to a directory.
|
||||
|
|
|
@ -242,7 +242,7 @@
|
|||
;; maven
|
||||
("FooBar.java:[111,53] no interface expected here"
|
||||
1 53 111 "FooBar.java" 2)
|
||||
(" [ERROR] /Users/cinsk/hello.java:[651,96] ';' expected"
|
||||
("[ERROR] /Users/cinsk/hello.java:[651,96] ';' expected"
|
||||
15 96 651 "/Users/cinsk/hello.java" 2) ;Bug#11517.
|
||||
("[WARNING] /foo/bar/Test.java:[27,43] unchecked conversion"
|
||||
11 43 27 "/foo/bar/Test.java" 1) ;Bug#20556
|
||||
|
@ -269,6 +269,9 @@
|
|||
1 nil 109 "..\\src\\ctrl\\lister.c")
|
||||
("..\\src\\ctrl\\lister.c(120): Warning! W201: Unreachable code"
|
||||
1 nil 120 "..\\src\\ctrl\\lister.c")
|
||||
;; omake
|
||||
(" alpha.c:5:15: error: expected ';' after expression"
|
||||
1 15 5 "alpha.c")
|
||||
;; oracle
|
||||
("Semantic error at line 528, column 5, file erosacqdb.pc:"
|
||||
1 5 528 "erosacqdb.pc")
|
||||
|
@ -428,7 +431,7 @@ The test data is in `compile-tests--test-regexps-data'."
|
|||
(compilation-num-warnings-found 0)
|
||||
(compilation-num-infos-found 0))
|
||||
(mapc #'compile--test-error-line compile-tests--test-regexps-data)
|
||||
(should (eq compilation-num-errors-found 92))
|
||||
(should (eq compilation-num-errors-found 93))
|
||||
(should (eq compilation-num-warnings-found 36))
|
||||
(should (eq compilation-num-infos-found 26)))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue