From d825f66db83501588f1c84aa4d78e644e0d5f896 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 4 Feb 2015 17:31:37 +0200 Subject: [PATCH 1/6] Fix filling circle/ellipse in Artist Mode (Bug#19763) lisp/textmodes/artist.el (artist-ellipse-compute-fill-info): Use mapcar, not mapc, to create the other half of fill-info. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/artist.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e52f9a35b47..e0c8815c648 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-02-04 Eli Zaretskii + + * textmodes/artist.el (artist-ellipse-compute-fill-info): Use + mapcar, not mapc, to create the other half of fill-info. + (Bug#19763) + 2015-02-04 Nicolas Petton * emacs-lisp/authors.el (authors-ignored-files) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 85d9410868a..930c39c82cc 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -3372,7 +3372,7 @@ The POINT-LIST is expected to cover the first quadrant." ;; Create the other half by mirroring the first half. (setq both-halves (append first-half - (mapc + (mapcar (lambda (i) (artist-new-fill-item (artist-fill-item-get-x i) (- (artist-fill-item-get-y i)) From c6487170e39e5b58872e935c95e8d033554501f7 Mon Sep 17 00:00:00 2001 From: kwhite Date: Wed, 4 Feb 2015 11:23:10 -0500 Subject: [PATCH 2/6] Update ERC docs and update MAINTANERS to include myself --- admin/ChangeLog | 4 ++++ admin/MAINTAINERS | 5 +++++ doc/misc/ChangeLog | 5 +++++ doc/misc/erc.texi | 31 ++++++++++++++++++++++++------- 4 files changed, 38 insertions(+), 7 deletions(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index 88d996532e0..0f70469fc0c 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2015-02-04 Kelvin White + + * MAINTAINERS: Add myself to section 2 + 2015-02-02 Glenn Morris * admin.el (manual-meta-string): Use bug-gnu-emacs@gnu email address diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 1a5c64191ff..04942a8c3c9 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -78,6 +78,11 @@ Bastien Guerry 2. ============================================================================== +Kelvin White + ERC + lisp/erc/* + doc/misc/erc.texi + Eli Zaretskii doc/* lispref/* diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 71469b51808..616b3574037 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2015-02-04 Kelvin White + + * erc.texi (Advanced Usage, Options): Add descriptions and examples + for erc-format-nick-function and erc-rename-buffers options. + 2014-12-29 Michael Albinus Sync with Tramp 2.2.11. diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index ffb8cd6455c..866d8486969 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -588,6 +588,16 @@ In the latter case, if the first nick in the list is already in use, other nicks are tried in the list order. @end defopt +@defopt erc-format-nick-function +A function to format a nickname for message display + +You can set this to @code{erc-format-@OA@nick} to display user mode prefix +@end defopt + +@example +(setq erc-format-nick-function 'erc-format-@@nick) +@end example + @defopt erc-nick-uniquifier The string to append to the nick if it is already in use. @end defopt @@ -657,13 +667,6 @@ your Emacs configuration file. Everything after the @code{(require @lisp ;;; Sample ERC configuration -;; Add the ERC directory to load path -- you don't need this if you are -;; using the version of ERC that comes with Emacs -(add-to-list 'load-path "~/elisp/erc") - -;; Load ERC -(require 'erc) - ;; Load authentication info from an external source. Put sensitive ;; passwords and the like in here. (load "~/.emacs.d/.erc-auth") @@ -712,6 +715,12 @@ stuff, to the current ERC buffer." ;; Join the #emacs and #erc channels whenever connecting to Freenode. (setq erc-autojoin-channels-alist '(("freenode.net" "#emacs" "#erc"))) +;; Rename server buffers to reflect the current network name instead +;; of SERVER:PORT. (e.g. "freenode" instead of "irc.freenode.net:6667"). This +;; is useful when using a bouncer like ZNC where you have multiple +;; connections to the same server. +(setq erc-rename-buffers t) + ;; Interpret mIRC-style color commands in IRC chats (setq erc-interpret-mirc-color t) @@ -750,6 +759,14 @@ lurkers. The function @code{erc-lurker-p} determines whether a given nickname is considered a lurker. @end defopt +@defopt erc-rename-buffers +If non, @code{nil}, this will rename server buffers to reflect the +current network name instead of IP:PORT + +@example +(setq erc-rename-buffers t) +@end example +@end defopt @node Getting Help and Reporting Bugs @chapter Getting Help and Reporting Bugs From 9615c0dead1b5828fa6a599eb7fa18551921938b Mon Sep 17 00:00:00 2001 From: kwhite Date: Wed, 4 Feb 2015 14:33:07 -0500 Subject: [PATCH 3/6] doc/misc/erc.texi: fix typo --- doc/misc/ChangeLog | 1 + doc/misc/erc.texi | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 616b3574037..0e43b9ffe4d 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -2,6 +2,7 @@ * erc.texi (Advanced Usage, Options): Add descriptions and examples for erc-format-nick-function and erc-rename-buffers options. + (Connecting): fix typo 2014-12-29 Michael Albinus diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 866d8486969..1c733bd03ac 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -591,7 +591,7 @@ other nicks are tried in the list order. @defopt erc-format-nick-function A function to format a nickname for message display -You can set this to @code{erc-format-@OA@nick} to display user mode prefix +You can set this to @code{erc-format-@@nick} to display user mode prefix @end defopt @example From 008a04ac9af20540d6e7ee4b61fb5bb3b21ef0e6 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 4 Feb 2015 22:38:52 +0100 Subject: [PATCH 4/6] todo-mode.el: Restore point on setting item done (Bug#19727) calendar/todo-mode.el (todo-item-done): When done items are hidden, restore point to its location prior to invoking this command. --- lisp/ChangeLog | 6 ++++++ lisp/calendar/todo-mode.el | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e0c8815c648..0e00cb2f17f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-02-04 Robert Pluim (tiny change) + + * calendar/todo-mode.el (todo-item-done): When done items are + hidden, restore point to its location prior to invoking this + command. (Bug#19727) + 2015-02-04 Eli Zaretskii * textmodes/artist.el (artist-ellipse-compute-fill-info): Use diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 7ca57a42b76..dcc960fb9bf 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -2816,7 +2816,8 @@ visible." (goto-char (point-min)) (re-search-forward todo-done-string-start nil t))) (buffer-read-only nil) - item done-item opoint) + item done-item + (opoint (point))) ;; Don't add empty comment to done item. (setq comment (unless (zerop (length comment)) (concat " [" todo-comment-string ": " comment "]"))) @@ -2854,7 +2855,9 @@ visible." (todo-update-categories-sexp) (let ((todo-show-with-done show-done)) (todo-category-select) - ;; When done items are shown, put cursor on first just done item. + ;; When done items are visible, put point at the top of the + ;; done items section. When done items are hidden, restore + ;; point to its location prior to invoking this command. (when opoint (goto-char opoint))))))) (defun todo-item-undone () From a323b93d466c403cbef96184d510b134549c7806 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 5 Feb 2015 02:52:41 +0200 Subject: [PATCH 5/6] Better multi-line input support in comint.el Revert the change of comint-line-beginning-position callers, and modify comint-line-beginning-position instead. * lisp/comint.el (comint-history-isearch-search) (comint-history-isearch-message, comint-history-isearch-wrap): Use comint-line-beginning-position instead of field-beginning. (comint-send-input): Use either end-of-line or field-end depending on comint-use-prompt-regexp. (comint-line-beginning-position): Search backward for comint-prompt-regexp if comint-use-prompt-regexp is non-nil. Use field-beginning instead of line-beginning-position if comint-use-prompt-regexp is nil. Fixes: debbugs:19710 --- lisp/ChangeLog | 15 +++++++++++++++ lisp/comint.el | 24 ++++++++++++++---------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0e00cb2f17f..6c3caa826e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2015-02-05 Juri Linkov + + Revert the previous change of comint-line-beginning-position callers, + and modify comint-line-beginning-position instead. + + * comint.el (comint-history-isearch-search) + (comint-history-isearch-message, comint-history-isearch-wrap): + Use comint-line-beginning-position instead of field-beginning. + (comint-send-input): Use either end-of-line or field-end + depending on comint-use-prompt-regexp. + (comint-line-beginning-position): Search backward + for comint-prompt-regexp if comint-use-prompt-regexp is non-nil. + Use field-beginning instead of line-beginning-position + if comint-use-prompt-regexp is nil. (Bug#19710) + 2015-02-04 Robert Pluim (tiny change) * calendar/todo-mode.el (todo-item-done): When done items are diff --git a/lisp/comint.el b/lisp/comint.el index f33034bdb57..419938ea684 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1475,7 +1475,7 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'." (or ;; 1. First try searching in the initial comint text (funcall search-fun string - (if isearch-forward bound (field-beginning)) + (if isearch-forward bound (comint-line-beginning-position)) noerror) ;; 2. If the above search fails, start putting next/prev history ;; elements in the comint successively, and search the string @@ -1491,7 +1491,7 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'." (when (null comint-input-ring-index) (error "End of history; no next item")) (comint-next-input 1) - (goto-char (field-beginning))) + (goto-char (comint-line-beginning-position))) (t ;; Signal an error here explicitly, because ;; `comint-previous-input' doesn't signal an error. @@ -1509,7 +1509,7 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'." (unless isearch-forward ;; For backward search, don't search ;; in the comint prompt - (field-beginning)) + (comint-line-beginning-position)) noerror))) ;; Return point of the new search result (point)) @@ -1533,16 +1533,16 @@ the function `isearch-message'." (if (overlayp comint-history-isearch-message-overlay) (move-overlay comint-history-isearch-message-overlay (save-excursion - (goto-char (field-beginning)) + (goto-char (comint-line-beginning-position)) (forward-line 0) (point)) - (field-beginning)) + (comint-line-beginning-position)) (setq comint-history-isearch-message-overlay (make-overlay (save-excursion - (goto-char (field-beginning)) + (goto-char (comint-line-beginning-position)) (forward-line 0) (point)) - (field-beginning))) + (comint-line-beginning-position))) (overlay-put comint-history-isearch-message-overlay 'evaporate t)) (overlay-put comint-history-isearch-message-overlay 'display (isearch-message-prefix ellipsis isearch-nonincremental)) @@ -1563,7 +1563,7 @@ or to the last history element for a backward search." (comint-goto-input (1- (ring-length comint-input-ring))) (comint-goto-input nil)) (setq isearch-success t) - (goto-char (if isearch-forward (field-beginning) (point-max)))) + (goto-char (if isearch-forward (comint-line-beginning-position) (point-max)))) (defun comint-history-isearch-push-state () "Save a function restoring the state of input history search. @@ -1781,7 +1781,10 @@ Similarly for Soar, Scheme, etc." (widen) (let* ((pmark (process-mark proc)) (intxt (if (>= (point) (marker-position pmark)) - (progn (if comint-eol-on-send (goto-char (field-end))) + (progn (if comint-eol-on-send + (if comint-use-prompt-regexp + (end-of-line) + (goto-char (field-end)))) (buffer-substring pmark (point))) (let ((copy (funcall comint-get-old-input))) (goto-char pmark) @@ -2260,6 +2263,7 @@ a buffer local variable." (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (save-excursion + (re-search-backward comint-prompt-regexp nil t) (beginning-of-line) (comint-skip-prompt) (point)) @@ -2270,7 +2274,7 @@ a buffer local variable." ;; if there are two fields on a line, then the first one is the ;; prompt, and the second one is an input field, and is front-sticky ;; (as input fields should be). - (constrain-to-field (line-beginning-position) (line-end-position)))) + (constrain-to-field (field-beginning) (line-end-position)))) (defun comint-bol (&optional arg) "Go to the beginning of line, then skip past the prompt, if any. From c0ba5908b117170995df36e839a087af7c5f79db Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 5 Feb 2015 19:07:15 +0200 Subject: [PATCH 6/6] Fix vertical-motion and posn-at-point when word-wrap is on (Bug#19769) src/xdisp.c (move_it_in_display_line_to): Handle the case where the last character of a screen line is whitespace, and we are under word-wrap with overflow-newline-into-fringe turned on. --- src/ChangeLog | 7 +++++++ src/xdisp.c | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8e7ab9363f6..135f28fb20f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2015-02-05 Eli Zaretskii + + * xdisp.c (move_it_in_display_line_to): Handle the case where the + last character of a screen line is whitespace, and we are under + word-wrap with overflow-newline-into-fringe turned on. + (Bug#19769) + 2015-02-03 Eli Zaretskii * xdisp.c (handle_stop, handle_single_display_spec) diff --git a/src/xdisp.c b/src/xdisp.c index 5e552ca2fdb..8cb43538dcc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8798,7 +8798,16 @@ move_it_in_display_line_to (struct it *it, if (BUFFER_POS_REACHED_P ()) { if (it->line_wrap != WORD_WRAP - || wrap_it.sp < 0) + || wrap_it.sp < 0 + /* If we've just found whitespace to + wrap, effectively ignore the + previous wrap point -- it is no + longer relevant, but we won't + have an opportunity to update it, + since we've reached the edge of + this screen line. */ + || (may_wrap + && IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))) { it->hpos = hpos_before_this_char; it->current_x = x_before_this_char; @@ -8862,7 +8871,26 @@ move_it_in_display_line_to (struct it *it, else IT_RESET_X_ASCENT_DESCENT (it); - if (wrap_it.sp >= 0) + /* If the screen line ends with whitespace, and we + are under word-wrap, don't use wrap_it: it is no + longer relevant, but we won't have an opportunity + to update it, since we are done with this screen + line. */ + if (may_wrap && IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + { + /* If we've found TO_X, go back there, as we now + know the last word fits on this screen line. */ + if ((op & MOVE_TO_X) && new_x == it->last_visible_x + && atx_it.sp >= 0) + { + RESTORE_IT (it, &atx_it, atx_data); + atpos_it.sp = -1; + atx_it.sp = -1; + result = MOVE_X_REACHED; + break; + } + } + else if (wrap_it.sp >= 0) { RESTORE_IT (it, &wrap_it, wrap_data); atpos_it.sp = -1;