GNU Info

Info Node: (emacs-lisp-intro.info)narrow Exercise

(emacs-lisp-intro.info)narrow Exercise


Prev: what-line Up: Narrowing & Widening
Enter node , (file) or (file)node

Exercise with Narrowing
=======================

   Write a function that will display the first 60 characters of the
current buffer, even if you have narrowed the buffer to its latter half
so that the first line is inaccessible.  Restore point, mark, and
narrowing.  For this exercise, you need to use `save-restriction',
`widen', `goto-char', `point-min', `buffer-substring', `message', and
other functions, a whole potpourri.


automatically generated by info2www version 1.2.2.9