Mercurial > emacs
comparison lisp/skeleton.el @ 17515:62b47fab94fd
(skeleton-read): Fix previous change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 20 Apr 1997 01:37:09 +0000 |
parents | f0fc645756a3 |
children | 9ba1f7641826 |
comparison
equal
deleted
inserted
replaced
17514:335bd3dea3ea | 17515:62b47fab94fd |
---|---|
319 (goto-char beg) | 319 (goto-char beg) |
320 (recenter 0))) | 320 (recenter 0))) |
321 (if skeleton-point | 321 (if skeleton-point |
322 (goto-char skeleton-point)))))) | 322 (goto-char skeleton-point)))))) |
323 | 323 |
324 (defun skeleton-read (PROMPT &optional initial-input recursive) | 324 (defun skeleton-read (prompt &optional initial-input recursive) |
325 "Function for reading a string from the minibuffer within skeletons. | 325 "Function for reading a string from the minibuffer within skeletons. |
326 PROMPT may contain a `%s' which will be replaced by `skeleton-subprompt'. | 326 PROMPT may contain a `%s' which will be replaced by `skeleton-subprompt'. |
327 If non-`nil' second arg INITIAL-INPUT or variable `input' is a string or | 327 If non-`nil' second arg INITIAL-INPUT or variable `input' is a string or |
328 cons with index to insert before reading. If third arg RECURSIVE is non-`nil' | 328 cons with index to insert before reading. If third arg RECURSIVE is non-`nil' |
329 i.e. we are handling the iterator of a subskeleton, returns empty string if | 329 i.e. we are handling the iterator of a subskeleton, returns empty string if |
360 (or (null prompt) | 360 (or (null prompt) |
361 (string= prompt "") | 361 (string= prompt "") |
362 (equal prompt initial-input) | 362 (equal prompt initial-input) |
363 (equal prompt (car-safe initial-input)))) | 363 (equal prompt (car-safe initial-input)))) |
364 (signal 'quit t) | 364 (signal 'quit t) |
365 str)) | 365 prompt)) |
366 | 366 |
367 (defun skeleton-internal-list (skeleton &optional str recursive) | 367 (defun skeleton-internal-list (skeleton &optional str recursive) |
368 (let* ((start (save-excursion (beginning-of-line) (point))) | 368 (let* ((start (save-excursion (beginning-of-line) (point))) |
369 (column (current-column)) | 369 (column (current-column)) |
370 (line (buffer-substring start | 370 (line (buffer-substring start |