Merge from origin/emacs-27
8aad80d661
Fix installer build47a73e3e14
Update Windows build documentationcd55984153
Calc: add missing dynamic variable declarationse8aa6f19e9
* doc/emacs/buffers.texi (Kill Buffer): Improve indexing.ccd7cd2c51
Speed up dired-do-find-regexp7edb1f0773
; Remove outdated declarations6ab40c1a51
; Clarify the assumptionbe38e39fcc
project--find-regexp-in-files: Support remote files21c3020fce
Document some restrictions for module functions.e1ce9f3423
Don't recommend using 'module-load' for loading modules.03f962a486
Port x_get_monitor_attributes_fallback to !HAVE_GTK30b32f59764
Fix compilation warning in gnus-start.el
This commit is contained in:
commit
822c98a442
13 changed files with 147 additions and 36 deletions
|
@ -68,7 +68,8 @@ uploaded.
|
|||
Build Process
|
||||
-------------
|
||||
|
||||
For each major version:
|
||||
For each major version
|
||||
----------------------
|
||||
|
||||
The dependencies files need to be created. This can be around the time
|
||||
of the pre-tests, then used for all releases of that version, to
|
||||
|
@ -78,9 +79,9 @@ To do this:
|
|||
|
||||
Update msys to the latest version with `pacman -Syu`.
|
||||
|
||||
Then run build-dep-zips.py, in this directory. Three zips will be
|
||||
created, containing the 64bit and 32bit dependencies, as well as the
|
||||
source for these.
|
||||
Then run build-dep-zips.py, in the ~/emacs-build/deps directory. Three
|
||||
zips will be created, containing the 64bit and 32bit dependencies, as
|
||||
well as the source for these.
|
||||
|
||||
For emacs release or pre-test version:
|
||||
|
||||
|
@ -90,3 +91,47 @@ with the tag of the last version.
|
|||
Then run `build-zips.sh` in this worktree. Eventually, four new zip
|
||||
files will be created in ~/emacs-upload from where they can be signed
|
||||
and uploaded with `gnupload`.
|
||||
|
||||
|
||||
For snapshots from Master
|
||||
-------------------------
|
||||
|
||||
Snapshots are generally created from master when there is a release
|
||||
branch on which a release has already been created. At this point,
|
||||
only pre-tests or full releases need to happen from the release
|
||||
branch.
|
||||
|
||||
To do this:
|
||||
|
||||
Update msys to the latest version with `pacman -Syu`.
|
||||
|
||||
Then run build-dep-zips.py, in ~/emacs-build/deps directory. Three
|
||||
zips will be created, containing the 64bit and 32bit dependencies, as
|
||||
well as the source for these. These deps files contain the date of
|
||||
creation in their name. The deps file can be reused as desired, or a
|
||||
new version created. Where multiple deps files exist, the most
|
||||
recent will be used.
|
||||
|
||||
Now, run `build-zips.sh -s` to build a snapshot release.
|
||||
|
||||
|
||||
For snapshots from a Release Branch
|
||||
-----------------------------------
|
||||
|
||||
Snapshots can be built from a release branch; this is really only
|
||||
useful before a pre-test has happened.
|
||||
|
||||
The process is the same as for building from the master branch, except
|
||||
that the release branch should already exist as a worktree, and the
|
||||
version number must be added to the command line with `build-zips.sh
|
||||
-V 27 -s`. The final zips will be named after the branch rather than
|
||||
the version (e.g emacs-27-2019-12-26.zip) rather than than the Emacs
|
||||
version (e.g emacs-27.0.50.zip).
|
||||
|
||||
For snapshots from another branch
|
||||
---------------------------------
|
||||
|
||||
Snapshots can be build from any other branch. There is rarely a need
|
||||
to do this, except where some significant, wide-ranging feature is
|
||||
being added on a feature branch. In this case, the branch can be
|
||||
given using `build-zips.sh -b pdumper -s` for example.
|
||||
|
|
|
@ -160,23 +160,27 @@ while getopts "36gb:hnsiV:" opt; do
|
|||
esac
|
||||
done
|
||||
|
||||
if [ -z $VERSION ];
|
||||
|
||||
## ACTUAL_VERSION is the version declared by emacs
|
||||
if [ -z $ACTUAL_VERSION ];
|
||||
then
|
||||
VERSION=`
|
||||
ACTUAL_VERSION=`
|
||||
sed -n 's/^AC_INIT(GNU Emacs,[ ]*\([^ ,)]*\).*/\1/p' < ../../../configure.ac
|
||||
`
|
||||
fi
|
||||
|
||||
if [ -z $VERSION ];
|
||||
if [ -z $ACTUAL_VERSION ];
|
||||
then
|
||||
echo [build] Cannot determine Emacs version
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## VERSION is the version that we want to call Emacs
|
||||
VERSION=$ACTUAL_VERSION
|
||||
|
||||
|
||||
MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)"
|
||||
|
||||
## ACTUAL VERSION is the version declared by emacs
|
||||
ACTUAL_VERSION=$VERSION
|
||||
|
||||
## VERSION includes the word snapshot if necessary
|
||||
VERSION=$VERSION$SNAPSHOT
|
||||
|
|
|
@ -308,6 +308,8 @@ Offer to kill all buffers matching a regular expression.
|
|||
|
||||
@findex kill-buffer
|
||||
@kindex C-x k
|
||||
@cindex killing unsaved buffers
|
||||
@cindex unsaved buffers, killing
|
||||
@kbd{C-x k} (@code{kill-buffer}) kills one buffer, whose name you
|
||||
specify in the minibuffer. The default, used if you type just
|
||||
@key{RET} in the minibuffer, is to kill the current buffer. If you
|
||||
|
|
|
@ -1408,6 +1408,22 @@ the function to that symbol. Note that it is possible to use
|
|||
@code{fset} instead of @code{defalias}; the differences are described
|
||||
in @ref{Defining Functions, defalias}.
|
||||
|
||||
Module functions including the @code{emacs_module_init} function
|
||||
(@pxref{module initialization function}) may only interact with Emacs
|
||||
by calling environment functions from some live @code{emacs_env}
|
||||
pointer while being called directly or indirectly from Emacs. In
|
||||
other words, if a module function wants to call Lisp functions or
|
||||
Emacs primitives, convert @code{emacs_value} objects to and from C
|
||||
datatypes (@pxref{Module Values}), or interact with Emacs in any other
|
||||
way, some call from Emacs to @code{emacs_module_init} or to a module
|
||||
function must be in the callstack. Module function may not interact
|
||||
with Emacs while garbage collection is running; @pxref{Garbage
|
||||
Collection}. They may only interact with Emacs from Lisp interpreter
|
||||
threads (including the main thread) created by Emacs; @pxref{Threads}.
|
||||
The @kbd{--module-assertions} command-line option can detect some
|
||||
violations of the above requirements. @xref{Initial Options,,,emacs,
|
||||
The GNU Emacs Manual}.
|
||||
|
||||
Using the module @acronym{API}, it is possible to define more complex
|
||||
function and data types: interactive functions, inline functions,
|
||||
macros, etc. However, the resulting C code will be cumbersome and
|
||||
|
@ -1428,8 +1444,8 @@ following simple Lisp wrapper:
|
|||
@end lisp
|
||||
|
||||
The Lisp package which goes with your module could then load the
|
||||
module using the @code{module-load} primitive (@pxref{Dynamic
|
||||
Modules}) when the package is loaded into Emacs.
|
||||
module using the @code{load} primitive (@pxref{Dynamic Modules}) when
|
||||
the package is loaded into Emacs.
|
||||
|
||||
@node Module Values
|
||||
@subsection Conversion Between Lisp and Module Values
|
||||
|
|
|
@ -1220,6 +1220,12 @@ during the initialization. If the initialization succeeds,
|
|||
@code{module-load} returns @code{t}. Note that @var{file} must
|
||||
already have the proper file-name extension, as this function doesn't
|
||||
try looking for files with known extensions, unlike @code{load}.
|
||||
|
||||
Unlike @code{load}, @code{module-load} doesn't record the module in
|
||||
@code{load-history}, doesn't print any messages, and doesn't protect
|
||||
against recursive loads. Most users should therefore use @code{load},
|
||||
@code{load-file}, @code{load-library}, or @code{require} instead of
|
||||
@code{module-load}.
|
||||
@end defun
|
||||
|
||||
Loadable modules in Emacs are enabled by using the
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
;;; Algebra commands.
|
||||
|
||||
(defvar math-simplify-only)
|
||||
|
||||
(defun calc-alg-evaluate (arg)
|
||||
(interactive "p")
|
||||
(calc-slow-wrapper
|
||||
|
@ -38,6 +40,8 @@
|
|||
(calc-modify-simplify-mode arg)
|
||||
(calc-enter-result 1 "dsmp" (calc-top 1))))))
|
||||
|
||||
(defvar calc-simplify-mode)
|
||||
|
||||
(defun calc-modify-simplify-mode (arg)
|
||||
(if (= (math-abs arg) 2)
|
||||
(setq calc-simplify-mode 'alg)
|
||||
|
@ -67,6 +71,8 @@
|
|||
(calc-with-default-simplification
|
||||
(calc-enter-result 1 "esmp" (math-simplify-extended (calc-top-n 1))))))
|
||||
|
||||
(defvar math-expand-formulas)
|
||||
|
||||
(defun calc-expand-formula (arg)
|
||||
(interactive "p")
|
||||
(calc-slow-wrapper
|
||||
|
@ -160,6 +166,8 @@
|
|||
(calc-binary-op "pgcd" 'calcFunc-pgcd arg)))
|
||||
|
||||
|
||||
(defvar calc-poly-div-remainder)
|
||||
|
||||
(defun calc-poly-div (arg)
|
||||
(interactive "P")
|
||||
(calc-slow-wrapper
|
||||
|
@ -303,6 +311,7 @@
|
|||
(math-beforep (car a) (car b)))))
|
||||
(t (string-lessp (car a) (car b)))))
|
||||
|
||||
(defvar math-living-dangerously)
|
||||
|
||||
(defsubst math-simplify-extended (a)
|
||||
(let ((math-living-dangerously t))
|
||||
|
@ -363,6 +372,9 @@
|
|||
|
||||
;; math-normalize-error is declared in calc.el.
|
||||
(defvar math-normalize-error)
|
||||
(defvar math-simplifying)
|
||||
(defvar calc-angle-mode)
|
||||
|
||||
(defun math-simplify (top-expr)
|
||||
(let ((math-simplifying t)
|
||||
(calc-angle-mode (if (calc-input-angle-units top-expr)
|
||||
|
@ -677,6 +689,8 @@ and should return the simplified expression to use (or nil)."
|
|||
(math-make-frac (math-gcd (nth 1 a) (nth 1 b))
|
||||
(math-gcd (nth 2 a) (nth 2 b)))))))
|
||||
|
||||
(defvar calc-prefer-frac)
|
||||
|
||||
(math-defsimplify %
|
||||
(and (Math-realp (nth 2 expr))
|
||||
(Math-posp (nth 2 expr))
|
||||
|
@ -1671,6 +1685,7 @@ and should return the simplified expression to use (or nil)."
|
|||
(defvar math-is-poly-degree)
|
||||
(defvar math-is-poly-loose)
|
||||
(defvar math-var)
|
||||
(defvar math-poly-base-variable)
|
||||
|
||||
(defun math-is-polynomial (expr var &optional degree loose)
|
||||
(let* ((math-poly-base-variable (if loose
|
||||
|
|
|
@ -2957,6 +2957,8 @@ with the command \\[tags-loop-continue]."
|
|||
|
||||
(declare-function xref--show-xrefs "xref")
|
||||
(declare-function xref-query-replace-in-results "xref")
|
||||
(declare-function project--files-in-directory "project")
|
||||
(declare-function project--find-regexp-in-files "project")
|
||||
|
||||
;;;###autoload
|
||||
(defun dired-do-find-regexp (regexp)
|
||||
|
@ -2975,19 +2977,24 @@ REGEXP should use constructs supported by your local `grep' command."
|
|||
(require 'xref)
|
||||
(defvar grep-find-ignored-files)
|
||||
(declare-function rgrep-find-ignored-directories "grep" (dir))
|
||||
(let* ((files (dired-get-marked-files nil nil nil nil t))
|
||||
(let* ((marks (dired-get-marked-files nil nil nil nil t))
|
||||
(ignores (nconc (mapcar
|
||||
#'file-name-as-directory
|
||||
(rgrep-find-ignored-directories default-directory))
|
||||
grep-find-ignored-files))
|
||||
(fetcher
|
||||
(lambda ()
|
||||
(let ((xrefs (mapcan
|
||||
(lambda (file)
|
||||
(xref-collect-matches regexp "*" file
|
||||
(and (file-directory-p file)
|
||||
ignores)))
|
||||
files)))
|
||||
(let (files xrefs)
|
||||
(mapc
|
||||
(lambda (mark)
|
||||
(if (file-directory-p mark)
|
||||
(setq files (nconc
|
||||
(project--files-in-directory mark ignores "*")
|
||||
files))
|
||||
(push mark files)))
|
||||
(nreverse marks))
|
||||
(setq xrefs
|
||||
(project--find-regexp-in-files regexp files))
|
||||
(unless xrefs
|
||||
(user-error "No matches for: %s" regexp))
|
||||
xrefs))))
|
||||
|
|
|
@ -2871,7 +2871,6 @@ SPECIFIC-VARIABLES, or those in `gnus-variable-list'."
|
|||
(nth 1 (gethash g gnus-newsrc-hashtb)))
|
||||
(delete "dummy.group" gnus-group-list)))
|
||||
(let* ((print-quoted t)
|
||||
(print-readably t)
|
||||
(print-escape-multibyte nil)
|
||||
(print-escape-nonascii t)
|
||||
(print-length nil)
|
||||
|
|
|
@ -690,13 +690,12 @@ yield \"nnimap:yxa\"."
|
|||
|
||||
(defmacro gnus-bind-print-variables (&rest forms)
|
||||
"Bind print-* variables and evaluate FORMS.
|
||||
This macro is used with `prin1', `pp', etc. in order to ensure printed
|
||||
Lisp objects are loadable. Bind `print-quoted' and `print-readably'
|
||||
to t, and `print-escape-multibyte', `print-escape-newlines',
|
||||
This macro is used with `prin1', `pp', etc. in order to ensure
|
||||
printed Lisp objects are loadable. Bind `print-quoted' to t, and
|
||||
`print-escape-multibyte', `print-escape-newlines',
|
||||
`print-escape-nonascii', `print-length', `print-level' and
|
||||
`print-string-length' to nil."
|
||||
`(let ((print-quoted t)
|
||||
(print-readably t)
|
||||
;;print-circle
|
||||
;;print-continuous-numbering
|
||||
print-escape-multibyte
|
||||
|
@ -710,26 +709,26 @@ to t, and `print-escape-multibyte', `print-escape-newlines',
|
|||
|
||||
(defun gnus-prin1 (form)
|
||||
"Use `prin1' on FORM in the current buffer.
|
||||
Bind `print-quoted' and `print-readably' to t, and `print-length' and
|
||||
`print-level' to nil. See also `gnus-bind-print-variables'."
|
||||
Bind `print-quoted' to t, and `print-length' and `print-level' to
|
||||
nil. See also `gnus-bind-print-variables'."
|
||||
(gnus-bind-print-variables (prin1 form (current-buffer))))
|
||||
|
||||
(defun gnus-prin1-to-string (form)
|
||||
"The same as `prin1'.
|
||||
Bind `print-quoted' and `print-readably' to t, and `print-length' and
|
||||
`print-level' to nil. See also `gnus-bind-print-variables'."
|
||||
Bind `print-quoted' to t, and `print-length' and `print-level' to
|
||||
nil. See also `gnus-bind-print-variables'."
|
||||
(gnus-bind-print-variables (prin1-to-string form)))
|
||||
|
||||
(defun gnus-pp (form &optional stream)
|
||||
"Use `pp' on FORM in the current buffer.
|
||||
Bind `print-quoted' and `print-readably' to t, and `print-length' and
|
||||
`print-level' to nil. See also `gnus-bind-print-variables'."
|
||||
Bind `print-quoted' to t, and `print-length' and `print-level' to
|
||||
nil. See also `gnus-bind-print-variables'."
|
||||
(gnus-bind-print-variables (pp form (or stream (current-buffer)))))
|
||||
|
||||
(defun gnus-pp-to-string (form)
|
||||
"The same as `pp-to-string'.
|
||||
Bind `print-quoted' and `print-readably' to t, and `print-length' and
|
||||
`print-level' to nil. See also `gnus-bind-print-variables'."
|
||||
Bind `print-quoted' to t, and `print-length' and `print-level' to
|
||||
nil. See also `gnus-bind-print-variables'."
|
||||
(gnus-bind-print-variables (pp-to-string form)))
|
||||
|
||||
(defun gnus-make-directory (directory)
|
||||
|
|
|
@ -630,9 +630,7 @@ functions are annotated with \"<f>\" via the
|
|||
|
||||
;;; Xref backend
|
||||
|
||||
(declare-function xref-make-bogus-location "xref" (message))
|
||||
(declare-function xref-make "xref" (summary location))
|
||||
(declare-function xref-collect-references "xref" (symbol dir))
|
||||
|
||||
(defun elisp--xref-backend () 'elisp)
|
||||
|
||||
|
|
|
@ -450,6 +450,10 @@ pattern to search for."
|
|||
(status nil)
|
||||
(hits nil)
|
||||
(xrefs nil)
|
||||
;; Support for remote files. The assumption is that, if the
|
||||
;; first file is remote, they all are, and on the same host.
|
||||
(dir (file-name-directory (car files)))
|
||||
(remote-id (file-remote-p dir))
|
||||
;; 'git ls-files' can output broken symlinks.
|
||||
(command (format "xargs -0 grep %s -snHE -e %s"
|
||||
(if (and case-fold-search
|
||||
|
@ -457,10 +461,13 @@ pattern to search for."
|
|||
"-i"
|
||||
"")
|
||||
(shell-quote-argument (xref--regexp-to-extended regexp)))))
|
||||
(when remote-id
|
||||
(setq files (mapcar #'file-local-name files)))
|
||||
(with-current-buffer output
|
||||
(erase-buffer)
|
||||
(with-temp-buffer
|
||||
(insert (mapconcat #'identity files "\0"))
|
||||
(setq default-directory dir)
|
||||
(setq status
|
||||
(project--process-file-region (point-min)
|
||||
(point-max)
|
||||
|
@ -478,7 +485,7 @@ pattern to search for."
|
|||
(buffer-substring (point-min) (line-end-position))))
|
||||
(while (re-search-forward grep-re nil t)
|
||||
(push (list (string-to-number (match-string line-group))
|
||||
(match-string file-group)
|
||||
(concat remote-id (match-string file-group))
|
||||
(buffer-substring-no-properties (point) (line-end-position)))
|
||||
hits)))
|
||||
(setq xrefs (xref--convert-hits (nreverse hits) regexp))
|
||||
|
|
|
@ -4576,7 +4576,6 @@ On MS Windows, this just returns nil. */)
|
|||
Return false if and only if the workarea information cannot be
|
||||
obtained via the _NET_WORKAREA root window property. */
|
||||
|
||||
#ifndef HAVE_GTK3
|
||||
static bool
|
||||
x_get_net_workarea (struct x_display_info *dpyinfo, XRectangle *rect)
|
||||
{
|
||||
|
@ -4634,7 +4633,6 @@ x_get_net_workarea (struct x_display_info *dpyinfo, XRectangle *rect)
|
|||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef USE_GTK
|
||||
|
||||
|
|
|
@ -318,6 +318,21 @@ An existing calc stack is reused, otherwise a new one is created."
|
|||
'(vec (calcFunc-eq (var x var-x) 3)
|
||||
(calcFunc-eq (var y var-y) 0)))))
|
||||
|
||||
(ert-deftest calc-poly-div ()
|
||||
"Test polynomial division, and that the remainder is recorded in the trail."
|
||||
(with-current-buffer (calc-trail-buffer)
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
|
||||
(calc-eval "2x**3+1" 'push)
|
||||
(calc-eval "x**2+2x" 'push)
|
||||
(calc-poly-div nil)
|
||||
(let ((tos (calc-top-n 1))
|
||||
(trail (buffer-string)))
|
||||
(calc-pop 0)
|
||||
(should (equal tos '(- (* 2 (var x var-x)) 4)))
|
||||
(should (equal trail "pdiv 2 * x - 4\nprem 8 * x + 1\n"))))))
|
||||
|
||||
(provide 'calc-tests)
|
||||
;;; calc-tests.el ends here
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue