- (princ (get this-command 'disabled)))
- ;; Keep only the first paragraph of the documentation.
- (save-excursion
- (set-buffer "*Help*")
- (goto-char (point-max))
- (save-excursion
- (princ (or (condition-case ()
- (documentation this-command)
- (error nil))
- "<< not documented >>")))
- (if (search-forward "\n\n" nil t)
- (delete-region (1- (point)) (point-max))
- (goto-char (point-max))))
- (princ "\n\n")
+ (princ (get this-command 'disabled))
+ (princ "It is disabled because new users often find it confusing.\n")
+ (princ "Here's the first part of its description:\n\n")
+ ;; Keep only the first paragraph of the documentation.
+ (with-current-buffer "*Disabled Command*"
+ (goto-char (point-max))
+ (let ((start (point)))
+ (save-excursion
+ (princ (or (condition-case ()
+ (documentation this-command)
+ (error nil))
+ "<< not documented >>")))
+ (if (search-forward "\n\n" nil t)
+ (delete-region (match-beginning 0) (point-max)))
+ (goto-char (point-max))
+ (indent-rigidly start (point) 3))))
+ (princ "\n\nDo you want to use this command anyway?\n\n")