]> code.delx.au - gnu-emacs/blobdiff - lisp/help-fns.el
(cua-mode, cua-enable-register-prefix, cua-enable-cua-keys, cua-use-hyper-key,
[gnu-emacs] / lisp / help-fns.el
index 9231f959c644c674d548844224246ee30af42f42..93c34af7a5cc2199110963a70772f8d96326008f 100644 (file)
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -65,8 +65,6 @@ With ARG, you are asked to choose which language."
       (insert-file-contents (expand-file-name filename data-directory))
       (hack-local-variables)
       (goto-char (point-min))
-      ;; The first line conventionally contains the title.
-      (delete-region (point) (progn (forward-line 1) (point)))
       (search-forward "\n<<")
       (beginning-of-line)
       ;; Convert the <<...>> line to the proper [...] line,
@@ -219,14 +217,14 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
                        (intern (upcase name))))))
                arglist)))
 
-;;; Could be this, if we make symbol-file do the work below.
-;;; (defun help-C-file-name (subr-or-var kind)
-;;;   "Return the name of the C file where SUBR-OR-VAR is defined.
-;;; KIND should be `var' for a variable or `subr' for a subroutine."
-;;;   (symbol-file (if (symbolp subr-or-var) subr-or-var
-;;;             (subr-name subr-or-var))
-;;;           (if (eq kind 'var) 'defvar 'defun)))
-
+;; Could be this, if we make symbol-file do the work below.
+;; (defun help-C-file-name (subr-or-var kind)
+;;   "Return the name of the C file where SUBR-OR-VAR is defined.
+;; KIND should be `var' for a variable or `subr' for a subroutine."
+;;   (symbol-file (if (symbolp subr-or-var) subr-or-var
+;;              (subr-name subr-or-var))
+;;            (if (eq kind 'var) 'defvar 'defun)))
+;;;###autoload
 (defun help-C-file-name (subr-or-var kind)
   "Return the name of the C file where SUBR-OR-VAR is defined.
 KIND should be `var' for a variable or `subr' for a subroutine."
@@ -277,9 +275,9 @@ face (according to `face-differs-from-default-p')."
                    ;; This is heuristic, but covers all common cases
                    ;; except ARG1-ARG2
                    (concat "\\<"                   ; beginning of word
-                           "\\(?:[a-z-]+-\\)?"     ; for xxx-ARG
+                           "\\(?:[a-z-]*-\\)?"     ; for xxx-ARG
                            "\\("
-                           arg
+                           (regexp-quote arg)
                            "\\)"
                            "\\(?:es\\|s\\|th\\)?"  ; for ARGth, ARGs
                            "\\(?:-[a-z-]+\\)?"     ; for ARG-xxx
@@ -537,7 +535,9 @@ it is displayed along with the global value."
                (terpri)
                (let ((from (point)))
                  (pp val)
-                 (help-xref-on-pp from (point))
+                 ;; Hyperlinks in variable's value are quite frequently
+                 ;; inappropriate e.g C-h v <RET> features <RET>
+                 ;; (help-xref-on-pp from (point))
                  (if (< (point) (+ from 20))
                      (delete-region (1- from) from)))))
            (terpri)
@@ -558,7 +558,8 @@ it is displayed along with the global value."
                    ;; sensible size before prettyprinting.  -- fx
                    (let ((from (point)))
                      (pp val)
-                     (help-xref-on-pp from (point))
+                     ;; See previous comment for this function.
+                     ;; (help-xref-on-pp from (point))
                      (if (< (point) (+ from 20))
                        (delete-region (1- from) from))))))
              (terpri))
@@ -714,5 +715,5 @@ BUFFER should be a buffer or a buffer name."
 
 (provide 'help-fns)
 
-;;; arch-tag: 9e10331c-ae81-4d13-965d-c4819aaab0b3
+;; arch-tag: 9e10331c-ae81-4d13-965d-c4819aaab0b3
 ;;; help-fns.el ends here