Mercurial > emacs
changeset 36092:bf55849c91fb
(Info-copy-current-node-name): New function.
(Info-mode-menu): Add it to the menu.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 15 Feb 2001 05:00:10 +0000 |
parents | 9dc1ae87ded3 |
children | b34680155c90 |
files | lisp/info.el |
diffstat | 1 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/info.el Thu Feb 15 00:14:17 2001 +0000 +++ b/lisp/info.el Thu Feb 15 05:00:10 2001 +0000 @@ -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 @@ :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 @@ (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)