Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8f098516
Commit
8f098516
authored
Sep 22, 2011
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug that C-x DEL deleted a newline before paragraph.
parent
e74f1bb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
12 deletions
+21
-12
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/textmodes/paragraphs.el
lisp/textmodes/paragraphs.el
+16
-12
No files found.
lisp/ChangeLog
View file @
8f098516
2011-09-22 Richard Stallman <rms@gnu.org>
* textmodes/paragraphs.el (forward-sentence): When setting PAR-BEG,
move back only to line beg, don't move back over blank lines.
2011-09-22 Michael Albinus <michael.albinus@gmx.de>
* files.el (copy-directory): Set directory attributes only in case
...
...
lisp/textmodes/paragraphs.el
View file @
8f098516
...
...
@@ -456,21 +456,25 @@ sentences. Also, every paragraph boundary terminates sentences as well."
(sentence-end (sentence-end)))
(while (< arg 0)
(let ((pos (point))
;; We used to use (start-of-paragraph-text), but this can
;; prevent sentence-end from matching if it is anchored at
;; BOL and the paragraph starts indented.
(par-beg (save-excursion (backward-paragraph) (point))))
(if (and (re-search-backward sentence-end par-beg t)
(or (< (match-end 0) pos)
(re-search-backward sentence-end par-beg t)))
(goto-char (match-end 0))
(goto-char par-beg)))
(par-beg
(save-excursion
(start-of-paragraph-text)
;; Move PAR-BEG back over indentation
;; to allow s1entence-end to match if it is anchored at
;; BOL and the paragraph starts indented.
(beginning-of-line)
(point))))
(if (and (re-search-backward sentence-end par-beg t)
(or (< (match-end 0) pos)
(re-search-backward sentence-end par-beg t)))
(goto-char (match-end 0))
(goto-char par-beg)))
(setq arg (1+ arg)))
(while (> arg 0)
(let ((par-end (save-excursion (end-of-paragraph-text) (point))))
(if (re-search-forward sentence-end par-end t)
(skip-chars-backward "
\t\n
")
(goto-char par-end)))
(if (re-search-forward sentence-end par-end t)
(skip-chars-backward "
\t\n
")
(goto-char par-end)))
(setq arg (1- arg)))
(constrain-to-field nil opoint t)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment