[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk 3005c00: Merge remote-tracking branch 'origin/master' into
From: |
Po Lu |
Subject: |
feature/pgtk 3005c00: Merge remote-tracking branch 'origin/master' into feature/pgtk |
Date: |
Tue, 30 Nov 2021 20:05:24 -0500 (EST) |
branch: feature/pgtk
commit 3005c00b13e45feb387cc9ab71a68d6c301fe63e
Merge: c3a440e aa0162d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Merge remote-tracking branch 'origin/master' into feature/pgtk
---
doc/emacs/emacs.texi | 16 ++--
doc/emacs/regs.texi | 30 ++++--
doc/lispref/text.texi | 41 ++++++++
etc/NEWS | 11 +++
lisp/Makefile.in | 15 +--
lisp/emacs-lisp/generator.el | 19 ++--
lisp/emacs-lisp/macroexp.el | 9 +-
lisp/ldefs-boot.el | 218 ++++++++++++++++++++++---------------------
lisp/net/shr.el | 40 +++-----
lisp/pixel-scroll.el | 86 +++++++++--------
lisp/register.el | 7 ++
lisp/startup.el | 16 +++-
lisp/textmodes/pixel-fill.el | 27 +++++-
src/comp.c | 35 +++----
src/nsterm.m | 2 +-
15 files changed, 329 insertions(+), 243 deletions(-)
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index ce92435..dff42c7 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -345,14 +345,14 @@ Cut and Paste Operations on Graphical Displays
Registers
-* Position Registers:: Saving positions in registers.
-* Text Registers:: Saving text in registers.
-* Rectangle Registers:: Saving rectangles in registers.
-* Configuration Registers:: Saving window configurations in registers.
-* Number Registers:: Numbers in registers.
-* File Registers:: File names in registers.
-* Keyboard Macro Registers:: Keyboard macros in registers.
-* Bookmarks:: Bookmarks are like registers, but persistent.
+* Position Registers:: Saving positions in registers.
+* Text Registers:: Saving text in registers.
+* Rectangle Registers:: Saving rectangles in registers.
+* Configuration Registers:: Saving window configurations in registers.
+* Number Registers:: Numbers in registers.
+* File and Buffer Registers:: File and buffer names in registers.
+* Keyboard Macro Registers:: Keyboard macros in registers.
+* Bookmarks:: Bookmarks are like registers, but persistent.
Controlling the Display
diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi
index 59fa0ff..df1eec0 100644
--- a/doc/emacs/regs.texi
+++ b/doc/emacs/regs.texi
@@ -47,14 +47,14 @@ are similar in spirit to registers, so they are also
documented in
this chapter.
@menu
-* Position Registers:: Saving positions in registers.
-* Text Registers:: Saving text in registers.
-* Rectangle Registers:: Saving rectangles in registers.
-* Configuration Registers:: Saving window configurations in registers.
-* Number Registers:: Numbers in registers.
-* File Registers:: File names in registers.
-* Keyboard Macro Registers:: Keyboard macros in registers.
-* Bookmarks:: Bookmarks are like registers, but persistent.
+* Position Registers:: Saving positions in registers.
+* Text Registers:: Saving text in registers.
+* Rectangle Registers:: Saving rectangles in registers.
+* Configuration Registers:: Saving window configurations in registers.
+* Number Registers:: Numbers in registers.
+* File and Buffer Registers:: File and buffer names in registers.
+* Keyboard Macro Registers:: Keyboard macros in registers.
+* Bookmarks:: Bookmarks are like registers, but persistent.
@end menu
@node Position Registers
@@ -238,9 +238,10 @@ register contents into the buffer. @kbd{C-x r +} with no
numeric
argument increments the register value by 1; @kbd{C-x r n} with no
numeric argument stores zero in the register.
-@node File Registers
-@section Keeping File Names in Registers
+@node File and Buffer Registers
+@section Keeping File and Buffer Names in Registers
@cindex saving file name in a register
+@cindex saving buffer name in a register
If you visit certain file names frequently, you can visit them more
conveniently if you put their names in registers. Here's the Lisp code
@@ -265,6 +266,15 @@ puts the file name shown in register @samp{z}.
@var{r}}. (This is the same command used to jump to a position or
restore a frame configuration.)
+ Similarly, if there's certain buffers you visit frequently, you
+can put their names in registers. For instance, if you visit the
+@samp{*Messages*} buffer often, you can use the following snippet to
+put that buffer into the @samp{m} register:
+
+@smallexample
+(set-register ?m '(buffer . "*Messages*"))
+@end smallexample
+
@node Keyboard Macro Registers
@section Keyboard Macro Registers
@cindex saving keyboard macro in a register
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 25579e7..b49a998 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1651,6 +1651,47 @@ The variable @code{paragraph-separate} controls how to
distinguish
paragraphs. @xref{Standard Regexps}.
@end deffn
+@defun pixel-fill-region start end pixel-width
+Most Emacs buffers use monospaced text, so all the filling functions
+(like @code{fill-region}) work based on the number of characters and
+@code{char-width}. However, Emacs can render other types of things,
+like text that contains images and using proportional fonts, and the
+@code{pixel-fill-region} exists to handle that. It fills the region
+of text between @var{start} and @var{end} at pixel granularity, so
+text using variable-pitch fonts or several different fonts looks
+filled regardless of different character sizes. The argument
+@var{pixel-width} specifies the maximum pixel width a line is allowed
+to have after filling; it is the pixel-resolution equivalent of the
+@code{fill-column} in @code{fill-region}. For instance, this Lisp
+snippet will insert text using a proportional font, and then fill this
+to be no wider than 300 pixels:
+
+@lisp
+(insert (propertize
+ "This is a sentence that's ends here."
+ 'face 'variable-pitch))
+(pixel-fill-region (point) (point-max) 300)
+@end lisp
+
+If @var{start} isn't at the start of a line, the horizontal position
+of @var{start}, converted to pixel units, will be used as the
+indentation prefix on subsequent lines.
+
+@findex pixel-fill-width
+The @code{pixel-fill-width} helper function can be used to compute the
+pixel width to use. If given no arguments, it'll return a value
+slightly less than the width of the current window. The first
+optional value, @var{columns}, specifies the number of columns using
+the standard, monospaced fonts, e.g. @code{fill-column}. The second
+optional value is the window to use. You'd typically use it like
+this:
+
+@lisp
+(pixel-fill-region
+ start end (pixel-fill-width fill-column))
+@end lisp
+@end defun
+
@deffn Command fill-individual-paragraphs start end &optional justify
citation-regexp
This command fills each paragraph in the region according to its
individual fill prefix. Thus, if the lines of a paragraph were indented
diff --git a/etc/NEWS b/etc/NEWS
index 1ca5c86..5268647 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -295,10 +295,21 @@ received.
* Changes in Specialized Modes and Packages in Emacs 29.1
+** Registers
+
++++
+*** Buffer names can now be stored in registers.
+For instance, to enable jumping to the *Messages* buffer with
+`C-x r j m':
+
+ (set-register ?m '(buffer . "*Messages*"))
+
** pixel-fill
++++
*** This is a new package that deals with filling variable-pitch text.
++++
*** New function 'pixel-fill-region'.
This fills the region to be no wider than a specified pixel width.
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 3e764c5..60d1d10 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -91,19 +91,8 @@ COMPILE_FIRST = \
$(lisp)/emacs-lisp/byte-opt.elc \
$(lisp)/emacs-lisp/bytecomp.elc
ifeq ($(HAVE_NATIVE_COMP),yes)
-COMPILE_FIRST += \
- $(lisp)/emacs-lisp/comp.elc \
- $(lisp)/emacs-lisp/comp-cstr.elc \
- $(lisp)/emacs-lisp/cl-macs.elc \
- $(lisp)/emacs-lisp/rx.elc \
- $(lisp)/emacs-lisp/cl-seq.elc \
- $(lisp)/help-mode.elc \
- $(lisp)/emacs-lisp/cl-extra.elc \
- $(lisp)/emacs-lisp/gv.elc \
- $(lisp)/emacs-lisp/seq.elc \
- $(lisp)/emacs-lisp/cl-lib.elc \
- $(lisp)/emacs-lisp/warnings.elc \
- $(lisp)/emacs-lisp/subr-x.elc
+COMPILE_FIRST += $(lisp)/emacs-lisp/comp.elc
+COMPILE_FIRST += $(lisp)/emacs-lisp/comp-cstr.elc
endif
COMPILE_FIRST += $(lisp)/emacs-lisp/autoload.elc
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 2075ac4..cb02410 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -291,22 +291,28 @@ DYNAMIC-VAR bound to STATIC-VAR."
(cps--transform-1 `(progn ,@rest)
next-state)))
- ;; Process `let' in a helper function that transforms it into a
- ;; let* with temporaries.
+ (`(,(or 'let 'let*) () . ,body)
+ (cps--transform-1 `(progn ,@body) next-state))
+
+ ;; Transform multi-variable `let' into `let*':
+ ;; (let ((v1 e1) ... (vN eN)) BODY)
+ ;; -> (let* ((t1 e1) ... (tN-1 eN-1) (vN eN) (v1 t1) (vN-1 tN-1)) BODY)
(`(let ,bindings . ,body)
(let* ((bindings (cl-loop for binding in bindings
collect (if (symbolp binding)
(list binding nil)
binding)))
- (temps (cl-loop for (var _value-form) in bindings
+ (butlast-bindings (butlast bindings))
+ (temps (cl-loop for (var _value-form) in butlast-bindings
collect (cps--add-binding var))))
(cps--transform-1
`(let* ,(append
- (cl-loop for (_var value-form) in bindings
+ (cl-loop for (_var value-form) in butlast-bindings
for temp in temps
collect (list temp value-form))
- (cl-loop for (var _binding) in bindings
+ (last bindings)
+ (cl-loop for (var _binding) in butlast-bindings
for temp in temps
collect (list var temp)))
,@body)
@@ -315,9 +321,6 @@ DYNAMIC-VAR bound to STATIC-VAR."
;; Process `let*' binding: process one binding at a time. Flatten
;; lexical bindings.
- (`(let* () . ,body)
- (cps--transform-1 `(progn ,@body) next-state))
-
(`(let* (,binding . ,more-bindings) . ,body)
(let* ((var (if (symbolp binding) binding (car binding)))
(value-form (car (cdr-safe binding)))
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 1e4fdd1..66c276e 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -216,10 +216,11 @@ is executed without being compiled first."
(let* ((fun (car form))
(obsolete (get fun 'byte-obsolete-info)))
(macroexp-warn-and-return
- (macroexp--obsolete-warning
- fun obsolete
- (if (symbolp (symbol-function fun))
- "alias" "macro"))
+ (and (byte-compile-warning-enabled-p 'obsolete fun)
+ (macroexp--obsolete-warning
+ fun obsolete
+ (if (symbolp (symbol-function fun))
+ "alias" "macro")))
new-form 'obsolete))
new-form)))
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index af53e9b..cdce950 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -17349,7 +17349,9 @@ inlined into the compiled format versions. This means
that if you
change its definition, you should explicitly call
`ibuffer-recompile-formats'.
-\(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil 'macro)
+\(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil t)
+
+(function-put 'define-ibuffer-column 'lisp-indent-function 'defun)
(autoload 'define-ibuffer-sorter "ibuf-macs" "\
Define a method of sorting named NAME.
@@ -17361,7 +17363,11 @@ For sorting, the forms in BODY will be evaluated with
`a' bound to one
buffer object, and `b' bound to another. BODY should return a non-nil
value if and only if `a' is \"less than\" `b'.
-\(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil 'macro)
+\(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil t)
+
+(function-put 'define-ibuffer-sorter 'lisp-indent-function '1)
+
+(function-put 'define-ibuffer-sorter 'doc-string-elt '2)
(autoload 'define-ibuffer-op "ibuf-macs" "\
Generate a function which operates on a buffer.
@@ -17401,7 +17407,11 @@ BODY define the operation; they are forms to evaluate
per each
marked buffer. BODY is evaluated with `buf' bound to the
buffer object.
-\(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS
OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil 'macro)
+\(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS
OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil t)
+
+(function-put 'define-ibuffer-op 'lisp-indent-function '2)
+
+(function-put 'define-ibuffer-op 'doc-string-elt '3)
(autoload 'define-ibuffer-filter "ibuf-macs" "\
Define a filter named NAME.
@@ -17417,7 +17427,11 @@ not a particular buffer should be displayed or not.
The forms in BODY
will be evaluated with BUF bound to the buffer object, and QUALIFIER
bound to the current value of the filter.
-\(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil 'macro)
+\(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil t)
+
+(function-put 'define-ibuffer-filter 'lisp-indent-function '2)
+
+(function-put 'define-ibuffer-filter 'doc-string-elt '2)
(register-definition-prefixes "ibuf-macs" '("ibuffer-"))
@@ -25861,6 +25875,14 @@ they are not by default assigned to keys." t nil)
;;;***
+;;;### (autoloads nil "pixel-fill" "textmodes/pixel-fill.el" (0 0
+;;;;;; 0 0))
+;;; Generated autoloads from textmodes/pixel-fill.el
+
+(register-definition-prefixes "pixel-fill" '("pixel-fill-"))
+
+;;;***
+
;;;### (autoloads nil "pixel-scroll" "pixel-scroll.el" (0 0 0 0))
;;; Generated autoloads from pixel-scroll.el
@@ -39679,59 +39701,57 @@ Zone out, completely." t nil)
;;;***
;;;### (autoloads nil nil ("abbrev.el" "bindings.el" "buff-menu.el"
-;;;;;; "button.el" "calc/calc-aent.el" "calc/calc-embed.el"
"calc/calc-loaddefs.el"
-;;;;;; "calc/calc-misc.el" "calc/calc-yank.el" "calendar/cal-loaddefs.el"
-;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "case-table.el"
-;;;;;; "cedet/ede/cpp-root.el" "cedet/ede/custom.el" "cedet/ede/dired.el"
-;;;;;; "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el"
-;;;;;; "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el"
-;;;;;; "cedet/ede/make.el" "cedet/ede/speedbar.el" "cedet/ede/system.el"
-;;;;;; "cedet/ede/util.el" "cedet/semantic/analyze.el"
"cedet/semantic/analyze/complete.el"
-;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el"
-;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el"
-;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
-;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el"
-;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el"
-;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el"
"cedet/semantic/db-file.el"
-;;;;;; "cedet/semantic/db-find.el" "cedet/semantic/db-global.el"
-;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-typecache.el"
-;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el"
"cedet/semantic/decorate/include.el"
-;;;;;; "cedet/semantic/decorate/mode.el" "cedet/semantic/dep.el"
-;;;;;; "cedet/semantic/doc.el" "cedet/semantic/edit.el"
"cedet/semantic/find.el"
-;;;;;; "cedet/semantic/format.el" "cedet/semantic/grammar-wy.el"
+;;;;;; "button.el" "calc/calc-aent.el" "calc/calc-embed.el"
"calc/calc-misc.el"
+;;;;;; "calc/calc-yank.el" "calendar/cal-loaddefs.el"
"calendar/diary-loaddefs.el"
+;;;;;; "calendar/hol-loaddefs.el" "case-table.el" "cedet/ede/base.el"
+;;;;;; "cedet/ede/config.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el"
+;;;;;; "cedet/ede/dired.el" "cedet/ede/emacs.el" "cedet/ede/files.el"
+;;;;;; "cedet/ede/generic.el" "cedet/ede/linux.el" "cedet/ede/locate.el"
+;;;;;; "cedet/ede/make.el" "cedet/ede/shell.el" "cedet/ede/speedbar.el"
+;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el"
+;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/refs.el"
+;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el"
+;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/el.el"
+;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el"
+;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el"
+;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/complete.el"
+;;;;;; "cedet/semantic/ctxt.el" "cedet/semantic/db-file.el"
"cedet/semantic/db-find.el"
+;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-mode.el"
+;;;;;; "cedet/semantic/db-typecache.el" "cedet/semantic/db.el"
"cedet/semantic/debug.el"
+;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el"
+;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el"
"cedet/semantic/edit.el"
+;;;;;; "cedet/semantic/find.el" "cedet/semantic/format.el"
"cedet/semantic/grammar-wy.el"
;;;;;; "cedet/semantic/grm-wy-boot.el" "cedet/semantic/html.el"
;;;;;; "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el"
"cedet/semantic/idle.el"
;;;;;; "cedet/semantic/imenu.el" "cedet/semantic/lex-spp.el"
"cedet/semantic/lex.el"
-;;;;;; "cedet/semantic/loaddefs.el" "cedet/semantic/mru-bookmark.el"
-;;;;;; "cedet/semantic/scope.el" "cedet/semantic/senator.el"
"cedet/semantic/sort.el"
-;;;;;; "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
-;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el"
-;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el"
-;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el"
"cedet/semantic/tag-write.el"
+;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/scope.el"
+;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el"
"cedet/semantic/symref.el"
+;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/global.el"
+;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
+;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
+;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el"
"cedet/semantic/util-modes.el"
;;;;;; "cedet/semantic/wisent/java-tags.el"
"cedet/semantic/wisent/javascript.el"
;;;;;; "cedet/semantic/wisent/javat-wy.el" "cedet/semantic/wisent/js-wy.el"
;;;;;; "cedet/semantic/wisent/python-wy.el" "cedet/semantic/wisent/python.el"
;;;;;; "cedet/srecode/compile.el" "cedet/srecode/cpp.el"
"cedet/srecode/document.el"
;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el"
"cedet/srecode/getset.el"
-;;;;;; "cedet/srecode/insert.el" "cedet/srecode/java.el"
"cedet/srecode/loaddefs.el"
-;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el"
"cedet/srecode/srt-wy.el"
-;;;;;; "cedet/srecode/srt.el" "cedet/srecode/template.el"
"cedet/srecode/texi.el"
-;;;;;; "composite.el" "cus-face.el" "cus-load.el" "cus-start.el"
-;;;;;; "custom.el" "dired-aux.el" "dired-loaddefs.el" "dired-x.el"
+;;;;;; "cedet/srecode/insert.el" "cedet/srecode/java.el"
"cedet/srecode/map.el"
+;;;;;; "cedet/srecode/mode.el" "cedet/srecode/srt-wy.el"
"cedet/srecode/srt.el"
+;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "composite.el"
+;;;;;; "cus-face.el" "cus-start.el" "custom.el" "dired-aux.el" "dired-x.el"
;;;;;; "electric.el" "emacs-lisp/backquote.el" "emacs-lisp/byte-run.el"
-;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el"
"emacs-lisp/cl-macs.el"
-;;;;;; "emacs-lisp/cl-preloaded.el" "emacs-lisp/cl-seq.el"
"emacs-lisp/easymenu.el"
-;;;;;; "emacs-lisp/eieio-compat.el" "emacs-lisp/eieio-custom.el"
-;;;;;; "emacs-lisp/eieio-loaddefs.el" "emacs-lisp/eieio-opt.el"
-;;;;;; "emacs-lisp/float-sup.el" "emacs-lisp/lisp-mode.el"
"emacs-lisp/lisp.el"
-;;;;;; "emacs-lisp/macroexp.el" "emacs-lisp/map-ynp.el"
"emacs-lisp/nadvice.el"
-;;;;;; "emacs-lisp/shorthands.el" "emacs-lisp/syntax.el" "emacs-lisp/timer.el"
-;;;;;; "env.el" "epa-hook.el" "erc/erc-autoaway.el" "erc/erc-button.el"
-;;;;;; "erc/erc-capab.el" "erc/erc-compat.el" "erc/erc-dcc.el"
"erc/erc-desktop-notifications.el"
+;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el"
"emacs-lisp/cl-preloaded.el"
+;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/easymenu.el"
"emacs-lisp/eieio-compat.el"
+;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-opt.el"
"emacs-lisp/float-sup.el"
+;;;;;; "emacs-lisp/lisp-mode.el" "emacs-lisp/lisp.el" "emacs-lisp/macroexp.el"
+;;;;;; "emacs-lisp/map-ynp.el" "emacs-lisp/nadvice.el"
"emacs-lisp/shorthands.el"
+;;;;;; "emacs-lisp/syntax.el" "emacs-lisp/timer.el" "env.el" "epa-hook.el"
+;;;;;; "erc/erc-autoaway.el" "erc/erc-button.el" "erc/erc-capab.el"
+;;;;;; "erc/erc-compat.el" "erc/erc-dcc.el" "erc/erc-desktop-notifications.el"
;;;;;; "erc/erc-ezbounce.el" "erc/erc-fill.el" "erc/erc-identd.el"
-;;;;;; "erc/erc-imenu.el" "erc/erc-join.el" "erc/erc-list.el"
"erc/erc-loaddefs.el"
-;;;;;; "erc/erc-log.el" "erc/erc-match.el" "erc/erc-menu.el"
"erc/erc-netsplit.el"
+;;;;;; "erc/erc-imenu.el" "erc/erc-join.el" "erc/erc-list.el" "erc/erc-log.el"
+;;;;;; "erc/erc-match.el" "erc/erc-menu.el" "erc/erc-netsplit.el"
;;;;;; "erc/erc-notify.el" "erc/erc-page.el" "erc/erc-pcomplete.el"
;;;;;; "erc/erc-replace.el" "erc/erc-ring.el" "erc/erc-services.el"
;;;;;; "erc/erc-sound.el" "erc/erc-speedbar.el" "erc/erc-spelling.el"
@@ -39742,52 +39762,40 @@ Zone out, completely." t nil)
;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el"
;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el"
;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
-;;;;;; "eshell/em-xtra.el" "eshell/esh-groups.el" "faces.el" "files.el"
-;;;;;; "finder-inf.el" "font-core.el" "font-lock.el" "format.el"
-;;;;;; "frame.el" "help.el" "hfy-cmap.el" "htmlfontify-loaddefs.el"
-;;;;;; "ibuf-ext.el" "ibuffer-loaddefs.el" "indent.el"
"international/characters.el"
-;;;;;; "international/charprop.el" "international/charscript.el"
-;;;;;; "international/cp51932.el" "international/emoji-labels.el"
-;;;;;; "international/emoji-zwj.el" "international/eucjp-ms.el"
+;;;;;; "eshell/em-xtra.el" "faces.el" "files.el" "font-core.el"
+;;;;;; "font-lock.el" "format.el" "frame.el" "help.el" "hfy-cmap.el"
+;;;;;; "ibuf-ext.el" "indent.el" "international/characters.el"
"international/charscript.el"
+;;;;;; "international/cp51932.el" "international/emoji-zwj.el"
"international/eucjp-ms.el"
;;;;;; "international/iso-transl.el" "international/mule-cmds.el"
-;;;;;; "international/mule-conf.el" "international/mule.el"
"international/uni-bidi.el"
-;;;;;; "international/uni-brackets.el" "international/uni-category.el"
-;;;;;; "international/uni-combining.el" "international/uni-comment.el"
-;;;;;; "international/uni-decimal.el" "international/uni-decomposition.el"
-;;;;;; "international/uni-digit.el" "international/uni-lowercase.el"
-;;;;;; "international/uni-mirrored.el" "international/uni-name.el"
-;;;;;; "international/uni-numeric.el" "international/uni-old-name.el"
-;;;;;; "international/uni-special-lowercase.el"
"international/uni-special-titlecase.el"
-;;;;;; "international/uni-special-uppercase.el"
"international/uni-titlecase.el"
-;;;;;; "international/uni-uppercase.el" "isearch.el" "jit-lock.el"
-;;;;;; "jka-cmpr-hook.el" "keymap.el" "language/burmese.el" "language/cham.el"
-;;;;;; "language/chinese.el" "language/cyrillic.el" "language/czech.el"
-;;;;;; "language/english.el" "language/ethiopic.el" "language/european.el"
-;;;;;; "language/georgian.el" "language/greek.el" "language/hebrew.el"
-;;;;;; "language/indian.el" "language/japanese.el" "language/khmer.el"
-;;;;;; "language/korean.el" "language/lao.el" "language/misc-lang.el"
-;;;;;; "language/romanian.el" "language/sinhala.el" "language/slovak.el"
-;;;;;; "language/tai-viet.el" "language/thai.el" "language/tibetan.el"
-;;;;;; "language/utf-8-lang.el" "language/vietnamese.el" "ldefs-boot.el"
-;;;;;; "leim/ja-dic/ja-dic.el" "leim/leim-list.el" "leim/quail/4Corner.el"
-;;;;;; "leim/quail/ARRAY30.el" "leim/quail/CCDOSPY.el"
"leim/quail/CTLau-b5.el"
-;;;;;; "leim/quail/CTLau.el" "leim/quail/ECDICT.el" "leim/quail/ETZY.el"
-;;;;;; "leim/quail/PY-b5.el" "leim/quail/PY.el" "leim/quail/Punct-b5.el"
-;;;;;; "leim/quail/Punct.el" "leim/quail/QJ-b5.el" "leim/quail/QJ.el"
-;;;;;; "leim/quail/SW.el" "leim/quail/TONEPY.el" "leim/quail/ZIRANMA.el"
-;;;;;; "leim/quail/ZOZY.el" "leim/quail/arabic.el" "leim/quail/cham.el"
-;;;;;; "leim/quail/compose.el" "leim/quail/croatian.el"
"leim/quail/cyril-jis.el"
-;;;;;; "leim/quail/cyrillic.el" "leim/quail/czech.el" "leim/quail/georgian.el"
-;;;;;; "leim/quail/greek.el" "leim/quail/hanja-jis.el" "leim/quail/hanja.el"
-;;;;;; "leim/quail/hanja3.el" "leim/quail/hebrew.el" "leim/quail/ipa-praat.el"
-;;;;;; "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el"
"leim/quail/latin-post.el"
-;;;;;; "leim/quail/latin-pre.el" "leim/quail/persian.el"
"leim/quail/programmer-dvorak.el"
-;;;;;; "leim/quail/py-punct.el" "leim/quail/pypunct-b5.el"
"leim/quail/quick-b5.el"
-;;;;;; "leim/quail/quick-cns.el" "leim/quail/rfc1345.el" "leim/quail/sami.el"
-;;;;;; "leim/quail/sgml-input.el" "leim/quail/slovak.el"
"leim/quail/symbol-ksc.el"
-;;;;;; "leim/quail/tamil-dvorak.el" "leim/quail/tsang-b5.el"
"leim/quail/tsang-cns.el"
-;;;;;; "leim/quail/vntelex.el" "leim/quail/vnvni.el" "leim/quail/welsh.el"
-;;;;;; "loadup.el" "mail/blessmail.el" "mail/rmail-loaddefs.el"
+;;;;;; "international/mule-conf.el" "international/mule.el" "isearch.el"
+;;;;;; "jit-lock.el" "jka-cmpr-hook.el" "keymap.el" "language/burmese.el"
+;;;;;; "language/cham.el" "language/chinese.el" "language/cyrillic.el"
+;;;;;; "language/czech.el" "language/english.el" "language/ethiopic.el"
+;;;;;; "language/european.el" "language/georgian.el" "language/greek.el"
+;;;;;; "language/hebrew.el" "language/indian.el" "language/japanese.el"
+;;;;;; "language/khmer.el" "language/korean.el" "language/lao.el"
+;;;;;; "language/misc-lang.el" "language/romanian.el" "language/sinhala.el"
+;;;;;; "language/slovak.el" "language/tai-viet.el" "language/thai.el"
+;;;;;; "language/tibetan.el" "language/utf-8-lang.el" "language/vietnamese.el"
+;;;;;; "ldefs-boot.el" "leim/ja-dic/ja-dic.el" "leim/leim-list.el"
+;;;;;; "leim/quail/4Corner.el" "leim/quail/ARRAY30.el" "leim/quail/CCDOSPY.el"
+;;;;;; "leim/quail/CTLau-b5.el" "leim/quail/CTLau.el" "leim/quail/ECDICT.el"
+;;;;;; "leim/quail/ETZY.el" "leim/quail/PY-b5.el" "leim/quail/PY.el"
+;;;;;; "leim/quail/Punct-b5.el" "leim/quail/Punct.el" "leim/quail/QJ-b5.el"
+;;;;;; "leim/quail/QJ.el" "leim/quail/SW.el" "leim/quail/TONEPY.el"
+;;;;;; "leim/quail/ZIRANMA.el" "leim/quail/ZOZY.el" "leim/quail/arabic.el"
+;;;;;; "leim/quail/cham.el" "leim/quail/compose.el" "leim/quail/croatian.el"
+;;;;;; "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el"
"leim/quail/czech.el"
+;;;;;; "leim/quail/georgian.el" "leim/quail/greek.el"
"leim/quail/hanja-jis.el"
+;;;;;; "leim/quail/hanja.el" "leim/quail/hanja3.el" "leim/quail/hebrew.el"
+;;;;;; "leim/quail/ipa-praat.el" "leim/quail/latin-alt.el"
"leim/quail/latin-ltx.el"
+;;;;;; "leim/quail/latin-post.el" "leim/quail/latin-pre.el"
"leim/quail/persian.el"
+;;;;;; "leim/quail/programmer-dvorak.el" "leim/quail/py-punct.el"
+;;;;;; "leim/quail/pypunct-b5.el" "leim/quail/quick-b5.el"
"leim/quail/quick-cns.el"
+;;;;;; "leim/quail/rfc1345.el" "leim/quail/sami.el" "leim/quail/sgml-input.el"
+;;;;;; "leim/quail/slovak.el" "leim/quail/symbol-ksc.el"
"leim/quail/tamil-dvorak.el"
+;;;;;; "leim/quail/tsang-b5.el" "leim/quail/tsang-cns.el"
"leim/quail/vntelex.el"
+;;;;;; "leim/quail/vnvni.el" "leim/quail/welsh.el" "loadup.el"
"mail/blessmail.el"
;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el"
;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el"
;;;;;; "mail/undigest.el" "menu-bar.el" "mh-e/mh-gnus.el"
"mh-e/mh-loaddefs.el"
@@ -39799,21 +39807,19 @@ Zone out, completely." t nil)
;;;;;; "org/org-duration.el" "org/org-element.el" "org/org-feed.el"
;;;;;; "org/org-footnote.el" "org/org-goto.el" "org/org-id.el"
"org/org-indent.el"
;;;;;; "org/org-install.el" "org/org-keys.el" "org/org-lint.el"
-;;;;;; "org/org-list.el" "org/org-loaddefs.el" "org/org-macs.el"
-;;;;;; "org/org-mobile.el" "org/org-num.el" "org/org-plot.el"
"org/org-refile.el"
-;;;;;; "org/org-table.el" "org/org-timer.el" "org/ox-ascii.el"
"org/ox-beamer.el"
-;;;;;; "org/ox-html.el" "org/ox-icalendar.el" "org/ox-latex.el"
-;;;;;; "org/ox-md.el" "org/ox-odt.el" "org/ox-org.el" "org/ox-publish.el"
-;;;;;; "org/ox-texinfo.el" "org/ox.el" "paren.el" "progmodes/elisp-mode.el"
-;;;;;; "progmodes/prog-mode.el" "ps-mule.el" "ps-print-loaddefs.el"
-;;;;;; "register.el" "replace.el" "rfn-eshadow.el" "select.el" "simple.el"
-;;;;;; "startup.el" "subdirs.el" "subr.el" "tab-bar.el" "textmodes/fill.el"
-;;;;;; "textmodes/makeinfo.el" "textmodes/page.el" "textmodes/paragraphs.el"
-;;;;;; "textmodes/reftex-auc.el" "textmodes/reftex-cite.el"
"textmodes/reftex-dcr.el"
-;;;;;; "textmodes/reftex-global.el" "textmodes/reftex-index.el"
-;;;;;; "textmodes/reftex-loaddefs.el" "textmodes/reftex-parse.el"
-;;;;;; "textmodes/reftex-ref.el" "textmodes/reftex-sel.el"
"textmodes/reftex-toc.el"
-;;;;;; "textmodes/texinfo-loaddefs.el" "textmodes/texnfo-upd.el"
+;;;;;; "org/org-list.el" "org/org-macs.el" "org/org-mobile.el"
"org/org-num.el"
+;;;;;; "org/org-plot.el" "org/org-refile.el" "org/org-table.el"
+;;;;;; "org/org-timer.el" "org/ox-ascii.el" "org/ox-beamer.el"
"org/ox-html.el"
+;;;;;; "org/ox-icalendar.el" "org/ox-latex.el" "org/ox-md.el" "org/ox-odt.el"
+;;;;;; "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" "org/ox.el"
+;;;;;; "paren.el" "progmodes/elisp-mode.el" "progmodes/prog-mode.el"
+;;;;;; "ps-mule.el" "register.el" "replace.el" "rfn-eshadow.el"
+;;;;;; "select.el" "simple.el" "startup.el" "subdirs.el" "subr.el"
+;;;;;; "tab-bar.el" "textmodes/fill.el" "textmodes/makeinfo.el"
+;;;;;; "textmodes/page.el" "textmodes/paragraphs.el" "textmodes/reftex-auc.el"
+;;;;;; "textmodes/reftex-cite.el" "textmodes/reftex-dcr.el"
"textmodes/reftex-global.el"
+;;;;;; "textmodes/reftex-index.el" "textmodes/reftex-parse.el"
"textmodes/reftex-ref.el"
+;;;;;; "textmodes/reftex-sel.el" "textmodes/reftex-toc.el"
"textmodes/texnfo-upd.el"
;;;;;; "textmodes/text-mode.el" "uniquify.el" "vc/ediff-hook.el"
;;;;;; "vc/vc-hooks.el" "version.el" "widget.el" "window.el") (0
;;;;;; 0 0 0))
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 5d38a7e..d4c7aaf 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -312,6 +312,18 @@ and other things:
(or (not (zerop (fringe-columns 'right)))
(not (zerop (fringe-columns 'left))))))
+(defun shr--window-width ()
+ ;; Compute the width based on the window width. We need to
+ ;; adjust the available width for when the user disables
+ ;; the fringes, which will cause the display engine usurp
+ ;; one column for the continuation glyph.
+ (if (not shr-use-fonts)
+ (- (window-body-width) 1
+ (if (shr--have-one-fringe-p)
+ 1
+ 0))
+ (pixel-fill-width)))
+
;;;###autoload
(defun shr-insert-document (dom)
"Render the parsed document DOM into the current buffer.
@@ -333,21 +345,7 @@ DOM should be a parse tree as generated by
(if (not shr-use-fonts)
shr-width
(* shr-width (frame-char-width)))
- ;; Compute the width based on the window width. We need to
- ;; adjust the available width for when the user disables
- ;; the fringes, which will cause the display engine usurp
- ;; one column for the continuation glyph.
- (if (not shr-use-fonts)
- (- (window-body-width) 1
- (if (shr--have-one-fringe-p)
- 1
- 0))
- (- (window-body-width nil t)
- (* 2 (frame-char-width))
- (if (shr--have-one-fringe-p)
- 0
- (* (frame-char-width) 2))
- 1))))
+ (shr--window-width)))
(max-specpdl-size max-specpdl-size)
;; `bidi-display-reordering' is supposed to be only used for
;; debugging purposes, but Shr's naïve filling algorithm
@@ -626,17 +624,7 @@ size, and full-buffer size."
(with-temp-buffer
(let ((shr-indentation 0)
(shr-start nil)
- (shr-internal-width (- (window-body-width nil t)
- (* 2 (frame-char-width))
- ;; Adjust the window width for when
- ;; the user disables the fringes,
- ;; which causes the display engine
- ;; to usurp one column for the
- ;; continuation glyph.
- (if (and (null shr-width)
- (not (shr--have-one-fringe-p)))
- (* (frame-char-width) 2)
- 0))))
+ (shr-internal-width (shr--window-width)))
(shr-insert text)
(shr-fill-lines (point-min) (point-max))
(buffer-string)))))
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 2fd7cac..5ffa8ca 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -423,50 +423,56 @@ the height of the current window."
(defun pixel-scroll-precision-scroll-up (delta)
"Scroll the current window up by DELTA pixels."
- (when-let* ((max-y (- (window-text-height nil t)
- (frame-char-height)
- (window-tab-line-height)
- (window-header-line-height)))
- (posn (posn-at-point))
- (current-y (+ (cdr (posn-x-y posn))
- (line-pixel-height))))
- (while (< (- max-y current-y) delta)
- (vertical-motion -1)
- (setq current-y (- current-y (line-pixel-height)))))
- (let ((current-vscroll (window-vscroll nil t)))
- (if (<= delta current-vscroll)
- (set-window-vscroll nil (- current-vscroll delta) t)
- (setq delta (- delta current-vscroll))
- (set-window-vscroll nil 0 t)
- (while (> delta 0)
- (let ((position (pixel-point-and-height-at-unseen-line)))
- (unless (cdr position)
- (signal 'beginning-of-buffer nil))
- (set-window-start nil (car position) t)
- ;; If the line above is taller than the window height (i.e. there's
- ;; a very tall image), keep point on it.
- (when (> (cdr position) (window-text-height nil t))
- (let ((vs (window-vscroll nil t)))
- (goto-char (car position))
- (set-window-vscroll nil vs t)))
- (setq delta (- delta (cdr position)))))
- (when (< delta 0)
- (when-let* ((desired-pos (posn-at-x-y 0 (+ (- delta)
+ (let* ((edges (window-edges nil t nil t))
+ (max-y (- (nth 3 edges)
+ (nth 1 edges)
+ (window-tab-line-height)
+ (window-header-line-height)))
+ (usable-height max-y))
+ (when-let* ((posn (posn-at-point))
+ (current-y (+ (cdr (posn-x-y posn))
+ (line-pixel-height))))
+ (while (and (<= (- max-y current-y) delta)
+ (<= (cdr (posn-object-width-height posn))
+ usable-height))
+ (vertical-motion -1)
+ (setq current-y (- current-y (line-pixel-height))))
+ (when (and (>= (cdr (posn-object-width-height posn))
+ usable-height)
+ (let ((prev-line-height (save-excursion
+ (vertical-motion -1)
+ (line-pixel-height))))
+ (<= 0 (- (cdr (posn-x-y posn)) prev-line-height))))
+ (vertical-motion -1)))
+ (let ((current-vscroll (window-vscroll nil t)))
+ (if (<= delta current-vscroll)
+ (set-window-vscroll nil (- current-vscroll delta) t)
+ (setq delta (- delta current-vscroll))
+ (set-window-vscroll nil 0 t)
+ (while (> delta 0)
+ (let ((position (pixel-point-and-height-at-unseen-line)))
+ (unless (cdr position)
+ (signal 'beginning-of-buffer nil))
+ (set-window-start nil (car position) t)
+ ;; If the line above is taller than the window height (i.e. there's
+ ;; a very tall image), keep point on it.
+ (when (> (cdr position) usable-height)
+ (goto-char (car position)))
+ (setq delta (- delta (cdr position)))))
+ (when (< delta 0)
+ (if-let* ((desired-pos (posn-at-x-y 0 (+ (- delta)
(window-tab-line-height)
(window-header-line-height))))
(desired-start (posn-point desired-pos))
(desired-vscroll (cdr (posn-object-x-y desired-pos))))
- (let ((object (posn-object desired-pos)))
- (if (or (consp object) (stringp object))
- (set-window-vscroll nil (+ (window-vscroll nil t)
- (- delta))
- t)
- (unless (eq (window-start) desired-start)
- (set-window-start nil desired-start t))
- (set-window-vscroll nil desired-vscroll t))))))))
-
-;; FIXME: This doesn't work when there's an image above the current
-;; line that is taller than the window.
+ (progn
+ (set-window-start nil desired-start t)
+ (set-window-vscroll nil desired-vscroll t))
+ (set-window-vscroll nil (abs delta) t)))))))
+
+;; FIXME: This doesn't _always_ work when there's an image above the
+;; current line that is taller than the window, and scrolling can
+;; sometimes be jumpy in that case.
(defun pixel-scroll-precision (event)
"Scroll the display vertically by pixels according to EVENT.
Move the display up or down by the pixel deltas in EVENT to
diff --git a/lisp/register.el b/lisp/register.el
index e48a09f..38ee87c 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -279,6 +279,8 @@ ARG is the value of the prefix argument or nil."
(goto-char (cadr val)))
((eq (car val) 'file)
(find-file (cdr val)))
+ ((eq (car val) 'buffer)
+ (switch-to-buffer (cdr val)))
((eq (car val) 'file-query)
(or (find-buffer-visiting (nth 1 val))
(y-or-n-p (format "Visit file %s again? " (nth 1 val)))
@@ -417,6 +419,11 @@ Interactively, reads the register using
`register-read-with-preview'."
(prin1 (cdr val))
(princ "."))
+ ((eq (car val) 'buffer)
+ (princ "the buffer ")
+ (prin1 (cdr val))
+ (princ "."))
+
((eq (car val) 'file-query)
(princ "a file-query reference:\n file ")
(prin1 (car (cdr val)))
diff --git a/lisp/startup.el b/lisp/startup.el
index 47804b2..5d2d830 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -519,6 +519,19 @@ DIRS are relative."
xdg-dir)
(t emacs-d-dir))))
+(defvar comp--delayed-sources)
+(defvar comp--loadable)
+(declare-function native--compile-async "comp.el"
+ (files &optional recursively load selector))
+(defun startup--honor-delayed-native-compilations ()
+ "Honor pending delayed deferred native compilations."
+ (when (and (native-comp-available-p)
+ comp--delayed-sources)
+ (require 'comp)
+ (setq comp--loadable t)
+ (native--compile-async comp--delayed-sources nil 'late)
+ (setq comp--delayed-sources nil)))
+
(defvar native-comp-eln-load-path)
(defun normal-top-level ()
"Emacs calls this function when it first starts up.
@@ -785,7 +798,8 @@ It is the default value of the variable `top-level'."
(if (string-match "\\`DISPLAY=" varval)
(setq display varval))))
(when display
- (delete display process-environment)))))
+ (delete display process-environment))))
+ (startup--honor-delayed-native-compilations))
;; Precompute the keyboard equivalents in the menu bar items.
;; Command-line options supported by tty's:
diff --git a/lisp/textmodes/pixel-fill.el b/lisp/textmodes/pixel-fill.el
index eff09df..53aeb0a 100644
--- a/lisp/textmodes/pixel-fill.el
+++ b/lisp/textmodes/pixel-fill.el
@@ -43,13 +43,36 @@ of a line or the end of a line."
:type 'boolean
:version "29.1")
+(defun pixel-fill-width (&optional columns window)
+ "Return the pixel width corresponding to COLUMNS in WINDOW.
+If COLUMNS in nil, use the enture window width.
+
+If WINDOW is nil, this defaults to the current window."
+ (unless window
+ (setq window (selected-window)))
+ (let ((frame (window-frame window)))
+ (if columns
+ (* (frame-char-width frame) columns)
+ (- (window-body-width nil t)
+ (* 2 (frame-char-width frame))
+ ;; We need to adjust the available width for when the user
+ ;; disables the fringes, which will cause the display
+ ;; engine usurp one column for the continuation glyph.
+ (if (and (fboundp 'fringe-columns)
+ (or (not (zerop (fringe-columns 'right)))
+ (not (zerop (fringe-columns 'left)))))
+ 0
+ (* (frame-char-width frame) 2))
+ 1))))
+
(defun pixel-fill-region (start end pixel-width)
"Fill the region between START and END.
This will attempt to reformat the text in the region to have no
lines that are visually wider than PIXEL-WIDTH.
-If START isn't at the start of a line, that pixel position will
-be used as the indentation prefix on subsequent lines."
+If START isn't at the start of a line, the horizontal position of
+START, converted to pixel units, will be used as the indentation
+prefix on subsequent lines."
(save-excursion
(goto-char start)
(let ((indentation
diff --git a/src/comp.c b/src/comp.c
index 5b947fc..486b35f 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4786,10 +4786,6 @@ register_native_comp_unit (Lisp_Object comp_u)
/* Deferred compilation mechanism. */
/***********************************/
-/* List of sources we'll compile and load after having conventionally
- loaded the compiler and its dependencies. */
-static Lisp_Object delayed_sources;
-
/* Queue an asynchronous compilation for the source file defining
FUNCTION_NAME and perform a late load.
@@ -4846,30 +4842,16 @@ maybe_defer_native_compilation (Lisp_Object
function_name,
/* This is so deferred compilation is able to compile comp
dependencies breaking circularity. */
- if (!NILP (Ffeaturep (Qcomp, Qnil)))
+ if (comp__loadable)
{
- /* Comp already loaded. */
- if (!NILP (delayed_sources))
- {
- CALLN (Ffuncall, intern_c_string ("native--compile-async"),
- delayed_sources, Qnil, Qlate);
- delayed_sources = Qnil;
- }
+ /* Startup is done, comp is usable. */
+ Frequire (Qcomp, Qnil, Qnil);
Fputhash (function_name, definition, Vcomp_deferred_pending_h);
CALLN (Ffuncall, intern_c_string ("native--compile-async"),
src, Qnil, Qlate);
}
else
- {
- delayed_sources = Fcons (src, delayed_sources);
- /* Require comp only once. */
- static bool comp_required = false;
- if (!comp_required)
- {
- comp_required = true;
- Frequire (Qcomp, Qnil, Qnil);
- }
- }
+ Vcomp__delayed_sources = Fcons (src, Vcomp__delayed_sources);
}
@@ -5328,6 +5310,13 @@ void
syms_of_comp (void)
{
#ifdef HAVE_NATIVE_COMP
+ DEFVAR_LISP ("comp--delayed-sources", Vcomp__delayed_sources,
+ doc: /* List of sources to be native-compiled when startup is
finished.
+For internal use. */);
+ DEFVAR_BOOL ("comp--loadable",
+ comp__loadable,
+ doc: /* Non-nil when comp.el can be loaded.
+For internal use. */);
/* Compiler control customizes. */
DEFVAR_BOOL ("native-comp-deferred-compilation",
native_comp_deferred_compilation,
@@ -5468,8 +5457,6 @@ compiled one. */);
staticpro (&comp.func_blocks_h);
staticpro (&comp.emitter_dispatcher);
comp.emitter_dispatcher = Qnil;
- staticpro (&delayed_sources);
- delayed_sources = Qnil;
staticpro (&loadsearch_re_list);
loadsearch_re_list = Qnil;
diff --git a/src/nsterm.m b/src/nsterm.m
index f5c2d4d..807309e 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -10044,7 +10044,7 @@ This variable is ignored on macOS < 10.7 and GNUstep.
Default is t. */);
DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line");
DEFVAR_LISP ("ns-scroll-event-delta-factor", Vns_scroll_event_delta_factor,
- doc: /* A delta to apply to pixel deltas reported in scroll
events.
+ doc: /* A factor to apply to pixel deltas reported in scroll
events.
This is only effective for pixel deltas generated from touch pads or
mice with smooth scrolling capability. */);
Vns_scroll_event_delta_factor = make_float (1.0);