summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/MAINTAINERS1
-rw-r--r--configure.ac38
-rw-r--r--doc/emacs/display.texi17
-rw-r--r--doc/lispref/windows.texi6
-rw-r--r--lisp/emacs-lisp/check-declare.el2
-rw-r--r--lisp/info-look.el4
-rw-r--r--lisp/international/mule.el65
-rw-r--r--lisp/progmodes/sh-script.el7
-rw-r--r--lisp/rect.el77
-rw-r--r--lisp/term.el12
-rw-r--r--lisp/window.el14
-rw-r--r--lisp/xt-mouse.el5
-rw-r--r--src/w32heap.c8
13 files changed, 148 insertions, 108 deletions
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 0fe30f01f6..f8baddd531 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -73,6 +73,7 @@ Michael Albinus
File Notifications
src/gfilenotify.c
+ src/kqueue.c
lisp/filenotify.el
test/lisp/filenotify-tests.el
diff --git a/configure.ac b/configure.ac
index 0f6f650245..eec6ce769c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3374,24 +3374,26 @@ HAVE_MODULES=no
MODULES_OBJ=
MODULES_SUFFIX=
if test "${with_modules}" != "no"; then
- if test "$opsys" = "gnu-linux"; then
- LIBMODULES="-ldl"
- MODULES_SUFFIX=".so"
- HAVE_MODULES=yes
- elif test "$opsys" = "cygwin"; then
- MODULES_SUFFIX=".dll"
- HAVE_MODULES=yes
- elif test "$opsys" = "darwin"; then
- MODULES_SUFFIX=".so"
- HAVE_MODULES=yes
- elif test "$opsys" = "mingw32"; then
- MODULES_SUFFIX=".dll"
- HAVE_MODULES=yes
- else
- # BSD system have dlopen in the libc
- AC_CHECK_FUNC(dlopen, [MODULES_SUFFIX=".so"]
- [HAVE_MODULES=yes], [])
- fi
+ case $opsys in
+ gnu|gnu-linux)
+ LIBMODULES="-ldl"
+ MODULES_SUFFIX=".so"
+ HAVE_MODULES=yes
+ ;;
+ cygwin|mingw32)
+ MODULES_SUFFIX=".dll"
+ HAVE_MODULES=yes
+ ;;
+ darwin)
+ MODULES_SUFFIX=".so"
+ HAVE_MODULES=yes
+ ;;
+ *)
+ # BSD system have dlopen in the libc
+ AC_CHECK_FUNC(dlopen, [MODULES_SUFFIX=".so"]
+ [HAVE_MODULES=yes], [])
+ ;;
+ esac
if test "${HAVE_MODULES}" = no; then
AC_MSG_ERROR([Dynamic modules are not supported on your system])
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 01f899f1c0..8039291298 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1087,6 +1087,23 @@ To disable this, change the variable
@code{overflow-newline-into-fringe} to @code{nil}; this causes Emacs
to continue or truncate lines that are exactly as wide as the window.
+ If you customize @code{fringe-mode} to remove the fringes on one or
+both sides of the window display, the features that display on the
+fringe are not available. Indicators of line continuation and
+truncation are an exception: when fringes are not available, Emacs
+uses the leftmost and rightmost character cells to indicate
+continuation and truncation with special ASCII characters, see
+@ref{Continuation Lines}, and @ref{Line Truncation}. This reduces the
+width available for displaying text on each line, because the
+character cells used for truncation and continuation indicators are
+reserved for that purpose. Since buffer text can include
+bidirectional text, and thus both left-to-right and right-to-left
+paragraphs (@pxref{Bidirectional Editing}), removing only one of the
+fringes still reserves two character cells, one on each side of the
+window, for truncation and continuation indicators, because these
+indicators are displayed on opposite sides of the window in
+right-to-left paragraphs.
+
@node Displaying Boundaries
@section Displaying Boundaries
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index bb13934fb3..74837ac82b 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -617,6 +617,12 @@ exceed its total height as returned by @code{window-total-height}.
@cindex body width of a window
The @dfn{body width} of a window is the width of its text area, which
does not include the scroll bar, fringes, margins or a right divider.
+Note that when one or both fringes are removed (by setting their width
+to zero), the display engine reserves two character cells, one on each
+side of the window, for displaying the continuation and truncation
+glyphs, which leaves 2 columns less for text display. (The function
+@code{window-max-chars-per-line}, described below, takes this
+peculiarity into account.)
@defun window-body-width &optional window pixelwise
This function returns the width, in columns, of the body of window
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index b6fa054608..b8a00b3fb4 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -339,7 +339,7 @@ Returns non-nil if any false statements are found."
errlist files)
(message "%s" m)
(message "%s" m2)
- (setq files (process-lines find-program root
+ (setq files (process-lines grep-find-program root
"-name" "*.el"
"-exec" grep-program
"-l" "^[ \t]*(declare-function" "{}" ";"))
diff --git a/lisp/info-look.el b/lisp/info-look.el
index 70d2756dfc..899f41e850 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -912,7 +912,9 @@ Return nil if there is nothing appropriate in the buffer near point."
;; for things that should go to Function: etc, and those latter
;; are much more important. Perhaps this could change if some
;; sort of fallback match scheme existed.
- ("(elisp)Index" nil "^ -+ .*: " "\\( \\|$\\)")))
+ ("(elisp)Index" nil "^ -+ .*: " "\\( \\|$\\)")
+ ("(cl)Function Index" nil "^ -+ .*: " "\\( \\|$\\)")
+ ("(cl)Variable Index" nil "^ -+ .*: " "\\( \\|$\\)")))
;; docstrings talk about elisp, so have apropos-mode follow emacs-lisp-mode
(info-lookup-maybe-add-help
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 60a90ae15a..21ab7e176d 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1445,42 +1445,35 @@ graphical terminals."
(let ((coding-type (coding-system-type coding-system))
(saved-meta-mode
(terminal-parameter terminal 'keyboard-coding-saved-meta-mode)))
- (if (not (eq coding-type 'raw-text))
- (let (accept-8-bit)
- (if (not (or (coding-system-get coding-system :suitable-for-keyboard)
- (coding-system-get coding-system :ascii-compatible-p)))
- (error "Unsuitable coding system for keyboard: %s" coding-system))
- (cond ((memq coding-type '(charset utf-8 shift-jis big5 ccl))
- (setq accept-8-bit t))
- ((eq coding-type 'iso-2022)
- (let ((flags (coding-system-get coding-system :flags)))
- (or (memq '7-bit flags)
- (setq accept-8-bit t))))
- (t
- (error "Unsupported coding system for keyboard: %s"
- coding-system)))
- (if accept-8-bit
- (progn
- (or saved-meta-mode
- (set-terminal-parameter terminal
- 'keyboard-coding-saved-meta-mode
- (cons (nth 2 (current-input-mode))
- nil)))
- (set-input-meta-mode 8 terminal))
- (when saved-meta-mode
- (set-input-meta-mode (car saved-meta-mode) terminal)
- (set-terminal-parameter terminal
- 'keyboard-coding-saved-meta-mode
- nil)))
- ;; Avoid end-of-line conversion.
- (setq coding-system
- (coding-system-change-eol-conversion coding-system 'unix)))
-
- (when saved-meta-mode
- (set-input-meta-mode (car saved-meta-mode) terminal)
- (set-terminal-parameter terminal
- 'keyboard-coding-saved-meta-mode
- nil))))
+ (let (accept-8-bit)
+ (if (not (or (coding-system-get coding-system :suitable-for-keyboard)
+ (coding-system-get coding-system :ascii-compatible-p)))
+ (error "Unsuitable coding system for keyboard: %s" coding-system))
+ (cond ((memq coding-type '(raw-text charset utf-8 shift-jis big5 ccl))
+ (setq accept-8-bit t))
+ ((eq coding-type 'iso-2022)
+ (let ((flags (coding-system-get coding-system :flags)))
+ (or (memq '7-bit flags)
+ (setq accept-8-bit t))))
+ (t
+ (error "Unsupported coding system for keyboard: %s"
+ coding-system)))
+ (if accept-8-bit
+ (progn
+ (or saved-meta-mode
+ (set-terminal-parameter terminal
+ 'keyboard-coding-saved-meta-mode
+ (cons (nth 2 (current-input-mode))
+ nil)))
+ (set-input-meta-mode 8 terminal))
+ (when saved-meta-mode
+ (set-input-meta-mode (car saved-meta-mode) terminal)
+ (set-terminal-parameter terminal
+ 'keyboard-coding-saved-meta-mode
+ nil)))
+ ;; Avoid end-of-line conversion.
+ (setq coding-system
+ (coding-system-change-eol-conversion coding-system 'unix))))
(set-keyboard-coding-system-internal coding-system terminal)
(setq keyboard-coding-system coding-system))
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 2b61bc2e75..4fe47f026b 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1225,9 +1225,10 @@ and command `sh-reset-indent-vars-to-global-values'."
:type 'hook
:group 'sh-script)
-(defcustom sh-mode-hook nil
+(defcustom sh-mode-hook '(sh-electric-here-document-mode)
"Hook run by `sh-mode'."
:type 'hook
+ :options '(sh-electric-here-document-mode)
:group 'sh-script)
(defcustom sh-learn-basic-offset nil
@@ -1616,7 +1617,8 @@ buffer indents as it currently is indented.
\\[sh-execute-region] Have optional header and region be executed in a subshell.
`sh-electric-here-document-mode' controls whether insertion of two
-unquoted < insert a here document.
+unquoted < insert a here document. You can control this behavior by
+modifying `sh-mode-hook'.
If you generally program a shell different from your login shell you can
set `sh-shell-file' accordingly. If your shell's file name doesn't correctly
@@ -1653,7 +1655,6 @@ with your script for an edit-interpret-debug cycle."
(setq-local syntax-propertize-function #'sh-syntax-propertize-function)
(add-hook 'syntax-propertize-extend-region-functions
#'syntax-propertize-multiline 'append 'local)
- (sh-electric-here-document-mode 1)
(setq-local skeleton-pair-alist '((?` _ ?`)))
(setq-local skeleton-pair-filter-function 'sh-quoted-p)
(setq-local skeleton-further-elements
diff --git a/lisp/rect.el b/lisp/rect.el
index 685213a063..6056b14734 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -408,40 +408,41 @@ With a prefix (or a FILL) argument, also fill too short lines."
:type 'boolean)
(defun rectangle--string-preview ()
- (let ((str (minibuffer-contents)))
- (when (equal str "")
- (setq str (or (car-safe minibuffer-default)
- (if (stringp minibuffer-default) minibuffer-default))))
- (when str (setq str (propertize str 'face 'region)))
- (with-selected-window rectangle--string-preview-window
- (unless (or (null rectangle--string-preview-state)
- (equal str (car rectangle--string-preview-state)))
- (rectangle--string-flush-preview)
- (apply-on-rectangle
- (lambda (startcol endcol)
- (let* ((sc (move-to-column startcol))
- (start (if (<= sc startcol) (point)
- (forward-char -1)
- (setq sc (current-column))
- (point)))
- (ec (move-to-column endcol))
- (end (point))
- (ol (make-overlay start end)))
- (push ol (nthcdr 3 rectangle--string-preview-state))
- ;; FIXME: The extra spacing doesn't interact correctly with
- ;; the extra spacing added by the rectangular-region-highlight.
- (when (< sc startcol)
- (overlay-put ol 'before-string (rectangle--space-to startcol)))
- (let ((as (when (< endcol ec)
- ;; (rectangle--space-to ec)
- (spaces-string (- ec endcol))
- )))
- (if (= start end)
- (overlay-put ol 'after-string (if as (concat str as) str))
- (overlay-put ol 'display str)
- (if as (overlay-put ol 'after-string as))))))
- (nth 1 rectangle--string-preview-state)
- (nth 2 rectangle--string-preview-state))))))
+ (when rectangle-preview
+ (let ((str (minibuffer-contents)))
+ (when (equal str "")
+ (setq str (or (car-safe minibuffer-default)
+ (if (stringp minibuffer-default) minibuffer-default))))
+ (when str (setq str (propertize str 'face 'rectangle-preview)))
+ (with-selected-window rectangle--string-preview-window
+ (unless (or (null rectangle--string-preview-state)
+ (equal str (car rectangle--string-preview-state)))
+ (rectangle--string-flush-preview)
+ (apply-on-rectangle
+ (lambda (startcol endcol)
+ (let* ((sc (move-to-column startcol))
+ (start (if (<= sc startcol) (point)
+ (forward-char -1)
+ (setq sc (current-column))
+ (point)))
+ (ec (move-to-column endcol))
+ (end (point))
+ (ol (make-overlay start end)))
+ (push ol (nthcdr 3 rectangle--string-preview-state))
+ ;; FIXME: The extra spacing doesn't interact correctly with
+ ;; the extra spacing added by the rectangular-region-highlight.
+ (when (< sc startcol)
+ (overlay-put ol 'before-string (rectangle--space-to startcol)))
+ (let ((as (when (< endcol ec)
+ ;; (rectangle--space-to ec)
+ (spaces-string (- ec endcol))
+ )))
+ (if (= start end)
+ (overlay-put ol 'after-string (if as (concat str as) str))
+ (overlay-put ol 'display str)
+ (if as (overlay-put ol 'after-string as))))))
+ (nth 1 rectangle--string-preview-state)
+ (nth 2 rectangle--string-preview-state)))))))
;; FIXME: Should this be turned into inhibit-region-highlight and made to apply
;; to non-rectangular regions as well?
@@ -782,7 +783,7 @@ Ignores `line-move-visual'."
(if (not old)
(let ((ol (make-overlay left right)))
(overlay-put ol 'window window)
- (overlay-put ol 'face 'region)
+ (overlay-put ol 'face 'rectangle-preview)
ol)
(let ((ol (pop old)))
(move-overlay ol left right (current-buffer))
@@ -814,7 +815,7 @@ Ignores `line-move-visual'."
(overlay-put ol 'after-string nil)))
((< mright rightcol) ;`rightcol' is past EOL.
(let ((str (rectangle--space-to rightcol)))
- (put-text-property 0 (length str) 'face 'region str)
+ (put-text-property 0 (length str) 'face 'rectangle-preview str)
;; If cursor happens to be here, draw it at the right place.
(rectangle--place-cursor leftcol left str)
(overlay-put ol 'after-string str)))
@@ -826,7 +827,7 @@ Ignores `line-move-visual'."
(overlay-put ol 'after-string nil)
(goto-char right)
(let ((str (rectangle--space-to rightcol)))
- (put-text-property 0 (length str) 'face 'region str)
+ (put-text-property 0 (length str) 'face 'rectangle-preview str)
(when (= left right)
(rectangle--place-cursor leftcol left str))
(overlay-put ol 'after-string str))))
@@ -836,7 +837,7 @@ Ignores `line-move-visual'."
;; Make zero-width rectangles visible!
(overlay-put ol 'after-string
(concat (propertize " "
- 'face '(region (:height 0.2)))
+ 'face '(rectangle-preview (:height 0.2)))
(overlay-get ol 'after-string))))
(push ol nrol)))
start end))
diff --git a/lisp/term.el b/lisp/term.el
index ecaca50568..3520a3938e 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -4159,7 +4159,17 @@ the process. Any more args are arguments to PROGRAM."
;; .emacs ...
(term-set-escape-char ?\C-x))
- (switch-to-buffer term-ansi-buffer-name))
+ (switch-to-buffer term-ansi-buffer-name)
+ ;; For some reason, without the below setting, ansi-term behaves
+ ;; sluggishly, not clear why, since the buffer is typically very
+ ;; small.
+ ;;
+ ;; There's a larger problem here with supporting bidirectional text:
+ ;; the application that writes to the terminal could have its own
+ ;; ideas about displaying bidirectional text, and might not want us
+ ;; reordering the text or deciding on base paragraph direction. One
+ ;; such application is Emacs in TTY mode... FIXME.
+ (setq bidi-paragraph-direction 'left-to-right))
;;; Serial terminals
diff --git a/lisp/window.el b/lisp/window.el
index 1d41d821dc..e086efb594 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1889,9 +1889,19 @@ the font."
(ncols (/ window-width font-width)))
(if (and (display-graphic-p)
overflow-newline-into-fringe
- (/= (frame-parameter nil 'left-fringe) 0)
- (/= (frame-parameter nil 'right-fringe) 0))
+ (not
+ (or (eq left-fringe-width 0)
+ (and (null left-fringe-width)
+ (= (frame-parameter nil 'left-fringe) 0))))
+ (not
+ (or (eq right-fringe-width 0)
+ (and (null right-fringe-width)
+ (= (frame-parameter nil 'right-fringe) 0)))))
ncols
+ ;; FIXME: This should remove 1 more column when there are no
+ ;; fringes, lines are truncated, and the window is hscrolled,
+ ;; but EOL is not in the view, because then there are 2
+ ;; truncation glyphs, not one.
(1- ncols)))))
(defun window-current-scroll-bars (&optional window)
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index e52095789b..a2b64019f9 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -155,10 +155,7 @@ single byte."
(set-keyboard-coding-system
(if (terminal-parameter nil 'xterm-mouse-utf-8)
'utf-8-unix
- ;; Use Latin-1 instead of no-conversion to avoid flicker
- ;; due to `set-keyboard-coding-system' changing the meta
- ;; mode.
- 'latin-1))
+ 'no-conversion))
;; Wait only a little; we assume that the entire escape sequence
;; has already been sent when this function is called.
(read-char nil nil 0.1))
diff --git a/src/w32heap.c b/src/w32heap.c
index df2fe0a8fa..6643b439a2 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -714,13 +714,12 @@ mmap_realloc (void **var, size_t nbytes)
/* If there is enough room in the current reserved area, then
commit more pages as needed. */
if (m2.State == MEM_RESERVE
+ && m2.AllocationBase == memInfo.AllocationBase
&& nbytes <= memInfo.RegionSize + m2.RegionSize)
{
void *p;
- p = VirtualAlloc (*var + memInfo.RegionSize,
- nbytes - memInfo.RegionSize,
- MEM_COMMIT, PAGE_READWRITE);
+ p = VirtualAlloc (*var, nbytes, MEM_COMMIT, PAGE_READWRITE);
if (!p /* && GetLastError() != ERROR_NOT_ENOUGH_MEMORY */)
{
DebPrint (("realloc enlarge: VirtualAlloc (%p + %I64x, %I64x) error %ld\n",
@@ -728,7 +727,8 @@ mmap_realloc (void **var, size_t nbytes)
(uint64_t)(nbytes - memInfo.RegionSize),
GetLastError ()));
DebPrint (("next region: %p %p %I64x %x\n", m2.BaseAddress,
- m2.AllocationBase, m2.RegionSize, m2.AllocationProtect));
+ m2.AllocationBase, (uint64_t)m2.RegionSize,
+ m2.AllocationProtect));
}
else
return *var;