Commit d365421f authored by Gerd Moellmann's avatar Gerd Moellmann

(describe-variable): Don't insert a second `'s' in front

of the string `value is shown below'.  Since the syntax-table to
emacs-lisp-mode-syntax-table makes forward-sexp skip over an
existing `'s', so that this won't be deleted.
parent 0b431deb
...@@ -847,13 +847,16 @@ Returns the documentation as a string, also." ...@@ -847,13 +847,16 @@ Returns the documentation as a string, also."
(set-buffer standard-output) (set-buffer standard-output)
(if (> (count-lines (point-min) (point-max)) 10) (if (> (count-lines (point-min) (point-max)) 10)
(progn (progn
;; Note that setting the syntax table like below
;; makes forward-sexp move over a `'s' at the end
;; of a symbol.
(set-syntax-table emacs-lisp-mode-syntax-table) (set-syntax-table emacs-lisp-mode-syntax-table)
(goto-char (point-min)) (goto-char (point-min))
(if valvoid (if valvoid
(forward-line 1) (forward-line 1)
(forward-sexp 1) (forward-sexp 1)
(delete-region (point) (progn (end-of-line) (point))) (delete-region (point) (progn (end-of-line) (point)))
(insert "'s value is shown below.\n\n") (insert " value is shown below.\n\n")
(save-excursion (save-excursion
(insert "\n\nValue:")))))) (insert "\n\nValue:"))))))
(princ "Documentation:") (princ "Documentation:")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment