summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2001-02-15 05:00:37 +0000
committerMiles Bader <miles@gnu.org>2001-02-15 05:00:37 +0000
commit126f5d4d57d4dca1b2100268b9c95b07efa1c37f (patch)
tree2d31cbeb0b833e488b44096c05ce3760b7946d41
parent3becc0163d0c8155e21e7a8e1df100960de18f9f (diff)
downloademacs-126f5d4d57d4dca1b2100268b9c95b07efa1c37f.tar.gz
(Info-copy-current-node-name): New function.
(Info-mode-menu): Add it to the menu.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/info.el20
2 files changed, 24 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f6e1a0b58c0..084022ba6a1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-15 Miles Bader <miles@gnu.org>
+
+ * info.el (Info-copy-current-node-name): New function.
+ (Info-mode-menu): Add it to the menu.
+
2001-02-14 Richard M. Stallman <rms@theobromine.ai.mit.edu>
* international/mule-cmds.el (toggle-input-method): Doc fix.
diff --git a/lisp/info.el b/lisp/info.el
index b1a1faa4cea..48af18ec6a4 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1,6 +1,6 @@
;;; info.el --- info package for Emacs.
-;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software
+;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software
;; Foundation, Inc.
;; Maintainer: FSF
@@ -2094,6 +2094,8 @@ If no reference to follow, moves to the next node, or up if none."
:help "Look for another occurrence of previous item"])
["Edit" Info-edit :help "Edit contents of this node"
:active Info-enable-edit]
+ ["Copy Node Name" Info-copy-current-node-name
+ :help "Copy the name of the current node into the kill ring"]
["Exit" Info-exit :help "Stop reading Info"]))
@@ -2181,6 +2183,22 @@ If no reference to follow, moves to the next node, or up if none."
(error (ding))))
+(defun Info-copy-current-node-name ()
+ "Put the name of the current info node into the kill ring.
+The name of the info file is prepended to the node name in parentheses."
+ (interactive)
+ (unless Info-current-node
+ (error "No current info node"))
+ (kill-new
+ (concat "("
+ (file-name-nondirectory
+ (if (stringp Info-current-file)
+ Info-current-file
+ (or buffer-file-name "")))
+ ")"
+ Info-current-node)))
+
+
;; Info mode is suitable only for specially formatted data.
(put 'Info-mode 'mode-class 'special)