Last active
August 29, 2015 14:21
-
-
Save YoungFrog/d7db1fb00e30ef93e9d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((buf (get-buffer-create "*scratch*")) | |
(text "\n;; ===\n")) | |
(when (get-buffer-window buf) | |
(message "Buffer is shown in some window")) | |
(with-current-buffer buf | |
(message "p/pm: %s/%s" (point) (point-max)) | |
(if (eq (point) (point-max)) | |
(insert text) | |
(save-excursion | |
(goto-char (point-max)) | |
(insert text))) | |
(message "p/pm: %s/%s" (point) (point-max)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment