Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9f78d51a
Commit
9f78d51a
authored
Jan 05, 2000
by
Dave Love
Browse files
(text-mode): Remove page-delimiter's `^' from paragraph-start.
(paragraph-indent-minor-mode): New command.
parent
3cc9d384
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
lisp/textmodes/text-mode.el
lisp/textmodes/text-mode.el
+16
-0
No files found.
lisp/textmodes/text-mode.el
View file @
9f78d51a
...
...
@@ -79,6 +79,8 @@ Turning on Text mode runs the normal hook `text-mode-hook'."
(
set-syntax-table
text-mode-syntax-table
)
(
make-local-variable
'paragraph-start
)
(
setq
paragraph-start
(
concat
page-delimiter
"\\|[ \t]*$"
))
(
if
(
eq
?^
(
aref
paragraph-start
0
))
(
setq
paragraph-start
(
substring
paragraph-start
1
)))
(
make-local-variable
'paragraph-separate
)
(
setq
paragraph-separate
paragraph-start
)
(
make-local-variable
'indent-line-function
)
...
...
@@ -91,6 +93,7 @@ Turning on Text mode runs the normal hook `text-mode-hook'."
"Major mode for editing text, with leading spaces starting a paragraph.
In this mode, you do not need blank lines between paragraphs
when the first line of the following paragraph starts with whitespace.
`paragraph-indent-minor-mode' provides a similar facility as a minor mode.
Special commands:
\\{text-mode-map}
Turning on Paragraph-Indent Text mode runs the normal hooks
...
...
@@ -103,6 +106,19 @@ Turning on Paragraph-Indent Text mode runs the normal hooks
(
setq
local-abbrev-table
text-mode-abbrev-table
)
(
set-syntax-table
text-mode-syntax-table
)
(
run-hooks
'text-mode-hook
'paragraph-indent-text-mode-hook
))
(
defun
paragraph-indent-minor-mode
()
"Minor mode for editing text, with leading spaces starting a paragraph.
In this mode, you do not need blank lines between paragraphs when the
first line of the following paragraph starts with whitespace, as with
`paragraph-indent-mode'.
Turning on Paragraph-Indent minor mode runs the normal hook
`paragraph-indent-text-mode-hook'."
(
interactive
)
(
set
(
make-local-variable
'paragraph-start
)
(
default-value
'paragraph-start
))
(
set
(
make-local-variable
'paragraph-separate
)
paragraph-start
)
(
run-hooks
'paragraph-indent-text-mode-hook
))
(
defalias
'indented-text-mode
'text-mode
)
...
...
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