[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk 39c466b: Merge remote-tracking branch 'origin/master' into
From: |
Po Lu |
Subject: |
feature/pgtk 39c466b: Merge remote-tracking branch 'origin/master' into feature/pgtk |
Date: |
Fri, 3 Dec 2021 19:40:39 -0500 (EST) |
branch: feature/pgtk
commit 39c466b19587e024964189458c44d079d1fc0588
Merge: f638541 352c737
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Merge remote-tracking branch 'origin/master' into feature/pgtk
---
configure.ac | 1 +
doc/lispref/os.texi | 8 +-
etc/NEWS | 39 +++++---
lisp/Makefile.in | 18 +++-
lisp/calendar/time-date.el | 5 +-
lisp/dired-x.el | 22 +++--
lisp/dired.el | 5 +-
lisp/emacs-lisp/cl-macs.el | 1 +
lisp/emacs-lisp/re-builder.el | 18 ++--
lisp/emacs-lisp/shadow.el | 3 -
lisp/emacs-lisp/timer.el | 12 ++-
lisp/gnus/gnus-search.el | 18 ++--
lisp/image-mode.el | 48 ++++++----
lisp/image.el | 2 +
lisp/international/iso-transl.el | 23 ++++-
lisp/international/mule-cmds.el | 16 ----
lisp/mouse.el | 19 ++--
lisp/net/newst-backend.el | 52 +----------
lisp/net/tramp-sh.el | 20 +++--
lisp/net/tramp-smb.el | 14 +--
lisp/nxml/xsd-regexp.el | 3 -
lisp/obsolete/vc-arch.el | 2 -
src/image.c | 187 +++++++++++++++++++++++----------------
src/lisp.h | 5 ++
src/xdisp.c | 57 ------------
src/xwidget.c | 3 +
test/lisp/dired-x-tests.el | 10 +++
27 files changed, 318 insertions(+), 293 deletions(-)
diff --git a/configure.ac b/configure.ac
index fffac4c..f67829b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5500,6 +5500,7 @@ case $opsys in
#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
|| defined __alpha__ || defined __mips__ || defined __s390__ \
|| defined __arm__ || defined __powerpc__ || defined __amd64__ \
+ || defined __x86_64__ \
|| defined __ia64__ || defined __sh__
/* ok */
#else
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index fb0f25f..e420644 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2183,7 +2183,13 @@ In most cases, @var{repeat} has no effect on when
@emph{first} call
takes place---@var{time} alone specifies that. There is one exception:
if @var{time} is @code{t}, then the timer runs whenever the time is a
multiple of @var{repeat} seconds after the epoch. This is useful for
-functions like @code{display-time}.
+functions like @code{display-time}. For instance, the following will
+make @var{function} run at every ``whole'' minute (e.g.,
+@samp{11:03:00}, @samp{11:04:00}, etc):
+
+@example
+(run-at-time t 60 @var{function})
+@end example
If Emacs didn't get any CPU time when the timer would have run (for
example if the system was busy running another process or if the
diff --git a/etc/NEWS b/etc/NEWS
index 227409d..81fc26b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -73,12 +73,28 @@ be used to reinitialize structures that would normally be
done at load
time.
+* Incompatible changes in Emacs 29.1
+
+---
+** 'C-x 8 .' has been moved to 'C-x 8 . .'.
+This is to open up the 'C-x 8 .' map to bind further characters there.
+
+---
+** The mode line now uses a proportional font by default.
+To get the old monospaced mode line back, customize the
+'mode-line-active' and 'mode-line-inactive' faces not to inherit from
+the 'variable-pitch' face, or add this to your "~/.emacs":
+
+ (set-face-attribute 'mode-line-active nil :inherit 'mode-line)
+ (set-face-attribute 'mode-line-inactive nil :inherit 'mode-line)
+
+
* Changes in Emacs 29.1
---
** 'write-file' will now copy some file mode bits.
If the current buffer is visiting a file that is executable, the
-'C-c C-w' command will now make the new file executable, too.
+'C-x C-w' command will now make the new file executable, too.
+++
** New user option 'process-error-pause-time'.
@@ -97,15 +113,6 @@ mixed.
This inherits from the 'mode-line' face, but is the face actually used
on the mode lines (along with 'mode-line-inactive').
----
-** The mode line now uses a proportional font by default.
-To get the old monospaced mode line back, customize the
-'mode-line-active' and 'mode-line-inactive' faces not to inherit from
-the 'variable-pitch' face, or add this to your "~/.emacs":
-
- (set-face-attribute 'mode-line-active nil :inherit 'mode-line)
- (set-face-attribute 'mode-line-inactive nil :inherit 'mode-line)
-
+++
** New function 'buffer-text-pixel-size'.
This is similar to 'window-text-pixel-size', but can be used when the
@@ -522,6 +529,12 @@ This works like 'image-transform-fit-to-window'.
The new 'fit-window' option will never scale an image more than this
much (in percent). It is nil by default, which means no limit.
+---
+*** New user option 'image-text-based-formats'.
+This controls whether or not to show a message when opening certain
+image formats saying how to edit it as text. The default is to show
+this message for SVG and XPM.
+
** Image-Dired
+++
@@ -757,6 +770,12 @@ Use 'exif-parse-file' and 'exif-field' instead.
** 'insert-directory' alternatives should not change the free disk space line.
This change is now applied in 'dired-insert-directory'.
+** Some functions and variables obsolete since Emacs 23 have been removed:
+'find-emacs-lisp-shadows', 'newsticker--cache-read-version1',
+'newsticker--cache-save-version1', 'newsticker--cache-update',
+'newsticker-cache-filename', 'unify-8859-on-decoding-mode',
+'unify-8859-on-encoding-mode', 'vc-arch-command'.
+
* Lisp Changes in Emacs 29.1
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 4380a3b..353c9e6 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -98,7 +98,7 @@ COMPILE_FIRST += $(lisp)/emacs-lisp/autoload.elc
# Files to compile early in compile-main. Works around bug#25556.
MAIN_FIRST = ./emacs-lisp/eieio.el ./emacs-lisp/eieio-base.el \
- ./cedet/semantic/db.el
+ ./cedet/semantic/db.el ./emacs-lisp/cconv.el
# Prevent any settings in the user environment causing problems.
unexport EMACSDATA EMACSDOC EMACSPATH
@@ -338,10 +338,10 @@ endif
# Compile all the Elisp files that need it. Beware: it approximates
# 'no-byte-compile', so watch out for false-positives!
-compile-main: gen-lisp compile-clean
+compile-main: gen-lisp compile-clean main-first
@(cd $(lisp) && \
els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e
's| |/*.el |g'`; \
- for el in ${MAIN_FIRST} $$els; do \
+ for el in $$els; do \
test -f $$el || continue; \
test ! -f $${el}c && \
GREP_OPTIONS= grep '^;.*[^a-zA-Z]no-byte-compile: *t' $$el >
/dev/null && \
@@ -354,6 +354,18 @@ compile-main: gen-lisp compile-clean
TARGETS="$$chunk"; \
done
+# Compile some important files first.
+main-first:
+ @(cd $(lisp) && \
+ for el in ${MAIN_FIRST}; do \
+ echo "$${el}c"; \
+ done | xargs $(XARGS_LIMIT) echo) | \
+ while read chunk; do \
+ $(MAKE) compile-targets \
+ NATIVE_DISABLED=$(NATIVE_SKIP_NONDUMP) \
+ TARGETS="$$chunk"; \
+ done
+
.PHONY: compile-clean
# Erase left-over .elc files that do not have a corresponding .el file.
compile-clean:
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 6407138..8a6ee0f 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -158,7 +158,10 @@ If DATE lacks timezone information, GMT is assumed."
(encode-time
(decoded-time-set-defaults
(condition-case err
- (parse-time-string date)
+ (let ((time (parse-time-string date)))
+ (prog1 time
+ ;; Cause an error if data `parse-time-string' returns is invalid.
+ (setq time (encode-time time))))
(error
(let ((overflow-error '(error "Specified time is not representable")))
(if (or (equal err overflow-error)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 855e58e..38d8a95 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1265,13 +1265,21 @@ sure that a trailing letter in STR is one of
BKkMGTPEZY."
(let* ((val (string-to-number str))
(u (unless (zerop val)
(aref str (1- (length str))))))
- (when (and u (> u ?9))
- (when (= u ?k)
- (setq u ?K))
- (let ((units '(?B ?K ?M ?G ?T ?P ?E ?Z ?Y)))
- (while (and units (/= (pop units) u))
- (setq val (* 1024.0 val)))))
- val))
+ ;; If we don't have a unit at the end, but we have some
+ ;; non-numeric strings in the string, then the string may be
+ ;; something like "4.134" or "4,134" meant to represent 4134
+ ;; (seen in some locales).
+ (if (and u
+ (<= ?0 u ?9)
+ (string-match-p "[^0-9]" str))
+ (string-to-number (replace-regexp-in-string "[^0-9]+" "" str))
+ (when (and u (> u ?9))
+ (when (= u ?k)
+ (setq u ?K))
+ (let ((units '(?B ?K ?M ?G ?T ?P ?E ?Z ?Y)))
+ (while (and units (/= (pop units) u))
+ (setq val (* 1024.0 val)))))
+ val)))
(defun dired-mark-sexp (predicate &optional unflag-p)
"Mark files for which PREDICATE returns non-nil.
diff --git a/lisp/dired.el b/lisp/dired.el
index d03c79d..d0e547b 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1650,7 +1650,7 @@ see `dired-use-ls-dired' for more details.")
;; Replace "total" with "total used in directory" to
;; avoid confusion.
(replace-match "total used in directory" nil nil nil 1))
- (when-let ((available (get-free-disk-space file)))
+ (if-let ((available (get-free-disk-space file)))
(cond
((eq dired-free-space 'separate)
(end-of-line)
@@ -1672,7 +1672,8 @@ see `dired-use-ls-dired' for more details.")
(forward-line 1)
(point))
(t
- beg))))))
+ beg))
+ beg))))
(defun dired-insert-set-properties (beg end)
"Add various text properties to the lines in the region, from BEG to END."
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 9c9a778..f78fdcf 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3365,6 +3365,7 @@ Of course, we really can't know that for sure, so it's
just a heuristic."
(integer . integerp)
(keyword . keywordp)
(list . listp)
+ (natnum . natnump)
(number . numberp)
(null . null)
(real . numberp)
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 5516b2a..9be6ac6 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -274,8 +274,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
emacs-lisp-mode "RE Builder Lisp"
"Major mode for interactively building symbolic Regular Expressions."
;; Pull in packages as needed
- (cond ((memq reb-re-syntax '(sregex rx)) ; rx-to-string is autoloaded
- (require 'rx))) ; require rx anyway
+ (when (eq reb-re-syntax 'rx) ; rx-to-string is autoloaded
+ (require 'rx)) ; require rx anyway
(reb-mode-common))
(defvar reb-subexp-mode-map
@@ -307,8 +307,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
(eq 'color (frame-parameter nil 'display-type)))
(defsubst reb-lisp-syntax-p ()
- "Return non-nil if RE Builder uses a Lisp syntax."
- (memq reb-re-syntax '(sregex rx)))
+ "Return non-nil if RE Builder uses `rx' syntax."
+ (eq reb-re-syntax 'rx))
(defmacro reb-target-binding (symbol)
"Return binding for SYMBOL in the RE Builder target buffer."
@@ -483,11 +483,11 @@ Optional argument SYNTAX must be specified if called
non-interactively."
(list (intern
(completing-read
(format-prompt "Select syntax" reb-re-syntax)
- '(read string sregex rx)
+ '(read string rx)
nil t nil nil (symbol-name reb-re-syntax)
'reb-change-syntax-hist))))
- (if (memq syntax '(read string sregex rx))
+ (if (memq syntax '(read string rx))
(let ((buffer (get-buffer reb-buffer)))
(setq reb-re-syntax syntax)
(when buffer
@@ -606,9 +606,9 @@ optional fourth argument FORCE is non-nil."
(defun reb-cook-regexp (re)
"Return RE after processing it according to `reb-re-syntax'."
- (cond ((memq reb-re-syntax '(sregex rx))
- (rx-to-string (eval (car (read-from-string re)))))
- (t re)))
+ (if (eq reb-re-syntax 'rx)
+ (rx-to-string (eval (car (read-from-string re))))
+ re))
(defun reb-update-regexp ()
"Update the regexp for the target buffer.
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index e2a24e9..1fbe946 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -151,9 +151,6 @@ See the documentation for `list-load-path-shadows' for
further information."
;; Return the list of shadowings.
shadows))
-(define-obsolete-function-alias 'find-emacs-lisp-shadows
- 'load-path-shadows-find "23.3")
-
;; Return true if neither file exists, or if both exist and have identical
;; contents.
(defun load-path-shadows-same-file-or-nonexistent (f1 f2)
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 1ef4931..2ac2c99 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -351,19 +351,27 @@ This function is called, by name, directly by the C code."
Repeat the action every REPEAT seconds, if REPEAT is non-nil.
REPEAT may be an integer or floating point number.
TIME should be one of:
+
- a string giving today's time like \"11:23pm\"
(the acceptable formats are HHMM, H:MM, HH:MM, HHam, HHAM,
HHpm, HHPM, HH:MMam, HH:MMAM, HH:MMpm, or HH:MMPM;
a period `.' can be used instead of a colon `:' to separate
the hour and minute parts);
+
- a string giving a relative time like \"90\" or \"2 hours 35 minutes\"
(the acceptable forms are a number of seconds without units
or some combination of values using units in `timer-duration-words');
+
- nil, meaning now;
+
- a number of seconds from now;
+
- a value from `encode-time';
-- or t (with non-nil REPEAT) meaning the next integral
- multiple of REPEAT.
+
+- or t (with non-nil REPEAT) meaning the next integral multiple
+ of REPEAT. This is handy when you want the function to run at
+ a certain \"round\" number. For instance, (run-at-time t 60 ...)
+ will run at 11:04:00, 11:05:00, etc.
The action is to call FUNCTION with arguments ARGS.
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 3157358..bce5d57 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1018,7 +1018,7 @@ Responsible for handling and, or, and parenthetical
expressions.")
(single-search (gnus-search-single-p query))
(grouplist (or groups (gnus-search-get-active srv)))
q-string artlist group)
- (message "Opening server %s" server)
+ (gnus-message 7 "Opening server %s" server)
(gnus-open-server srv)
;; We should only be doing this once, in
;; `nnimap-open-connection', but it's too frustrating to try to
@@ -1062,7 +1062,7 @@ Responsible for handling and, or, and parenthetical
expressions.")
(when (nnimap-change-group
(gnus-group-short-name group) server)
(with-current-buffer (nnimap-buffer)
- (message "Searching %s..." group)
+ (gnus-message 7 "Searching %s..." group)
(let ((result
(gnus-search-imap-search-command engine q-string)))
(when (car result)
@@ -1075,7 +1075,7 @@ Responsible for handling and, or, and parenthetical
expressions.")
(vector group artn 100))))
(cdr (assoc "SEARCH" (cdr result))))
artlist))))
- (message "Searching %s...done" group))))
+ (gnus-message 7 "Searching %s...done" group))))
(nreverse artlist))))
(cl-defmethod gnus-search-imap-search-command ((engine gnus-search-imap)
@@ -1330,8 +1330,8 @@ Returns a list of [group article score] vectors."
(erase-buffer)
(if groups
- (message "Doing %s query on %s..." program groups)
- (message "Doing %s query..." program))
+ (gnus-message 7 "Doing %s query on %s..." program groups)
+ (gnus-message 7 "Doing %s query..." program))
(setq proc (apply #'start-process (format "search-%s" server)
buffer program cp-list))
(while (process-live-p proc)
@@ -1837,8 +1837,8 @@ Assume \"size\" key is equal to \"larger\"."
(mapcar (lambda (x)
(let ((group x)
artlist)
- (message "Searching %s using find-grep..."
- (or group server))
+ (gnus-message 7 "Searching %s using find-grep..."
+ (or group server))
(save-window-excursion
(set-buffer buffer)
(if (> gnus-verbose 6)
@@ -1893,8 +1893,8 @@ Assume \"size\" key is equal to \"larger\"."
(vector (gnus-group-full-name group server) art 0)
artlist))
(forward-line 1)))
- (message "Searching %s using find-grep...done"
- (or group server))
+ (gnus-message 7 "Searching %s using find-grep...done"
+ (or group server))
artlist)))
grouplist))))
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 624c852..c2b145d 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -457,6 +457,15 @@ call."
;;; Image Mode setup
+(defcustom image-text-based-formats '(svg xpm)
+ "List of image formats that use a plain text format.
+For such formats, display a message that explains how to edit the
+image as text, when opening such images in `image-mode'."
+ :type '(choice (const :tag "Disable completely" nil)
+ (repeat :tag "List of formats" sexp))
+ :version "29.1"
+ :group 'image)
+
(defvar-local image-type nil
"The image type for the current Image mode buffer.")
@@ -621,8 +630,9 @@ call."
;;;###autoload
(defun image-mode ()
"Major mode for image files.
-You can use \\<image-mode-map>\\[image-toggle-display] or
\\<image-mode-map>\\[image-toggle-hex-display]
-to toggle between display as an image and display as text or hex.
+You can use \\<image-mode-map>\\[image-toggle-display] or \
+\\[image-toggle-hex-display] to toggle between display
+as an image and display as text or hex.
Key bindings:
\\{image-mode-map}"
@@ -694,12 +704,10 @@ Key bindings:
(run-mode-hooks 'image-mode-hook)
(let ((image (image-get-display-property))
- (msg1 (substitute-command-keys
- "Type \\[image-toggle-display] or \\[image-toggle-hex-display]
to view the image as "))
- animated)
+ msg animated)
(cond
((null image)
- (message "%s" (concat msg1 "an image.")))
+ (setq msg "an image"))
((setq animated (image-multi-frame-p image))
(setq image-multi-frame t
mode-line-process
@@ -717,10 +725,13 @@ Key bindings:
keymap
(down-mouse-1 . image-next-frame)
(down-mouse-3 . image-previous-frame)))))))
- (message "%s"
- (concat msg1 "text. This image has multiple frames.")))
+ (setq msg "text. This image has multiple frames"))
(t
- (message "%s" (concat msg1 "text or hex."))))))
+ (setq msg "text")))
+ (when (memq (plist-get (cdr image) :type) image-text-based-formats)
+ (message (substitute-command-keys
+ "Type \\[image-toggle-display] to view the image as %s")
+ msg))))
;;;###autoload
(define-minor-mode image-minor-mode
@@ -767,11 +778,11 @@ on these modes."
(image-mode-to-text)
;; Turn on hexl-mode
(hexl-mode)
- (message "%s" (concat
- (substitute-command-keys
- "Type \\[image-toggle-hex-display] or
\\[image-toggle-display] to view the image as ")
- (if (image-get-display-property)
- "hex" "an image or text") ".")))
+ (message (substitute-command-keys
+ "Type \\[image-toggle-hex-display] or \
+\\[image-toggle-display] to view the image as %s")
+ (if (image-get-display-property)
+ "hex" "an image or text")))
(defun image-mode-as-text ()
"Set a non-image mode as major mode in combination with image minor mode.
@@ -787,11 +798,10 @@ See commands `image-mode' and `image-minor-mode' for more
information
on these modes."
(interactive)
(image-mode-to-text)
- (message "%s" (concat
- (substitute-command-keys
- "Type \\[image-toggle-display] or
\\[image-toggle-hex-display] to view the image as ")
- (if (image-get-display-property)
- "text" "an image or hex") ".")))
+ (message (substitute-command-keys
+ "Type \\[image-toggle-display] to view the image as %s")
+ (if (image-get-display-property)
+ "text" "an image")))
(defun image-toggle-display-text ()
"Show the image file as text.
diff --git a/lisp/image.el b/lisp/image.el
index edbf6c5..87fab80 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -27,6 +27,8 @@
(defgroup image ()
"Image support."
+ :prefix "image-"
+ :link '(info-link "(emacs) Image Mode")
:group 'multimedia)
(declare-function image-flush "image.c" (spec &optional frame))
diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el
index 2c7da2b..aea1217 100644
--- a/lisp/international/iso-transl.el
+++ b/lisp/international/iso-transl.el
@@ -86,33 +86,46 @@
("\"y" . [?ÿ])
("''" . [?´])
("'A" . [?Á])
+ ("'C" . [?Ć])
("'E" . [?É])
("'I" . [?Í])
+ ("'N" . [?Ń])
("'O" . [?Ó])
+ ("'S" . [?Ś])
("'U" . [?Ú])
("'Y" . [?Ý])
+ ("'Z" . [?Ź])
("'a" . [?á])
+ ("'c" . [?ć])
("'e" . [?é])
("'i" . [?í])
+ ("'n" . [?ń])
("'o" . [?ó])
+ ("'s" . [?ś])
("'u" . [?ú])
("'y" . [?ý])
+ ("'z" . [?ź])
("*$" . [?¤])
("$" . [?¤])
("*+" . [?±])
("+" . [?±])
(",," . [?¸])
+ (",A" . [?Ą])
(",C" . [?Ç])
+ (",a" . [?ą])
(",c" . [?ç])
("*-" . [?])
("-" . [?])
("*." . [?·])
- ("." . [?·])
+ (".." . [?·])
+ (".z" . [?ż])
("//" . [?÷])
("/A" . [?Å])
+ ("/L" . [?Ł])
("/E" . [?Æ])
("/O" . [?Ø])
("/a" . [?å])
+ ("/l" . [?ł])
("/e" . [?æ])
("/o" . [?ø])
("1/2" . [?½])
@@ -294,6 +307,14 @@ sequence VECTOR. (VECTOR is normally one character
long.)")
(setq alist (cdr alist))))
(defun iso-transl-set-language (lang)
+ "Set shorter key bindings for some characters relevant for LANG.
+This affects the `C-x 8' prefix.
+
+Note that only a few languages are supported, and for more
+rigorous support it is recommended to use an input method
+instead. Also note that many of these characters can be input
+with the regular `C-x 8' map without having to specify a language
+here."
(interactive (list (let ((completion-ignore-case t))
(completing-read "Set which language? "
iso-transl-language-alist nil t))))
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 7268931..7f9b14b 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -3077,22 +3077,6 @@ on encoding."
0))
(substring enc2 i0 i2)))))
-;; Backwards compatibility. These might be better with :init-value t,
-;; but that breaks loadup.
-(define-minor-mode unify-8859-on-encoding-mode
- "Exists only for backwards compatibility."
- :group 'mule
- :global t)
-;; Doc said "obsolete" in 23.1, this statement only added in 24.1.
-(make-obsolete 'unify-8859-on-encoding-mode "don't use it." "23.1")
-
-(define-minor-mode unify-8859-on-decoding-mode
- "Exists only for backwards compatibility."
- :group 'mule
- :global t)
-;; Doc said "obsolete" in 23.1, this statement only added in 24.1.
-(make-obsolete 'unify-8859-on-decoding-mode "don't use it." "23.1")
-
(defvar ucs-names nil
"Hash table of cached CHAR-NAME keys to CHAR-CODE values.")
diff --git a/lisp/mouse.el b/lisp/mouse.el
index ec43aec..b5ca80a 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -327,12 +327,21 @@ the function `context-menu-filter-function'."
(setq menu (funcall fun menu click))
nil)))
- ;; Remove duplicate separators
- (let ((l menu))
- (while (consp l)
- (if (and (equal (cdr-safe (car l)) menu-bar-separator)
- (equal (cdr-safe (cadr l)) menu-bar-separator))
+ ;; Remove duplicate separators as well as ones at the beginning or
+ ;; end of the menu.
+ (let ((l menu) saw-first-item)
+ (while (consp (cdr l))
+ ;; If the next item is a separator, remove it if 1) we haven't
+ ;; seen any other items yet, or 2) it's followed by either
+ ;; another separator or the end of the list.
+ (if (and (equal (cdr-safe (cadr l)) menu-bar-separator)
+ (or (not saw-first-item)
+ (null (caddr l))
+ (equal (cdr-safe (caddr l)) menu-bar-separator)))
(setcdr l (cddr l))
+ ;; The "first item" is any cons cell; this excludes the
+ ;; `keymap' symbol and the menu name.
+ (when (consp (cadr l)) (setq saw-first-item t))
(setq l (cdr l)))))
(when (functionp context-menu-filter-function)
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 27ea713..efbff79 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -402,13 +402,6 @@ headline after it has been retrieved for the first time."
"Miscellaneous newsticker settings."
:group 'newsticker)
-(defcustom newsticker-cache-filename
- "~/.newsticker-cache"
- "Name of the newsticker cache file."
- :type 'string
- :group 'newsticker-miscellaneous)
-(make-obsolete-variable 'newsticker-cache-filename 'newsticker-dir "23.1")
-
(defcustom newsticker-dir
(locate-user-emacs-file "newsticker/" ".newsticker/")
"Directory where newsticker saves data."
@@ -2115,28 +2108,6 @@ well."
(throw 'result t)))))
(< (or (newsticker--pos item1) 0) (or (newsticker--pos item2) 0))))
-(defun newsticker--cache-save-version1 ()
- "Update and save newsticker cache file."
- (interactive)
- (newsticker--cache-update t))
-
-(defun newsticker--cache-update (&optional save)
- "Update newsticker cache file.
-If optional argument SAVE is not nil the cache file is saved to disk."
- (save-excursion
- (unless (file-directory-p newsticker-dir)
- (make-directory newsticker-dir t))
- (let ((coding-system-for-write 'utf-8)
- (buf (find-file-noselect newsticker-cache-filename)))
- (when buf
- (set-buffer buf)
- (setq buffer-undo-list t)
- (erase-buffer)
- (insert ";; -*- coding: utf-8 -*-\n")
- (insert (prin1-to-string newsticker--cache))
- (when save
- (save-buffer))))))
-
(defun newsticker--cache-get-feed (feed)
"Return the cached data for the feed FEED.
FEED is a symbol!"
@@ -2163,30 +2134,11 @@ FEED is a symbol!"
(insert ";; -*- coding: utf-8 -*-\n")
(insert (prin1-to-string (cdr feed)))))))
-(defun newsticker--cache-read-version1 ()
- "Read version1 cache data."
- (let ((coding-system-for-read 'utf-8))
- (when (file-exists-p newsticker-cache-filename)
- (with-temp-buffer
- (insert-file-contents newsticker-cache-filename)
- (goto-char (point-min))
- (condition-case nil
- (setq newsticker--cache (read (current-buffer)))
- (error
- (message "Error while reading newsticker cache file!")
- (setq newsticker--cache nil)))))))
-
(defun newsticker--cache-read ()
"Read cache data."
(setq newsticker--cache nil)
- (if (file-exists-p newsticker-cache-filename)
- (progn
- (when (y-or-n-p "Old newsticker cache file exists. Read it? ")
- (newsticker--cache-read-version1))
- (when (y-or-n-p "Delete old newsticker cache file? ")
- (delete-file newsticker-cache-filename)))
- (dolist (f (append newsticker-url-list-defaults newsticker-url-list))
- (newsticker--cache-read-feed (car f)))))
+ (dolist (f (append newsticker-url-list-defaults newsticker-url-list))
+ (newsticker--cache-read-feed (car f))))
(defun newsticker--cache-read-feed (feed-name)
"Read cache data for feed named FEED-NAME."
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index b83569f..780c3b3 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2678,15 +2678,17 @@ The method used must be an out-of-band method."
(point-min) 'noerror)
(replace-match (file-relative-name filename) t))
- ;; Try to insert the amount of free space.
- (goto-char (point-min))
- ;; First find the line to put it on.
- (when (re-search-forward "^\\([[:space:]]*total\\)" nil t)
- (when-let ((available (get-free-disk-space ".")))
- ;; Replace "total" with "total used", to avoid confusion.
- (replace-match "\\1 used in directory")
- (end-of-line)
- (insert " available " available))))
+ ;; Try to insert the amount of free space. This is moved to
+ ;; `dired-insert-directory' in Emacs 29.1.
+ (unless (boundp 'dired-free-space)
+ (goto-char (point-min))
+ ;; First find the line to put it on.
+ (when (re-search-forward "^\\([[:space:]]*total\\)" nil t)
+ (when-let ((available (get-free-disk-space ".")))
+ ;; Replace "total" with "total used", to avoid confusion.
+ (replace-match "\\1 used in directory")
+ (end-of-line)
+ (insert " available " available)))))
(prog1 (goto-char end-marker)
(set-marker beg-marker nil)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 2411953..0a7d1ef 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1120,12 +1120,14 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(setcar x (concat (car x) "*"))))))
entries))
- ;; Insert size information.
- (when full-directory-p
- (insert
- (if avail
- (format "total used in directory %s available %s\n" used avail)
- (format "total %s\n" used))))
+ ;; Insert size information. This is moved to
+ ;; `dired-insert-directory' in Emacs 29.1.
+ (unless (boundp 'dired-free-space)
+ (when full-directory-p
+ (insert
+ (if avail
+ (format "total used in directory %s available %s\n" used
avail)
+ (format "total %s\n" used)))))
;; Print entries.
(mapc
diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el
index f07ca66..3c29803 100644
--- a/lisp/nxml/xsd-regexp.el
+++ b/lisp/nxml/xsd-regexp.el
@@ -52,9 +52,6 @@
;; or a character translatable to such a character (i.e a character
;; for which `encode-char' will return non-nil).
;;
-;; Using unify-8859-on-decoding-mode is probably a good idea here
-;; (and generally with XML and other Unicode-oriented formats).
-;;
;; Unfortunately, this means that this package is currently useless
;; for CJK characters, since there's no mule-unicode charset for the
;; CJK ranges of Unicode. We should devise a workaround for this
diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el
index fbbd2d4..1dffd36 100644
--- a/lisp/obsolete/vc-arch.el
+++ b/lisp/obsolete/vc-arch.el
@@ -83,8 +83,6 @@ If nil, use the value of `vc-diff-switches'. If t, use no
switches."
(repeat :tag "Argument List" :value ("") string))
:version "23.1")
-(define-obsolete-variable-alias 'vc-arch-command 'vc-arch-program "23.1")
-
(defcustom vc-arch-program
(let ((candidates '("tla" "baz")))
(while (and candidates (not (executable-find (car candidates))))
diff --git a/src/image.c b/src/image.c
index da23b66..d408cd1 100644
--- a/src/image.c
+++ b/src/image.c
@@ -31,6 +31,7 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include <setjmp.h>
+#include <math.h>
#include <stdint.h>
#include <c-ctype.h>
#include <flexmember.h>
@@ -2138,14 +2139,16 @@ postprocess_image (struct frame *f, struct image *img)
safely rounded and clipped to int range. */
static int
-scale_image_size (int size, size_t divisor, size_t multiplier)
+scale_image_size (int size, double divisor, double multiplier)
{
if (divisor != 0)
{
- double s = size;
- double scaled = s * multiplier / divisor + 0.5;
+ double scaled = size * multiplier / divisor;
if (scaled < INT_MAX)
- return scaled;
+ {
+ /* Use ceil, as rounding can discard fractional SVG pixels. */
+ return ceil (scaled);
+ }
}
return INT_MAX;
}
@@ -2166,84 +2169,77 @@ image_get_dimension (struct image *img, Lisp_Object
symbol)
if (FIXNATP (value))
return min (XFIXNAT (value), INT_MAX);
if (CONSP (value) && NUMBERP (CAR (value)) && EQ (Qem, CDR (value)))
- return min (img->face_font_size * XFLOATINT (CAR (value)), INT_MAX);
+ return scale_image_size (img->face_font_size, 1, XFLOATINT (CAR (value)));
return -1;
}
/* Compute the desired size of an image with native size WIDTH x HEIGHT.
- Use SPEC to deduce the size. Store the desired size into
+ Use IMG to deduce the size. Store the desired size into
*D_WIDTH x *D_HEIGHT. Store -1 x -1 if the native size is OK. */
static void
-compute_image_size (size_t width, size_t height,
+compute_image_size (double width, double height,
struct image *img,
int *d_width, int *d_height)
{
- Lisp_Object value;
- int int_value;
- int desired_width = -1, desired_height = -1, max_width = -1, max_height = -1;
double scale = 1;
-
- value = image_spec_value (img->spec, QCscale, NULL);
+ Lisp_Object value = image_spec_value (img->spec, QCscale, NULL);
if (NUMBERP (value))
- scale = XFLOATINT (value);
-
- int_value = image_get_dimension (img, QCmax_width);
- if (int_value >= 0)
- max_width = int_value;
-
- int_value = image_get_dimension (img, QCmax_height);
- if (int_value >= 0)
- max_height = int_value;
+ {
+ double dval = XFLOATINT (value);
+ if (0 <= dval)
+ scale = dval;
+ }
/* If width and/or height is set in the display spec assume we want
to scale to those values. If either h or w is unspecified, the
unspecified should be calculated from the specified to preserve
aspect ratio. */
- int_value = image_get_dimension (img, QCwidth);
- if (int_value >= 0)
+ int desired_width = image_get_dimension (img, QCwidth), max_width;
+ if (desired_width < 0)
+ max_width = image_get_dimension (img, QCmax_width);
+ else
{
- desired_width = int_value * scale;
+ desired_width = scale_image_size (desired_width, 1, scale);
/* :width overrides :max-width. */
max_width = -1;
}
- int_value = image_get_dimension (img, QCheight);
- if (int_value >= 0)
+ int desired_height = image_get_dimension (img, QCheight), max_height;
+ if (desired_height < 0)
+ max_height = image_get_dimension (img, QCmax_height);
+ else
{
- desired_height = int_value * scale;
+ desired_height = scale_image_size (desired_height, 1, scale);
/* :height overrides :max-height. */
max_height = -1;
}
/* If we have both width/height set explicitly, we skip past all the
aspect ratio-preserving computations below. */
- if (desired_width != -1 && desired_height != -1)
+ if (0 <= desired_width && 0 <= desired_height)
goto out;
- width = width * scale;
- height = height * scale;
-
- if (desired_width != -1)
+ if (0 <= desired_width)
/* Width known, calculate height. */
desired_height = scale_image_size (desired_width, width, height);
- else if (desired_height != -1)
+ else if (0 <= desired_height)
/* Height known, calculate width. */
desired_width = scale_image_size (desired_height, height, width);
else
{
- desired_width = width;
- desired_height = height;
+ desired_width = scale_image_size (width, 1, scale);
+ desired_height = scale_image_size (height, 1, scale);
}
- if (max_width != -1 && desired_width > max_width)
+ if (0 <= max_width && max_width < desired_width)
{
/* The image is wider than :max-width. */
desired_width = max_width;
desired_height = scale_image_size (desired_width, width, height);
}
- if (max_height != -1 && desired_height > max_height)
+ if (0 <= max_height && max_height < desired_height)
{
/* The image is higher than :max-height. */
desired_height = max_height;
@@ -10211,6 +10207,10 @@ DEF_DLL_FN (gboolean, rsvg_handle_close, (RsvgHandle
*, GError **));
DEF_DLL_FN (void, rsvg_handle_set_dpi_x_y,
(RsvgHandle * handle, double dpi_x, double dpi_y));
+# if LIBRSVG_CHECK_VERSION (2, 52, 1)
+DEF_DLL_FN (void, rsvg_handle_get_intrinsic_size_in_pixels,
+ (RsvgHandle *, gdouble *, gdouble *));
+# endif
# if LIBRSVG_CHECK_VERSION (2, 46, 0)
DEF_DLL_FN (void, rsvg_handle_get_intrinsic_dimensions,
(RsvgHandle *, gboolean *, RsvgLength *, gboolean *,
@@ -10274,6 +10274,9 @@ init_svg_functions (void)
LOAD_DLL_FN (library, rsvg_handle_close);
#endif
LOAD_DLL_FN (library, rsvg_handle_set_dpi_x_y);
+#if LIBRSVG_CHECK_VERSION (2, 52, 1)
+ LOAD_DLL_FN (library, rsvg_handle_get_intrinsic_size_in_pixels);
+#endif
#if LIBRSVG_CHECK_VERSION (2, 46, 0)
LOAD_DLL_FN (library, rsvg_handle_get_intrinsic_dimensions);
LOAD_DLL_FN (library, rsvg_handle_get_geometry_for_layer);
@@ -10317,6 +10320,9 @@ init_svg_functions (void)
# undef g_clear_error
# undef g_object_unref
# undef g_type_init
+# if LIBRSVG_CHECK_VERSION (2, 52, 1)
+# undef rsvg_handle_get_intrinsic_size_in_pixels
+# endif
# if LIBRSVG_CHECK_VERSION (2, 46, 0)
# undef rsvg_handle_get_intrinsic_dimensions
# undef rsvg_handle_get_geometry_for_layer
@@ -10352,6 +10358,10 @@ init_svg_functions (void)
# if ! GLIB_CHECK_VERSION (2, 36, 0)
# define g_type_init fn_g_type_init
# endif
+# if LIBRSVG_CHECK_VERSION (2, 52, 1)
+# define rsvg_handle_get_intrinsic_size_in_pixels \
+ fn_rsvg_handle_get_intrinsic_size_in_pixels
+# endif
# if LIBRSVG_CHECK_VERSION (2, 46, 0)
# define rsvg_handle_get_intrinsic_dimensions \
fn_rsvg_handle_get_intrinsic_dimensions
@@ -10589,50 +10599,71 @@ svg_load_image (struct frame *f, struct image *img,
char *contents,
/* Get the image dimensions. */
#if LIBRSVG_CHECK_VERSION (2, 46, 0)
- RsvgRectangle zero_rect, viewbox, out_logical_rect;
-
- /* Try the intrinsic dimensions first. */
- gboolean has_width, has_height, has_viewbox;
- RsvgLength iwidth, iheight;
- double dpi = FRAME_DISPLAY_INFO (f)->resx;
-
- rsvg_handle_get_intrinsic_dimensions (rsvg_handle,
- &has_width, &iwidth,
- &has_height, &iheight,
- &has_viewbox, &viewbox);
+ gdouble gviewbox_width, gviewbox_height;
+ gboolean has_viewbox = FALSE;
+# if LIBRSVG_CHECK_VERSION (2, 52, 1)
+ has_viewbox = rsvg_handle_get_intrinsic_size_in_pixels (rsvg_handle,
+ &gviewbox_width,
+ &gviewbox_height);
+# endif
- if (has_width && has_height)
+ if (has_viewbox)
{
- /* Success! We can use these values directly. */
- viewbox_width = svg_css_length_to_pixels (iwidth, dpi,
img->face_font_size);
- viewbox_height = svg_css_length_to_pixels (iheight, dpi,
img->face_font_size);
- }
- else if (has_width && has_viewbox)
- {
- viewbox_width = svg_css_length_to_pixels (iwidth, dpi,
img->face_font_size);
- viewbox_height = svg_css_length_to_pixels (iwidth, dpi,
img->face_font_size)
- * viewbox.height / viewbox.width;
- }
- else if (has_height && has_viewbox)
- {
- viewbox_height = svg_css_length_to_pixels (iheight, dpi,
img->face_font_size);
- viewbox_width = svg_css_length_to_pixels (iheight, dpi,
img->face_font_size)
- * viewbox.width / viewbox.height;
- }
- else if (has_viewbox)
- {
- viewbox_width = viewbox.width;
- viewbox_height = viewbox.height;
+ viewbox_width = gviewbox_width;
+ viewbox_height = gviewbox_height;
}
else
{
- /* We haven't found a usable set of sizes, so try working out
- the visible area. */
- rsvg_handle_get_geometry_for_layer (rsvg_handle, NULL,
- &zero_rect, &viewbox,
- &out_logical_rect, NULL);
- viewbox_width = viewbox.x + viewbox.width;
- viewbox_height = viewbox.y + viewbox.height;
+ RsvgRectangle zero_rect, viewbox, out_logical_rect;
+
+ /* Try the intrinsic dimensions first. */
+ gboolean has_width, has_height;
+ RsvgLength iwidth, iheight;
+ double dpi = FRAME_DISPLAY_INFO (f)->resx;
+
+ rsvg_handle_get_intrinsic_dimensions (rsvg_handle,
+ &has_width, &iwidth,
+ &has_height, &iheight,
+ &has_viewbox, &viewbox);
+
+ if (has_width && has_height)
+ {
+ /* Success! We can use these values directly. */
+ viewbox_width = svg_css_length_to_pixels (iwidth, dpi,
+ img->face_font_size);
+ viewbox_height = svg_css_length_to_pixels (iheight, dpi,
+ img->face_font_size);
+ }
+ else if (has_width && has_viewbox)
+ {
+ viewbox_width = svg_css_length_to_pixels (iwidth, dpi,
+ img->face_font_size);
+ viewbox_height = viewbox_width * viewbox.height / viewbox.width;
+ }
+ else if (has_height && has_viewbox)
+ {
+ viewbox_height = svg_css_length_to_pixels (iheight, dpi,
+ img->face_font_size);
+ viewbox_width = viewbox_height * viewbox.width / viewbox.height;
+ }
+ else if (has_viewbox)
+ {
+ viewbox_width = viewbox.width;
+ viewbox_height = viewbox.height;
+ }
+ else
+ viewbox_width = viewbox_height = 0;
+
+ if (! (0 < viewbox_width && 0 < viewbox_height))
+ {
+ /* We haven't found a usable set of sizes, so try working out
+ the visible area. */
+ rsvg_handle_get_geometry_for_layer (rsvg_handle, NULL,
+ &zero_rect, &viewbox,
+ &out_logical_rect, NULL);
+ viewbox_width = viewbox.x + viewbox.width;
+ viewbox_height = viewbox.y + viewbox.height;
+ }
}
#else
/* In librsvg before 2.46.0, guess the viewbox from the image dimensions. */
@@ -10645,8 +10676,8 @@ svg_load_image (struct frame *f, struct image *img,
char *contents,
compute_image_size (viewbox_width, viewbox_height, img,
&width, &height);
- width *= FRAME_SCALE_FACTOR (f);
- height *= FRAME_SCALE_FACTOR (f);
+ width = scale_image_size (width, 1, FRAME_SCALE_FACTOR (f));
+ height = scale_image_size (height, 1, FRAME_SCALE_FACTOR (f));
if (! check_image_size (f, width, height))
{
diff --git a/src/lisp.h b/src/lisp.h
index 242156b..d44ab55 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -259,6 +259,11 @@ DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK)
# define VALMASK (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)
DEFINE_GDB_SYMBOL_END (VALMASK)
+/* Ignore 'alignas' on compilers lacking it. */
+#if !defined alignas && !defined __alignas_is_defined
+# define alignas(a)
+#endif
+
/* Minimum alignment requirement for Lisp objects, imposed by the
internal representation of tagged pointers. It is 2**GCTYPEBITS if
USE_LSB_TAG, 1 otherwise. It must be a literal integer constant,
diff --git a/src/xdisp.c b/src/xdisp.c
index c39bf5a..0e1e29e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -28817,21 +28817,6 @@ normal_char_height (struct font *font, int c)
return ascent + descent;
}
-/* Return the "standard" pixel width of a character from FACE's font,
- if the font is fixed-pitch, zero otherwise. */
-static int
-get_normal_width (struct face *face)
-{
- struct font *ascii_font = face->ascii_face->font;
- /* Heuristics: fixed-pitch fonts have the value of MAX-WIDTH not
- much larger than AVERAGE-WIDTH. */
- bool fixed_pitch =
- ascii_font->average_width == ascii_font->space_width
- && ascii_font->average_width != 0
- && ascii_font->max_width < 3 * ascii_font->average_width;
- return fixed_pitch ? ascii_font->space_width : 0;
-}
-
/* EXPORT for RIF:
Set *LEFT and *RIGHT to the left and right overhang of GLYPH on
frame F. Overhangs of glyphs other than type CHAR_GLYPH are
@@ -30929,17 +30914,6 @@ gui_produce_glyphs (struct it *it)
it->phys_ascent = pcm->ascent + boff;
it->phys_descent = pcm->descent - boff;
it->pixel_width = pcm->width;
- if (align_columns_display)
- {
- int unit_width = get_normal_width (face);
- if (unit_width > 0)
- {
- int ncolumns =
- (it->pixel_width - 1 + unit_width) / unit_width;
-
- it->pixel_width = ncolumns * unit_width;
- }
- }
/* Don't use font-global values for ascent and descent
if they result in an exceedingly large line height. */
if (it->override_ascent < 0)
@@ -31517,17 +31491,6 @@ gui_produce_glyphs (struct it *it)
it->glyph_row->contains_overlapping_glyphs_p = true;
it->pixel_width = cmp->pixel_width;
- if (align_columns_display)
- {
- int unit_width = get_normal_width (face);
- if (unit_width > 0)
- {
- int ncolumns =
- (it->pixel_width - 1 + unit_width) / unit_width;
-
- it->pixel_width = ncolumns * unit_width;
- }
- }
it->ascent = it->phys_ascent = cmp->ascent;
it->descent = it->phys_descent = cmp->descent;
IT_APPLY_FACE_BOX(it, face);
@@ -31573,17 +31536,6 @@ gui_produce_glyphs (struct it *it)
it->glyph_row->contains_overlapping_glyphs_p = true;
it->ascent = it->phys_ascent = metrics.ascent;
it->descent = it->phys_descent = metrics.descent;
- if (align_columns_display)
- {
- int unit_width = get_normal_width (face);
- if (unit_width > 0)
- {
- int ncolumns =
- (it->pixel_width - 1 + unit_width) / unit_width;
-
- it->pixel_width = ncolumns * unit_width;
- }
- }
}
IT_APPLY_FACE_BOX(it, face);
@@ -35660,15 +35612,6 @@ variable are ignored and the default 0.25 is used
instead. */);
Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */);
Vdisplay_pixels_per_inch = make_float (72.0);
- DEFVAR_BOOL ("align-columns-display", align_columns_display,
- doc: /* Whether to align columns on GUI frames.
-If this is non-nil characters displayed on GUI frames will be
-aligned to produce straight columns. This is achieved by
-enlarging the pixel width of characters to an integral
-multiple of pixels taken by ASCII characters of the same face.
-This affects only fixed-pitch fonts. */);
- align_columns_display = false;
-
#ifdef GLYPH_DEBUG
DEFVAR_INT ("debug-end-pos", debug_end_pos, doc: /* Don't ask. */);
#endif
diff --git a/src/xwidget.c b/src/xwidget.c
index d3b7175..749a322 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -1102,6 +1102,9 @@ xwidget_scroll (struct xwidget_view *view, double x,
double y,
xg_event->scroll.delta_y = dy;
xg_event->scroll.device = find_suitable_pointer (view->frame);
+ if (!(fabs (dx) > 0) || !(fabs (dy) > 0))
+ xg_event->scroll.is_stop = TRUE;
+
g_object_ref (xg_event->any.window);
gtk_main_do_event (xg_event);
diff --git a/test/lisp/dired-x-tests.el b/test/lisp/dired-x-tests.el
index fe4b971..69c88c0 100644
--- a/test/lisp/dired-x-tests.el
+++ b/test/lisp/dired-x-tests.el
@@ -60,5 +60,15 @@
(should (equal (dired-guess-default '("/tmp/foo.png" "/tmp/foo.txt"))
nil))))
+(ert-deftest dired-x--string-to-number ()
+ (should (= (dired-x--string-to-number "2.4K") 2457.6))
+ (should (= (dired-x--string-to-number "2400") 2400))
+ (should (= (dired-x--string-to-number "123.4M") 129394278.4))
+ (should (= (dired-x--string-to-number "123.40000M") 129394278.4))
+ (should (= (dired-x--string-to-number "4.134") 4134))
+ (should (= (dired-x--string-to-number "4,134") 4134))
+ (should (= (dired-x--string-to-number "4 134") 4134))
+ (should (= (dired-x--string-to-number "41,52,134") 4152134)))
+
(provide 'dired-x-tests)
;;; dired-x-tests.el ends here