;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2011
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2012
;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; so let's skip over it
(search-backward "(")
(goto-char (scan-sexps (point) 1)))))
- ;; Highlight aguments in the USAGE string
+ ;; Highlight arguments in the USAGE string
(setq usage (help-do-arg-highlight (buffer-string) args))
;; Highlight arguments in the DOC string
(setq doc (and doc (help-do-arg-highlight doc args))))))
(if (member (event-modifiers (aref key 0)) '(nil (shift)))
(push key non-modified-keys)))
(when remapped
- (princ "It is remapped to `")
+ (princ "Its keys are remapped to `")
(princ (symbol-name remapped))
- (princ "'"))
+ (princ "'.\n"))
(when keys
- (princ (if remapped ", which is bound to " "It is bound to "))
+ (princ (if remapped
+ "Without this remapping, it would be bound to "
+ "It is bound to "))
;; If lots of ordinary text characters run this command,
;; don't mention them one by one.
(if (< (length non-modified-keys) 10)
(with-current-buffer standard-output
(setq val-start-pos (point))
(princ "value is ")
- (let ((from (point)))
- (terpri)
- (pp val)
- (if (< (point) (+ 68 (line-beginning-position 0)))
- (delete-region from (1+ from))
- (delete-region (1- from) from))
+ (let ((from (point))
+ (line-beg (line-beginning-position))
+ ;;
+ (print-rep
+ (let ((print-quoted t))
+ (prin1-to-string val))))
+ (if (< (+ (length print-rep) (point) (- line-beg)) 68)
+ (insert print-rep)
+ (terpri)
+ (pp val)
+ (if (< (point) (+ 68 (line-beginning-position 0)))
+ (delete-region from (1+ from))
+ (delete-region (1- from) from)))
(let* ((sv (get variable 'standard-value))
(origval (and (consp sv)
(condition-case nil