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
61f7096c
Commit
61f7096c
authored
Aug 31, 2010
by
Chong Yidong
Browse files
* textmodes/nroff-mode.el (nroff-view): New command.
(nroff-mode-map): Bind it to C-c C-c.
parent
07fa68a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/textmodes/nroff-mode.el
lisp/textmodes/nroff-mode.el
+15
-0
No files found.
lisp/ChangeLog
View file @
61f7096c
2010-08-31 Masatake YAMATO <yamato@redhat.com>
* textmodes/nroff-mode.el (nroff-view): New command.
(nroff-mode-map): Bind it to C-c C-c.
2010-08-31 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/smie.el (smie-down-list): New command.
...
...
lisp/textmodes/nroff-mode.el
View file @
61f7096c
...
...
@@ -55,6 +55,7 @@
(
define-key
map
"\n"
'nroff-electric-newline
)
(
define-key
map
"\en"
'nroff-forward-text-line
)
(
define-key
map
"\ep"
'nroff-backward-text-line
)
(
define-key
map
"\C-c\C-c"
'nroff-view
)
(
define-key
map
[menu-bar
nroff-mode]
(
cons
"Nroff"
menu-map
))
(
define-key
menu-map
[nn]
'
(
menu-item
"Newline"
nroff-electric-newline
...
...
@@ -73,6 +74,9 @@
nroff-electric-mode
:help
"Auto insert closing requests if necessary"
:button
(
:toggle
.
nroff-electric-mode
)))
(
define-key
menu-map
[npm]
'
(
menu-item
"Preview as man page"
nroff-view
:help
"Run man on this file."
))
map
)
"Major mode keymap for `nroff-mode'."
)
...
...
@@ -301,6 +305,17 @@ turns it on if arg is positive, otherwise off."
:lighter
" Electric"
(
or
(
derived-mode-p
'nroff-mode
)
(
error
"Must be in nroff mode"
)))
(
declare-function
Man-getpage-in-background
"man"
(
topic
))
(
defun
nroff-view
()
"Run man on this file."
(
interactive
)
(
require
'man
)
(
let*
((
file
(
buffer-file-name
)))
(
if
file
(
Man-getpage-in-background
file
)
(
error
"No associated file for the current buffer"
))))
;; Old names that were not namespace clean.
(
define-obsolete-function-alias
'count-text-lines
'nroff-count-text-lines
"22.1"
)
(
define-obsolete-function-alias
'forward-text-line
'nroff-forward-text-line
"22.1"
)
...
...
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