From 6eec90631408fc69b0052c521369026d2635ca49 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Jun 2007 03:01:08 +0000 Subject: [PATCH 01/14] * image-mode.el (image-forward-hscroll, image-backward-hscroll) (image-next-line, image-previous-line, image-scroll-up) (image-scroll-down, image-bol, image-eol, image-bob, image-eob): New functions. (image-mode-map): Remap motion commands. (image-mode-text-map): New keymap for viewing images as text. (image-mode): Use image-mode-map. (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps. --- lisp/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79fb349d949..3e7b4885e78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2007-06-08 Chong Yidong + + * image-mode.el (image-forward-hscroll, image-backward-hscroll) + (image-next-line, image-previous-line, image-scroll-up) + (image-scroll-down, image-bol, image-eol, image-bob, image-eob): + New functions. + (image-mode-map): Remap motion commands. + (image-mode-text-map): New keymap for viewing images as text. + (image-mode): Use image-mode-map. + (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps. + 2007-06-07 Michael Albinus Sync with Tramp 2.0.56. From 736697e013c480f1c902e36144ae3b124e4df6fc Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Jun 2007 03:01:25 +0000 Subject: [PATCH 02/14] (image-forward-hscroll, image-backward-hscroll) (image-next-line, image-previous-line, image-scroll-up) (image-scroll-down, image-bol, image-eol, image-bob, image-eob): New functions. (image-mode-map): Remap motion commands. (image-mode-text-map): New keymap for viewing images as text. (image-mode): Use image-mode-map. (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps. --- lisp/image-mode.el | 158 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 156 insertions(+), 2 deletions(-) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index eb08de1d6bb..18246b8dc90 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -43,11 +43,160 @@ ;;;###autoload (push '("\\.p[bpgn]m\\'" . image-mode) auto-mode-alist) ;;;###autoload (push '("\\.x[bp]m\\'" . image-mode-maybe) auto-mode-alist) +;;; Image scrolling functions + +(defun image-forward-hscroll (&optional n) + "Scroll image in current window to the left by N character widths. +Stop if the right edge of the image is reached." + (interactive "p") + (cond ((= n 0) nil) + ((< n 0) + (set-window-hscroll nil (max 0 (+ (window-hscroll) n)))) + (t + (let* ((image (get-text-property 1 'display)) + (img-width (ceiling (car (image-size image)))) + (edges (window-inside-edges)) + (win-width (- (nth 2 edges) (nth 0 edges)))) + (set-window-hscroll nil + (min (max 0 (- img-width win-width)) + (+ n (window-hscroll)))))))) + +(defun image-backward-hscroll (&optional n) + "Scroll image in current window to the right by N character widths. +Stop if the left edge of the image is reached." + (interactive "p") + (image-forward-hscroll (- n))) + +(defun image-next-line (&optional n) + "Scroll image in current window upward by N lines. +Stop if the bottom edge of the image is reached." + (interactive "p") + (cond ((= n 0) nil) + ((< n 0) + (set-window-vscroll nil (max 0 (+ (window-vscroll) n)))) + (t + (let* ((image (get-text-property 1 'display)) + (img-height (ceiling (cdr (image-size image)))) + (edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (set-window-vscroll nil + (min (max 0 (- img-height win-height)) + (+ n (window-vscroll)))))))) + +(defun image-previous-line (&optional n) + "Scroll image in current window downward by N lines. +Stop if the top edge of the image is reached." + (interactive "p") + (image-next-line (- n))) + +(defun image-scroll-up (&optional n) + "Scroll image in current window upward by N lines. +Stop if the bottom edge of the image is reached. +If ARG is omitted or nil, scroll upward by a near full screen. +A near full screen is `next-screen-context-lines' less than a full screen. +Negative ARG means scroll downward. +If ARG is the atom `-', scroll downward by nearly full screen. +When calling from a program, supply as argument a number, nil, or `-'." + (interactive "P") + (cond ((null n) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (max 0 (- win-height next-screen-context-lines))))) + ((eq n '-) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (min 0 (- next-screen-context-lines win-height))))) + (t (image-next-line (prefix-numeric-value n))))) + +(defun image-scroll-down (&optional n) + "Scroll image in current window downward by N lines +Stop if the top edge of the image is reached. +If ARG is omitted or nil, scroll downward by a near full screen. +A near full screen is `next-screen-context-lines' less than a full screen. +Negative ARG means scroll upward. +If ARG is the atom `-', scroll upward by nearly full screen. +When calling from a program, supply as argument a number, nil, or `-'." + (interactive "P") + (cond ((null n) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (min 0 (- next-screen-context-lines win-height))))) + ((eq n '-) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (max 0 (- win-height next-screen-context-lines))))) + (t (image-next-line (- (prefix-numeric-value n)))))) + +(defun image-bol (arg) + "Scroll horizontally to the left edge of the image in the current window. +With argument ARG not nil or 1, move forward ARG - 1 lines first, +stopping if the top or bottom edge of the image is reached." + (interactive "p") + (and arg + (/= (setq arg (prefix-numeric-value arg)) 1) + (image-next-line (- arg 1))) + (set-window-hscroll (selected-window) 0)) + +(defun image-eol (arg) + "Scroll horizontally to the right edge of the image in the current window. +With argument ARG not nil or 1, move forward ARG - 1 lines first, +stopping if the top or bottom edge of the image is reached." + (interactive "p") + (and arg + (/= (setq arg (prefix-numeric-value arg)) 1) + (image-next-line (- arg 1))) + (let* ((image (get-text-property 1 'display)) + (edges (window-inside-edges)) + (win-width (- (nth 2 edges) (nth 0 edges))) + (img-width (ceiling (car (image-size image))))) + (set-window-hscroll (selected-window) + (max 0 (- img-width win-width))))) + +(defun image-bob () + "Scroll to the top-left corner of the image in the current window." + (interactive) + (set-window-hscroll (selected-window) 0) + (set-window-vscroll (selected-window) 0)) + +(defun image-eob () + "Scroll to the bottom-right corner of the image in the current window." + (interactive) + (let* ((image (get-text-property 1 'display)) + (edges (window-inside-edges)) + (win-width (- (nth 2 edges) (nth 0 edges))) + (img-width (ceiling (car (image-size image)))) + (win-height (- (nth 3 edges) (nth 1 edges))) + (img-height (ceiling (cdr (image-size image))))) + (set-window-hscroll (selected-window) (max 0 (- img-width win-width))) + (set-window-vscroll (selected-window) (max 0 (- img-height win-height))))) + +;;; Image Mode setup + (defvar image-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-c\C-c" 'image-toggle-display) + (define-key map [remap forward-char] 'image-forward-hscroll) + (define-key map [remap backward-char] 'image-backward-hscroll) + (define-key map [remap previous-line] 'image-previous-line) + (define-key map [remap next-line] 'image-next-line) + (define-key map [remap scroll-up] 'image-scroll-up) + (define-key map [remap scroll-down] 'image-scroll-down) + (define-key map [remap move-beginning-of-line] 'image-bol) + (define-key map [remap move-end-of-line] 'image-eol) + (define-key map [remap beginning-of-buffer] 'image-bob) + (define-key map [remap end-of-buffer] 'image-eob) map) - "Major mode keymap for Image mode.") + "Major mode keymap for viewing images in Image mode.") + +(defvar image-mode-text-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-c" 'image-toggle-display) + map) + "Major mode keymap for viewing images as text in Image mode.") ;;;###autoload (defun image-mode () @@ -58,13 +207,13 @@ to toggle between display as an image and display as text." (kill-all-local-variables) (setq mode-name "Image") (setq major-mode 'image-mode) - (use-local-map image-mode-map) (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) (if (and (display-images-p) (not (get-text-property (point-min) 'display))) (image-toggle-display) ;; Set next vars when image is already displayed but local ;; variables were cleared by kill-all-local-variables + (use-local-map image-mode-map) (setq cursor-type nil truncate-lines t)) (run-mode-hooks 'image-mode-hook) (if (display-images-p) @@ -140,6 +289,8 @@ and showing the image as an image." (set-buffer-modified-p modified) (kill-local-variable 'cursor-type) (kill-local-variable 'truncate-lines) + (kill-local-variable 'auto-hscroll-mode) + (use-local-map image-mode-text-map) (if (called-interactively-p) (message "Repeat this command to go back to displaying the image"))) ;; Turn the image data into a real image, but only if the whole file @@ -177,6 +328,9 @@ and showing the image as an image." ;; This just makes the arrow displayed in the right fringe ;; area look correct when the image is wider than the window. (setq truncate-lines t) + ;; Allow navigation of large images + (set (make-local-variable 'auto-hscroll-mode) nil) + (use-local-map image-mode-map) (if (called-interactively-p) (message "Repeat this command to go back to displaying the file as text"))))) From f67c1e14c0ab3c7395181054b62c15c862b84a5f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Jun 2007 03:04:22 +0000 Subject: [PATCH 03/14] ** In Image mode, whenever the displayed image is wider and/or higher than the window, the usual keys for moving the cursor cause the image to be scrolled horizontally or vertically instead. --- etc/NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 192025606f5..1dd73170408 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -42,6 +42,10 @@ Some specific packages that are known to cause problems are: have been changed to `top'. This means that the user is asked once, before deleting/copying the indicated directory recursively. +** In Image mode, whenever the displayed image is wider and/or higher +than the window, the usual keys for moving the cursor cause the image +to be scrolled horizontally or vertically instead. + * New Modes and Packages in Emacs 22.2 ** The new package css-mode.el provides a major mode for editing CSS files. From b258555dcbe1a4673c2ba8c1cc6c4d3f87015068 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 9 Jun 2007 00:13:10 +0000 Subject: [PATCH 04/14] (desktop-minor-mode-table): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/desktop.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3e7b4885e78..1fb3fc380df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-09 Davis Herring + + * desktop.el (desktop-minor-mode-table): Doc fix. + 2007-06-08 Chong Yidong * image-mode.el (image-forward-hscroll, image-backward-hscroll) diff --git a/lisp/desktop.el b/lisp/desktop.el index 92f6a448574..e44e943db3e 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -423,7 +423,7 @@ Furthermore the major mode function must be autoloaded.") Each entry has the form (NAME RESTORE-FUNCTION). NAME is the name of the buffer-local variable indicating that the minor mode is active. RESTORE-FUNCTION is the function to activate the minor mode. -called. RESTORE-FUNCTION nil means don't try to restore the minor mode. +RESTORE-FUNCTION nil means don't try to restore the minor mode. Only minor modes for which the name of the buffer-local variable and the name of the minor mode function are different have to be added to this table. See also `desktop-minor-mode-handlers'." From 6a29399e7446ac33514d7d518bb2278450fc2cfb Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 9 Jun 2007 12:54:46 +0000 Subject: [PATCH 05/14] (rmail-movemail-variant-in-use): Fix doc typo. --- lisp/ChangeLog | 4 ++++ lisp/mail/rmail.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fb3fc380df..569064d7910 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-09 Alfred M. Szmidt (tiny change) + + * mail/rmail.el (rmail-movemail-variant-in-use): Fix doc typo. + 2007-06-09 Davis Herring * desktop.el (desktop-minor-mode-table): Doc fix. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 13aba1a3fb0..2a2f0355ab2 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -228,7 +228,7 @@ Otherwise, look for `movemail' in the directories in `emacs' Means any implementation, compatible with the native Emacs one. This is the default; `mailutils' Means GNU mailutils implementation, capable of handling full -mail URLs as the source mailbox;") +mail URLs as the source mailbox.") ;;;###autoload (defun rmail-movemail-variant-p (&rest variants) From f9de989afe81556afb49d655a8b7bda179e6c4e2 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 10 Jun 2007 23:29:37 +0000 Subject: [PATCH 06/14] (Fx_file_dialog): Take size from struct not pointer. --- src/ChangeLog | 4 ++++ src/w32fns.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5e53763932a..7085858eccb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-06-10 Jason Rumney + + * w32fns.c (Fx_file_dialog): Take size from struct not pointer. + 2007-06-06 Jason Rumney * s/ms-w32.h: Don't define HAVE_TZNAME. diff --git a/src/w32fns.c b/src/w32fns.c index 8cac4ea2376..fd8df29affa 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -7902,9 +7902,9 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) /* Apparently NT4 crashes if you give it an unexpected size. I'm not sure about Windows 9x, so play it safe. */ if (w32_major_version > 4 && w32_major_version < 95) - file_details->lStructSize = sizeof (new_file_details); + file_details->lStructSize = sizeof (NEWOPENFILENAME); else - file_details->lStructSize = sizeof (file_details); + file_details->lStructSize = sizeof (OPENFILENAME); file_details->hwndOwner = FRAME_W32_WINDOW (f); /* Undocumented Bug in Common File Dialog: From f0fc85830bcfcbfdba13f4f83bf3897f19d9926c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 11 Jun 2007 05:12:38 +0000 Subject: [PATCH 07/14] (custom-variable-type): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/cus-edit.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 569064d7910..f5b63f37570 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-11 Richard Stallman + + * cus-edit.el (custom-variable-type): Doc fix. + 2007-06-09 Alfred M. Szmidt (tiny change) * mail/rmail.el (rmail-movemail-variant-in-use): Fix doc typo. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 4dae3bab018..0984fc73e43 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2500,7 +2500,8 @@ However, setting it through Custom sets the default value.") (defun custom-variable-type (symbol) "Return a widget suitable for editing the value of SYMBOL. If SYMBOL has a `custom-type' property, use that. -Otherwise, look up symbol in `custom-guess-type-alist'." +Otherwise, try matching SYMBOL against `custom-guess-name-alist' and +try matching its doc string against `custom-guess-doc-alist'." (let* ((type (or (get symbol 'custom-type) (and (not (get symbol 'standard-value)) (custom-guess-type symbol)) From 3a07a00bbf3ae87a87ae54a0336f574b67d45da9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 11 Jun 2007 15:46:12 +0000 Subject: [PATCH 08/14] Add a bug about hi-lock-mode and font-lock-mode. Fix encoding of some nonascii chars. --- admin/FOR-RELEASE | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 2fceaee33cf..fe226fc7d9e 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -12,10 +12,10 @@ make sure all the pages really look ok in the manual as formatted. Requests to have been sent out on 2006-05-23 (Reiner Steib). LANG Translator Status -cs Pavel Janík Can't work on it now. +cs Pavel Janík Can't work on it now. de Sven Joachim Done fr Eric Jacoboni Done -pl WÅ‚odek Bzyl Done +pl WÅ‚odek Bzyl Done pt-br Rodrigo Real Done ru Alex Ott Done sk Miroslav VaÅ¡ko No response @@ -36,6 +36,32 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. * BUGS +** hi-lock-mode doesn't always turn on font-lock-mode-internal + +From: Alan Mackenzie +Subject: hi-lock-mode doesn't work with emacs -Q. +Message-ID: <20070607092651.GA1710@muc.de> + +Start emacs -Q. (Emacs 22.1, of course). Visit a new file with: + + C-x C-f foo.txt + +. Type this: + + This file is foo.txt. + +. Enable hi-lock-mode and make "foo" a highlightable pattern: + + M-x hi-lock-mode + C-x w h foo ; accept the default hi-yellow face. + +. This highlights the "foo" yellow, as expected. At the end of the +line, type: + + foo + +. This new "foo" doesn't get highlighted. It should be. + * FIXES FOR EMACS 22.2 Here we list small fixes that arrived too late for Emacs 22.1, but @@ -62,7 +88,7 @@ SECTION READERS etc/TUTORIAL rms etc/TUTORIAL.bg Ognyan Kulev etc/TUTORIAL.cn -etc/TUTORIAL.cs Pavel Janík +etc/TUTORIAL.cs Pavel Janík etc/TUTORIAL.de Werner LEMBERG etc/TUTORIAL.eo etc/TUTORIAL.es Marcelo Toledo @@ -75,7 +101,7 @@ etc/TUTORIAL.pl Slawomir Nowaczyk etc/TUTORIAL.pt_BR Marcelo Toledo etc/TUTORIAL.ro etc/TUTORIAL.ru Alex Ott -etc/TUTORIAL.sk Pavel Janík +etc/TUTORIAL.sk Pavel Janík etc/TUTORIAL.sl Primoz PETERLIN etc/TUTORIAL.sv Mats Lidell etc/TUTORIAL.th Virach Sornlertlamvanich From 72fa3278be1baf255a3027229e28d3574f17601e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 11 Jun 2007 21:57:11 +0000 Subject: [PATCH 09/14] (font-lock-add-keywords): In case font-lock was only half-activated, forcefully activate it completely. --- admin/FOR-RELEASE | 26 -------------------------- lisp/ChangeLog | 5 +++++ lisp/font-lock.el | 8 ++++++++ 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index fe226fc7d9e..0f8bd0c4420 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -36,32 +36,6 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. * BUGS -** hi-lock-mode doesn't always turn on font-lock-mode-internal - -From: Alan Mackenzie -Subject: hi-lock-mode doesn't work with emacs -Q. -Message-ID: <20070607092651.GA1710@muc.de> - -Start emacs -Q. (Emacs 22.1, of course). Visit a new file with: - - C-x C-f foo.txt - -. Type this: - - This file is foo.txt. - -. Enable hi-lock-mode and make "foo" a highlightable pattern: - - M-x hi-lock-mode - C-x w h foo ; accept the default hi-yellow face. - -. This highlights the "foo" yellow, as expected. At the end of the -line, type: - - foo - -. This new "foo" doesn't get highlighted. It should be. - * FIXES FOR EMACS 22.2 Here we list small fixes that arrived too late for Emacs 22.1, but diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5b63f37570..41c902b9a86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-06-11 Stefan Monnier + + * font-lock.el (font-lock-add-keywords): In case font-lock was only + half-activated, forcefully activate it completely. + 2007-06-11 Richard Stallman * cus-edit.el (custom-variable-type): Doc fix. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index c826a5f20c6..265cc4bf682 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -698,6 +698,14 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', ;; contain the new keywords. (font-lock-update-removed-keyword-alist mode keywords how)) (t + (when (and font-lock-mode + (not (or font-lock-keywords font-lock-defaults))) + ;; The major mode has not set any keywords, so when we enabled + ;; font-lock-mode it only enabled the font-core.el part, not the + ;; font-lock-mode-internal. Try again. + (font-lock-mode -1) + (set (make-local-variable 'font-lock-defaults) '(nil t)) + (font-lock-mode 1)) ;; Otherwise set or add the keywords now. ;; This is a no-op if it has been done already in this buffer ;; for the correct major mode. From 1d42f49396420ca0d0d246e7122a882e49a635c9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 12 Jun 2007 23:55:58 +0000 Subject: [PATCH 10/14] * scroll-lock.el (scroll-lock-mode): Doc fix. --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41c902b9a86..e6391ddf708 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-12 Ralf Angeli + + * scroll-lock.el (scroll-lock-mode): Doc fix. + 2007-06-11 Stefan Monnier * font-lock.el (font-lock-add-keywords): In case font-lock was only From c44a951ac97ddf1548aa02ceab779eedaeb70728 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 12 Jun 2007 23:56:10 +0000 Subject: [PATCH 11/14] (scroll-lock-mode): Doc fix. --- lisp/scroll-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el index 7075377d1b0..5896d6478eb 100644 --- a/lisp/scroll-lock.el +++ b/lisp/scroll-lock.el @@ -50,7 +50,7 @@ ;;;###autoload (define-minor-mode scroll-lock-mode - "Minor mode for pager-like scrolling. + "Buffer-local minor mode for pager-like scrolling. Keys which normally move point by line or paragraph will scroll the buffer by the respective amount of lines instead and point will be kept vertically fixed relative to window boundaries From c85c5553663a946deaf78fed9e74b32bbeca79ac Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 13 Jun 2007 00:45:03 +0000 Subject: [PATCH 12/14] update two-volume material for printing --- lispref/.gitignore | 4 + lispref/ChangeLog | 6 + lispref/two-volume-cross-refs.txt | 76 +- lispref/two-volume.make | 226 ++++++ lispref/vol1.texi | 1069 ++++++++++++++++++++-------- lispref/vol2.texi | 1074 +++++++++++++++++++++-------- 6 files changed, 1821 insertions(+), 634 deletions(-) create mode 100644 lispref/two-volume.make diff --git a/lispref/.gitignore b/lispref/.gitignore index fddb4062824..a149258f6dd 100644 --- a/lispref/.gitignore +++ b/lispref/.gitignore @@ -11,3 +11,7 @@ index.texi elisp elisp-? elisp-?? +vol1.* +vol2.* +elisp1* +elisp2* diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 0e446feb711..e72a3adee74 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,9 @@ +2007-06-12 Karl Berry + + * vol1.texi, vol2.texi, two-volume-cross-refs.txt: update. + * two-volume.make: new file. + * .cvsignore: ignore two-volume files. + 2007-06-02 Richard Stallman * frames.texi (Color Parameters): Add xref to (emacs)Standard Faces. diff --git a/lispref/two-volume-cross-refs.txt b/lispref/two-volume-cross-refs.txt index 07624f99b49..1e923cab8e6 100644 --- a/lispref/two-volume-cross-refs.txt +++ b/lispref/two-volume-cross-refs.txt @@ -5,7 +5,24 @@ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Two Volume Cross References =========================== -18 March 1992 +12 June 2007 (karl) + +For lispref 2.9 (for Emacs 22, June 2007), I created a very ugly +Makefile, in the file two-volume.make, to encapsulate all the steps +below, without manual intervention. In theory, simply running "make -f +two-volume.make" should create a vol1.pdf and vol2.pdf with all the +niceties worked out. + +One issue not explicitly discussed below is getting page numbers right. +It's not enough to go through the whole process. You have to go through +the whole process twice -- otherwise, some index entries and/or toc +entries will be off by one. See two-volume.make for a few more comments. + +For future editions, it should suffice to update the usual things in +vol[12].texi (as well as elisp.texi). That was my hope, anyway. + + +18 March 1992 (bob) This enables you to create manuals in *two* volumes, with tables of contents, cross references, and indices in each volume referring to @@ -57,23 +74,23 @@ Here are the steps in detail: % cp vol1.aux elisp1-aux % cp vol2.aux elisp2-aux -% cp vol1.aux elisp1-aux-vol-number-added -% cp vol2.aux elisp2-aux-vol-number-added +% cp vol1.aux elisp1-aux-vol-added +% cp vol2.aux elisp2-aux-vol-added on elisp1-aux-vol-number-added -(volume-aux-markup 1) see defun for volum-aux-markup below. -to create elisp1-aux-vol-number-added +(volume-aux-markup 1) see defun for volume-aux-markup below. +to create elisp1-aux-vol-added on elisp2-aux-vol-number-added (volume-aux-markup 2) -to create elisp2-aux-vol-number-added +to create elisp2-aux-vol-added -insert elisp2-aux-vol-number-added into vol1.aux (append) -insert elisp1-aux-vol-number-added into vol2.aux (prepend) +insert elisp2-aux-vol-added into vol1.aux (append) +insert elisp1-aux-vol-added into vol2.aux (prepend) (so you dont have to do it again) -% cp vol1.aux elisp1-aux-2vol-ready -% cp vol2.aux elisp2-aux-2vol-ready +% cp vol1.aux elisp1-aux-ready +% cp vol2.aux elisp2-aux-ready ### Create .fn files with volume numbers for other volume. @@ -166,45 +183,6 @@ Do not change the .texi files; they will call the elisp-toc-2vol.toc file. % tex vol1.texi % tex vol2.texi -================================================================ - -@c ================================================================ -@tex -% Special @contents command -% This inputs fixed up table of contents file rather than create new one. -\global\def\contents{% - \startcontents{Table of Contents}% - \input elisp-toc-2vol.toc - \endgroup - \vfill \eject -} - -% Special @summarycontents command -% This inputs fixed up table of contents file rather than create new one. -\outer\def\summarycontents{% - \startcontents{Short Contents}% - % - \let\chapentry = \shortchapentry - \let\unnumbchapentry = \shortunnumberedentry - % We want a true roman here for the page numbers. - \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl - \rm - \advance\baselineskip by 1pt % Open it up a little. - \def\secentry ##1##2##3##4{} - \def\unnumbsecentry ##1##2{} - \def\subsecentry ##1##2##3##4##5{} - \def\unnumbsubsecentry ##1##2{} - \def\subsubsecentry ##1##2##3##4##5##6{} - \def\unnumbsubsubsecentry ##1##2{} - \input elisp-toc-2vol.toc - \endgroup - \vfill \eject -} -@end tex -@c ================================================================ - - ================================================================ diff --git a/lispref/two-volume.make b/lispref/two-volume.make new file mode 100644 index 00000000000..4b752ab33c4 --- /dev/null +++ b/lispref/two-volume.make @@ -0,0 +1,226 @@ +# Copyright 2007 Free Software Foundation, Inc. +# See end for copying conditions. + +# although it would be nice to use tex rather than pdftex to avoid +# colors, spurious warnings about names being referenced but not +# existing, etc., dvips | ps2pdf doesn't preserve the page size. +# Instead of creating a special dvips config file, put up with the warnings. +tex = pdftex -interaction=nonstopmode + +all: vol1.pdf vol2.pdf + +# vol1.texi and vol2.texi specially define \tocreadfilename so we can +# use our premade .toc's. +# +vol1.pdf: elisp1med-fns-ready elisp1med-aux-ready elisp1med-toc-ready + @echo -e "\f Final TeX run for volume 1..." + cp elisp1med-toc-ready elisp1-toc-ready.toc + cp elisp1med-fns-ready vol1.fns + cp elisp1med-aux-ready vol1.aux + $(tex) vol1.texi +# +vol2.pdf: elisp2med-fns-ready elisp2med-aux-ready elisp2med-toc-ready + @echo "Final TeX run for volume 2..." + cp elisp2med-toc-ready elisp2-toc-ready.toc + cp elisp2med-fns-ready vol2.fns + cp elisp2med-aux-ready vol2.aux + $(tex) vol2.texi + +# intermediate toc files. +# +# vol1 toc: volume 1, page break, volume 2 (with II: prepended). +elisp1med-toc-ready: elisp1med-init elisp2med-init + echo '@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@ + cat elisp1med-toc >>$@ + echo '@page' >>$@ + echo '@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@ + sed 's/{\([^}]*\)}$$/{II:\1}/' elisp2med-toc >>$@ +# +# vol2 toc: volume 1 (with I: prepended), page break, volume 2. +elisp2med-toc-ready: elisp1med-init elisp2med-init + echo '@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@ + sed 's/{\([^}]*\)}$$/{I:\1}/' elisp1med-toc >>$@ + echo '@page' >>$@ + echo '@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@ + cat elisp2med-toc >>$@ + + +# intermediate aux files. +# +# append vol2's fixed aux to normal vol1. +elisp1med-aux-ready: elisp2med-aux-vol-added + cat elisp1med-aux $< >$@ +# +# prepend vol1's fixed aux to vol2. +elisp2med-aux-ready: elisp1med-aux-vol-added + cat $< elisp2med-aux >$@ + +# on -pg entries, append volume number after page number. +elisp1med-aux-vol-added: elisp1med-init + sed 's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie1}/' elisp1med-aux >$@ +# +elisp2med-aux-vol-added: elisp2med-init + sed 's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie2}/' elisp2med-aux >$@ + + + +# intermediate index (fns) file. +# +elisp1med-fns-ready: elisp1med-fn-vol-added elisp2med-fn-vol-added + cat elisp2med-fn-vol-added >>vol1.fn + texindex vol1.fn + cp vol1.fns $@ +# +elisp2med-fns-ready: elisp1med-fn-vol-added elisp2med-fn-vol-added + cat elisp1med-fn-vol-added >>vol2.fn + texindex vol2.fn + cp vol2.fns $@ + +# Insert volume number (I: or II:) into index file. +elisp1med-fn-vol-added: elisp1med-init + cp vol1.fn elisp1med-fn + sed 's/}{/}{I:/' elisp1med-fn >$@ +# +elisp2med-fn-vol-added: elisp2med-init + cp vol2.fn elisp2med-fn + sed 's/}{/}{II:/' elisp2med-fn >$@ + +# ----------------------------------------------------------------------------- +# everything above is essentially a duplicate of everything below. sorry. +# ----------------------------------------------------------------------------- + +# intermediate TeX runs. +# +# this generates what would be the final versions -- except the page +# numbers aren't right. The process of adding the I: and II: changes +# the page breaks, so a few index entries, at least are wrong. (In +# 2007, x-meta-keysym in vol.II ended up on page 374 when the index had +# it on page 375 from the initial run.) +# +# So, we start all over again, from these fns/aux/toc files. +# +elisp1med-init: elisp1-fns-ready elisp1-aux-ready elisp1init-toc-ready texinfo.tex + @echo -e "\f Intermediate TeX run for volume 1..." + cp elisp1init-toc-ready elisp1-toc-ready.toc + cp elisp1-fns-ready vol1.fns + cp elisp1-aux-ready vol1.aux + $(tex) vol1.texi + texindex vol1.?? + mv vol1.aux elisp1med-aux + mv vol1.toc elisp1med-toc +# +elisp2med-init: elisp2-fns-ready elisp2-aux-ready elisp2init-toc-ready texinfo.tex + @echo "Final TeX run for volume 2..." + cp elisp2init-toc-ready elisp2-toc-ready.toc + cp elisp2-fns-ready vol2.fns + cp elisp2-aux-ready vol2.aux + $(tex) vol2.texi + texindex vol2.?? + mv vol2.aux elisp2med-aux + mv vol2.toc elisp2med-toc + + +# initial toc files. +# +# vol1 toc: volume 1, page break, volume 2 (with II: prepended). +elisp1init-toc-ready: elisp1-init elisp2-init + echo '@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@ + cat elisp1-toc >>$@ + echo '@page' >>$@ + echo '@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@ + sed 's/{\([^}]*\)}$$/{II:\1}/' elisp2-toc >>$@ +# +# vol2 toc: volume 1 (with I: prepended), page break, volume 2. +elisp2init-toc-ready: elisp1-init elisp2-init + echo '@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@ + sed 's/{\([^}]*\)}$$/{I:\1}/' elisp1-toc >>$@ + echo '@page' >>$@ + echo '@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@ + cat elisp2-toc >>$@ + + +# initial aux files. +# +# append vol2's fixed aux to normal vol1. The initial runs saved +# elisp1-aux and elisp2-aux. +elisp1-aux-ready: elisp2-aux-vol-added + cat elisp1-aux $< >$@ +# +# prepend vol1's fixed aux to vol2. +elisp2-aux-ready: elisp1-aux-vol-added + cat $< elisp2-aux >$@ + +# on -pg entries, append volume number after page number. +elisp1-aux-vol-added: elisp1-init + sed 's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie1}/' elisp1-aux >$@ +# +elisp2-aux-vol-added: elisp2-init + sed 's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie2}/' elisp2-aux >$@ + + +# initial index (fns) file. +# +# Append other volume's index entries to this one's. +# Index entries in this volume will then take precedence. +elisp1-fns-ready: elisp1-fn-vol-added elisp2-fn-vol-added + cat elisp2-fn-vol-added >>vol1.fn + texindex vol1.fn + cp vol1.fns $@ +# +elisp2-fns-ready: elisp1-fn-vol-added elisp2-fn-vol-added + cat elisp1-fn-vol-added >>vol2.fn + texindex vol2.fn + cp vol2.fns $@ + +# Insert volume number (I: or II:) into index file. +elisp1-fn-vol-added: elisp1-init + cp vol1.fn elisp1-fn + sed 's/}{/}{I:/' elisp1-fn >$@ +# +elisp2-fn-vol-added: elisp2-init + cp vol2.fn elisp2-fn + sed 's/}{/}{II:/' elisp2-fn >$@ + + +# initial TeX runs. +# +# We use the .fn, .aux, and .toc files created here in subsequent +# processing. The page numbers generated here will not be correct yet, +# but we run texindex and TeX a second time just to get them closer. +# Otherwise it might take even longer for them to converge. +# +elisp1-init: vol1.texi + @echo -e "\f Initial TeX run for volume 1..." + rm -f vol1.aux vol1.toc + $(tex) $< + texindex vol1.?? + mv vol1.aux elisp1-aux + mv vol1.toc elisp1-toc + touch $@ +# +elisp2-init: vol2.texi + @echo "Initial TeX run for volume 2..." + rm -f vol2.aux vol2.toc + $(tex) $< + texindex vol2.?? + mv vol2.aux elisp2-aux + mv vol2.toc elisp2-toc + touch $@ + +# COPYING CONDITIONS +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + diff --git a/lispref/vol1.texi b/lispref/vol1.texi index 9ac873bdcce..5dff4f076b9 100644 --- a/lispref/vol1.texi +++ b/lispref/vol1.texi @@ -1,213 +1,130 @@ -This file is obsolete, and no longer part of the Emacs Lisp Reference Manual. -It is still present in CVS in case we ever want to use some of it again. - -@c This is part of the GNU Emacs Lisp Reference Manual. +\input texinfo @c -*-texinfo-*- +@c This file is used for printing the GNU Emacs Lisp Reference Manual +@c in two volumes. It is a modified version of elisp.texi. @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, @c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. -@c See the file elisp.texi for copying conditions. - -\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename elisp @settitle GNU Emacs Lisp Reference Manual: Volume 1 -@smallbook @c %**end of header - -@tex -%%%% Experiment with smaller skip before sections and subsections. -%%%% --rjc 30mar92 - -\global\secheadingskip = 17pt plus 6pt minus 3pt -\global\subsecheadingskip = 14pt plus 6pt minus 3pt - -% The defaults are: -% \secheadingskip = 21pt plus 8pt minus 4pt -% \subsecheadingskip = 17pt plus 8pt minus 4pt -@end tex - -@finalout -@c tex -@c \overfullrule=0pt -@c end tex - -@c Start volume 1 chapter numbering on chapter 1; -@c this must be listed as chapno 0. +@c See two-volume-cross-refs.txt. @tex +\message{Formatting for two volume edition...Volume 1...} +% +% Read special toc file, set up in two-volume.make. +\gdef\tocreadfilename{elisp1-toc-ready.toc} +% +% Don't make outlines, they're not needed and \readdatafile can't pay +% attention to the special definition above. +\global\let\pdfmakeoutlines=\relax +% +% Start volume 1 chapter numbering at 1; this must be listed as chapno0. \global\chapno=0 @end tex -@c ================================================================ -@c Note: I was unable to figure out how to get .aux files copied -@c properly in the time I had. Hence need to copy .aux file before -@c running Tex. --rjc +@c Version of the manual and of Emacs. +@c Please remember to update the edition number in README as well. +@set VERSION 2.9 +@set EMACSVER 22.0.99 +@dircategory Emacs +@direntry +* Elisp: (elisp). The Emacs Lisp Reference Manual. +@end direntry + +@c in general, keep the following line commented out, unless doing a +@c copy of this manual that will be published. the manual should go +@c onto the distribution in the full, 8.5 x 11" size. +@set smallbook + +@ifset smallbook +@smallbook +@end ifset + +@c per rms and peterb, use 10pt fonts for the main text, mostly to +@c save on paper cost. +@c Do this inside @tex for now, so current makeinfo does not complain. @tex - -\message{} -\message{Redefining contents commands...} -\message{} - -% Special @contents command - -% This inputs fixed up table of contents file rather than create new one. -\global\def\contents{% - \startcontents{Table of Contents}% - \input elisp1-toc-ready.toc - \endgroup - \vfill \eject -} - -% Special @summarycontents command -% This inputs fixed up table of contents file rather than create new one. -\global\def\summarycontents{% - \startcontents{Short Contents}% - % - \let\chapentry = \shortchapentry - \let\unnumbchapentry = \shortunnumberedentry - % We want a true roman here for the page numbers. - \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl - \rm - \advance\baselineskip by 1pt % Open it up a little. - \def\secentry ##1##2##3##4{} - \def\unnumbsecentry ##1##2{} - \def\subsecentry ##1##2##3##4##5{} - \def\unnumbsubsecentry ##1##2{} - \def\subsubsecentry ##1##2##3##4##5##6{} - \def\unnumbsubsubsecentry ##1##2{} - \input elisp1-toc-ready.toc - \endgroup - \vfill \eject -} - -\message{} -\message{Formatting special two volume edition...Volume 1...} -\message{} +@ifset smallbook +@fonttextsize 10 +@set EMACSVER 22 +\global\let\urlcolor=\Black % don't print links in grayscale +\global\let\linkcolor=\Black +@end ifset +\global\hbadness=6666 % don't worry about not-too-underfull boxes @end tex -@c ================================================================ - -@c ==> This `elisp-small.texi' is a `smallbook' version of the manual. - -@c ==== Following are acceptable over and underfull hboxes in TeX ==== - -@c ----- -@c [163] [164] [165] [166]) (loading.texi Chapter 13 [167] [168] [169] -@c Overfull \hbox (20.5428pt too wide) in paragraph at lines 131--131 -@c []@ninett -@c setenv EMAC-SLOAD-PATH .:/user/bil/emacs:/usr/local/lib/emacs/lisp[] -@c ----- -@c (minibuf.texi Chapter 17 [206] [207] [208] [209] [210] [211] [212] [213] -@c [214] [215] -@c Overfull \hbox (2.09094pt too wide) in paragraph at lines 550--560 -@c @texttt map[] @textrm if @textsl require-match @textrm is -@c @texttt nil[]@textrm , or else with the keymap @texttt minibuffer- -@c ----- -@c (locals.texi Appendix @char 68 [533] [534] -@c Underfull \hbox (badness 2512) in paragraph at lines 4--4 -@c []@chaprm Appendix DStandard Buffer-Local - -@c ------------------------------------------------------------------- - -@c @c Combine indices. @synindex cp fn @syncodeindex vr fn @syncodeindex ky fn @syncodeindex pg fn -@syncodeindex tp fn -@c oops: texinfo-format-buffer ignores synindex -@c +@c We use the "type index" to index new functions and variables. +@c @syncodeindex tp fn -@ifinfo -This file documents GNU Emacs Lisp. +@copying +This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* +corresponding to Emacs version @value{EMACSVER}. -@c The edition number appears in several places in this file -@c and also in the file intro.texi. -This is edition 2.4 of the GNU Emacs Lisp Reference -Manual. It corresponds to Emacs Version 19.29. -@c Please REMEMBER to update edition number in *four* places in this file -@c and also in *one* place in ==> intro.texi <== -@c huh? i only found three real places where the edition is stated, and -@c one place where it is not stated explicitly ("this info file is newer -@c than the foobar edition"). --mew 13sep93 +Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, +1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software +Foundation, Inc. -Published by the Free Software Foundation -51 Franklin Street, Fifth Floor -Boston, MA 02110-1301 USA -@end ifinfo +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License,'' with the +Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover +Texts as in (a) below. A copy of the license is included in the +section entitled ``GNU Free Documentation License.'' -@setchapternewpage odd +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' +@end quotation +@end copying -@iftex -@shorttitlepage The GNU Emacs Lisp Reference Manual: Volume 1 -@end iftex @titlepage -@sp 1 -@center @titlefont{The} -@sp 1 -@center @titlefont{GNU Emacs Lisp} -@sp 1 -@center @titlefont{Reference Manual} -@sp 2 -@center GNU Emacs Version 19.29 -@center for Unix Users -@sp 1 -@center Edition 2.4, June 1995 -@sp 2 -@center @titlefont{Volume 1} -@sp 3 -@center by Bil Lewis, Dan LaLiberte, -@center and the GNU Manual Group +@title GNU Emacs Lisp Reference Manual +@subtitle Volume 1 +@subtitle For Emacs Version @value{EMACSVER} +@subtitle Revision @value{VERSION}, June 2007 + +@author by Bil Lewis, Dan LaLiberte, Richard Stallman +@author and the GNU Manual Group @page @vskip 0pt plus 1filll -Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +@insertcopying @sp 2 -Edition 2.4 @* -Revised for Emacs Version 19.29,@* -June, 1995.@* -@sp 2 -ISBN 1-882114-71-X -@sp 2 Published by the Free Software Foundation @* -51 Franklin Street, Fifth Floor @* -Boston, MA 02110-1301 USA - -@sp 1 -Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that the -section entitled ``GNU General Public License'' is included -exactly as in the original, and provided that the entire resulting -derived work is distributed under the terms of a permission notice -identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that the section entitled ``GNU General Public License'' may be -included in a translation approved by the Free Software Foundation -instead of in the original English. +51 Franklin St, Fifth Floor @* +Boston, MA 02110-1301 @* +USA @* +ISBN 1-882114-74-4 @sp 2 Cover art by Etienne Suvasa. @end titlepage -@page -@node Top, Copying, (dir), (dir) -@ifinfo -This Info file contains edition 2.4 of the GNU Emacs Lisp Reference -Manual, corresponding to GNU Emacs version 19.29. -@end ifinfo +@c Print the tables of contents +@summarycontents +@contents + + +@ifnottex +@node Top, Introduction, (dir), (dir) +@top Emacs Lisp + +This Info file contains edition @value{VERSION} of the GNU Emacs Lisp +Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}. +@end ifnottex @menu -* Copying:: Conditions for copying and changing GNU Emacs. * Introduction:: Introduction and conventions used. * Lisp Data Types:: Data types of objects in Emacs Lisp. @@ -217,6 +134,7 @@ Manual, corresponding to GNU Emacs version 19.29. * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences. Certain functions act on any kind of sequence. The description of vectors is here as well. +* Hash Tables:: Very fast lookup-tables. * Symbols:: Symbols represent names, uniquely. * Evaluation:: How Lisp expressions are evaluated. @@ -225,9 +143,11 @@ Manual, corresponding to GNU Emacs version 19.29. * Functions:: A function is a Lisp program that can be invoked from other functions. * Macros:: Macros are a way to extend the Lisp language. +* Customization:: Writing customization declarations. * Loading:: Reading files of Lisp code into Lisp. * Byte Compilation:: Compilation makes programs run faster. +* Advising Functions:: Adding to the definition of a function. * Debugging:: Tools and tips for debugging Lisp programs. * Read and Print:: Converting Lisp objects to text and back. @@ -243,36 +163,51 @@ Manual, corresponding to GNU Emacs version 19.29. files are made. * Buffers:: Creating and using buffer objects. * Windows:: Manipulating windows and displaying buffers. -* Frames:: Making multiple X windows. +* Frames:: Making multiple system-level windows. * Positions:: Buffer positions and motion functions. * Markers:: Markers represent positions and update automatically when the text is changed. * Text:: Examining and changing text in buffers. +* Non-ASCII Characters:: Non-ASCII text in buffers and strings. * Searching and Matching:: Searching buffers for strings or regexps. * Syntax Tables:: The syntax table controls word and list parsing. * Abbrevs:: How Abbrev mode works, and its data structures. * Processes:: Running and communicating with subprocesses. +* Display:: Features for controlling the screen display. * System Interface:: Getting the user id, system type, environment variables, and other such things. -* Display:: Parameters controlling screen usage. - The bell. Waiting for input. Appendices -* Tips:: Advice for writing Lisp programs. +* Antinews:: Info for users downgrading to Emacs 21. +* GNU Free Documentation License:: The license for this documentation +* GPL:: Conditions for copying and changing GNU Emacs. +* Tips:: Advice and coding conventions for Emacs Lisp. * GNU Emacs Internals:: Building and dumping Emacs; internal data structures. * Standard Errors:: List of all error symbols. -* Standard Buffer-Local Variables:: List of variables local in all buffers. +* Standard Buffer-Local Variables:: + List of variables buffer-local in all buffers. * Standard Keymaps:: List of standard keymaps. * Standard Hooks:: List of standard hook variables. * Index:: Index including concepts, functions, variables, and other terms. - --- The Detailed Node Listing --- +@ignore +* New Symbols:: New functions and variables in Emacs @value{EMACSVER}. +@end ignore + +@c Do NOT modify the following 3 lines! They must have this form to +@c be correctly identified by `texinfo-multiple-files-update'. In +@c particular, the detailed menu header line MUST be identical to the +@c value of `texinfo-master-menu-header'. See texnfo-upd.el. + +@detailmenu + --- The Detailed Node Listing --- + --------------------------------- Here are other nodes that are inferiors of those already listed, mentioned here so you can get to them in one step: @@ -282,6 +217,7 @@ Introduction * Caveats:: Flaws and a request for help. * Lisp History:: Emacs Lisp is descended from Maclisp. * Conventions:: How the manual is formatted. +* Version Info:: Which Emacs version is running? * Acknowledgements:: The authors, editors, and sponsors of this manual. Conventions @@ -296,8 +232,10 @@ Conventions Format of Descriptions -* A Sample Function Description:: -* A Sample Variable Description:: +* A Sample Function Description:: A description of an imaginary + function, @code{foo}. +* A Sample Variable Description:: A description of an imaginary + variable, @code{electric-future-map}. Lisp Data Types @@ -305,6 +243,7 @@ Lisp Data Types * Comments:: Comments and their formatting conventions. * Programming Types:: Types found in all Lisp systems. * Editing Types:: Types specific to Emacs. +* Circular Objects:: Read syntax for circular structure. * Type Predicates:: Tests related to types. * Equality Predicates:: Tests of equality between any two objects. @@ -313,70 +252,95 @@ Programming Types * Integer Type:: Numbers without fractional parts. * Floating Point Type:: Numbers with fractional parts and with a large range. * Character Type:: The representation of letters, numbers and - control characters. + control characters. +* Symbol Type:: A multi-use object that refers to a function, + variable, property list, or itself. * Sequence Type:: Both lists and arrays are classified as sequences. * Cons Cell Type:: Cons cells, and lists (which are made from cons cells). * Array Type:: Arrays include strings and vectors. * String Type:: An (efficient) array of characters. * Vector Type:: One-dimensional arrays. -* Symbol Type:: A multi-use object that refers to a function, - variable, property list, or itself. +* Char-Table Type:: One-dimensional sparse arrays indexed by characters. +* Bool-Vector Type:: One-dimensional arrays of @code{t} or @code{nil}. +* Hash Table Type:: Super-fast lookup tables. * Function Type:: A piece of executable code you can call from elsewhere. * Macro Type:: A method of expanding an expression into another expression, more fundamental but less pretty. * Primitive Function Type:: A function written in C, callable from Lisp. * Byte-Code Type:: A function written in Lisp, then compiled. * Autoload Type:: A type used for automatically loading seldom-used - functions. + functions. -List Type +Character Type +* Basic Char Syntax:: Syntax for regular characters. +* General Escape Syntax:: How to specify characters by their codes. +* Ctl-Char Syntax:: Syntax for control characters. +* Meta-Char Syntax:: Syntax for meta-characters. +* Other Char Bits:: Syntax for hyper-, super-, and alt-characters. + +Cons Cell and List Types + +* Box Diagrams:: Drawing pictures of lists. * Dotted Pair Notation:: An alternative syntax for lists. * Association List Type:: A specially constructed list. +String Type + +* Syntax for Strings:: How to specify Lisp strings. +* Non-ASCII in Strings:: International characters in strings. +* Nonprinting Characters:: Literal unprintable characters in strings. +* Text Props and Strings:: Strings with text properties. + Editing Types * Buffer Type:: The basic object of editing. -* Window Type:: What makes buffers visible. -* Window Configuration Type::Save what the screen looks like. * Marker Type:: A position in a buffer. +* Window Type:: What makes buffers visible. +* Frame Type:: Windows subdivide frames. +* Window Configuration Type:: Recording the way a frame is subdivided. +* Frame Configuration Type:: Recording the status of all frames. * Process Type:: A process running on the underlying OS. * Stream Type:: Receive or send characters. * Keymap Type:: What function a keystroke invokes. -* Syntax Table Type:: What a character means. +* Overlay Type:: How an overlay is represented. Numbers -* Integer Basics:: Representation and range of integers. -* Float Basics:: Representation and range of floating point. -* Predicates on Numbers:: Testing for numbers. -* Comparison of Numbers:: Equality and inequality predicates. -* Arithmetic Operations:: How to add, subtract, multiply and divide. -* Bitwise Operations:: Logical and, or, not, shifting. -* Numeric Conversions:: Converting float to integer and vice versa. -* Math Functions:: Trig, exponential and logarithmic functions. -* Random Numbers:: Obtaining random integers, predictable or not. +* Integer Basics:: Representation and range of integers. +* Float Basics:: Representation and range of floating point. +* Predicates on Numbers:: Testing for numbers. +* Comparison of Numbers:: Equality and inequality predicates. +* Numeric Conversions:: Converting float to integer and vice versa. +* Arithmetic Operations:: How to add, subtract, multiply and divide. +* Rounding Operations:: Explicitly rounding floating point numbers. +* Bitwise Operations:: Logical and, or, not, shifting. +* Math Functions:: Trig, exponential and logarithmic functions. +* Random Numbers:: Obtaining random integers, predictable or not. Strings and Characters * String Basics:: Basic properties of strings and characters. * Predicates for Strings:: Testing whether an object is a string or char. * Creating Strings:: Functions to allocate new strings. +* Modifying Strings:: Altering the contents of an existing string. * Text Comparison:: Comparing characters or strings. -* String Conversion:: Converting characters or strings and vice versa. -* Formatting Strings:: @code{format}: Emacs's analog of @code{printf}. -* Character Case:: Case conversion functions. +* String Conversion:: Converting characters to strings and vice versa. +* Formatting Strings:: @code{format}: Emacs's analogue of @code{printf}. +* Case Conversion:: Case conversion functions. +* Case Tables:: Customizing case conversion. Lists * Cons Cells:: How lists are made out of cons cells. -* Lists as Boxes:: Graphical notation to explain lists. * List-related Predicates:: Is this object a list? Comparing two lists. * List Elements:: Extracting the pieces of a list. * Building Lists:: Creating list structure. +* List Variables:: Modifying lists stored in variables. * Modifying Lists:: Storing new pieces into an existing list. * Sets And Lists:: A list can represent a finite mathematical set. * Association Lists:: A list can represent a finite relation or mapping. +* Rings:: Managing a fixed-size ring of objects. Modifying Existing List Structure @@ -390,7 +354,17 @@ Sequences, Arrays, and Vectors * Sequence Functions:: Functions that accept any kind of sequence. * Arrays:: Characteristics of arrays in Emacs Lisp. * Array Functions:: Functions specifically for arrays. -* Vectors:: Functions specifically for vectors. +* Vectors:: Special characteristics of Emacs Lisp vectors. +* Vector Functions:: Functions specifically for vectors. +* Char-Tables:: How to work with char-tables. +* Bool-Vectors:: How to work with bool-vectors. + +Hash Tables + +* Creating Hash:: Functions to create hash tables. +* Hash Access:: Reading and writing the hash table contents. +* Defining Hash:: Defining new comparison methods +* Other Hash:: Miscellaneous. Symbols @@ -401,19 +375,28 @@ Symbols * Property Lists:: Each symbol has a property list for recording miscellaneous information. +Property Lists + +* Plists and Alists:: Comparison of the advantages of property + lists and association lists. +* Symbol Plists:: Functions to access symbols' property lists. +* Other Plists:: Accessing property lists stored elsewhere. + Evaluation * Intro Eval:: Evaluation in the scheme of things. -* Eval:: How to invoke the Lisp interpreter explicitly. * Forms:: How various sorts of objects are evaluated. * Quoting:: Avoiding evaluation (to put constants in the program). +* Eval:: How to invoke the Lisp interpreter explicitly. Kinds of Forms * Self-Evaluating Forms:: Forms that evaluate to themselves. * Symbol Forms:: Symbols evaluate as variables. * Classifying Lists:: How to distinguish various sorts of list forms. +* Function Indirection:: When a symbol appears as the car of a list, + we find the real function via the symbol. * Function Forms:: Forms that call functions. * Macro Forms:: Forms that call macros. * Special Forms:: "Special forms" are idiosyncratic primitives, @@ -424,7 +407,7 @@ Kinds of Forms Control Structures * Sequencing:: Evaluation in textual order. -* Conditionals:: @code{if}, @code{cond}. +* Conditionals:: @code{if}, @code{cond}, @code{when}, @code{unless}. * Combining Conditions:: @code{and}, @code{or}, @code{not}. * Iteration:: @code{while} loops. * Nonlocal Exits:: Jumping out of a sequence. @@ -443,6 +426,7 @@ Errors * Processing of Errors:: What Emacs does when you report an error. * Handling Errors:: How you can trap errors and continue execution. * Error Symbols:: How errors are classified for trapping them. +* Standard Errors:: List of all error symbols. Variables @@ -451,11 +435,21 @@ Variables * Local Variables:: Variable values that exist only temporarily. * Void Variables:: Symbols that lack values. * Defining Variables:: A definition says a symbol is used as a variable. +* Tips for Defining:: Things you should think about when you + define a variable. * Accessing Variables:: Examining values of variables whose names are known only at run time. * Setting Variables:: Storing new values in variables. * Variable Scoping:: How Lisp chooses among local and global values. * Buffer-Local Variables:: Variable values in effect only in one buffer. +* Frame-Local Variables:: Variable values in effect only in one frame. +* Future Local Variables:: New kinds of local values we might add some day. +* File Local Variables:: Handling local variable lists in files. +* Variable Aliases:: Variables that are aliases for other variables. +* Variables with Restricted Values:: Non-constant variables whose value can + @emph{not} be an arbitrary Lisp object. +* Standard Buffer-Local Variables:: + List of variables buffer-local in all buffers. Scoping Rules for Variable Bindings @@ -471,7 +465,7 @@ Buffer-Local Variables * Intro to Buffer-Local:: Introduction and concepts. * Creating Buffer-Local:: Creating and destroying buffer-local bindings. * Default Value:: The default value is seen in buffers - that don't have their own local values. + that don't have their own buffer-local values. Functions @@ -484,6 +478,9 @@ Functions * Anonymous Functions:: Lambda-expressions are functions with no names. * Function Cells:: Accessing or setting the function definition of a symbol. +* Obsolete Functions:: Declaring functions obsolete. +* Inline Functions:: Defining functions that the compiler will open code. +* Function Safety:: Determining whether a function is safe to call. * Related Topics:: Cross-references to specific Lisp primitives that have a special bearing on how functions work. @@ -504,30 +501,86 @@ Macros * Backquote:: Easier construction of list structure. * Problems with Macros:: Don't evaluate the macro arguments too many times. Don't hide the user's variables. +* Indenting Macros:: Specifying how to indent macro calls. + +Common Problems Using Macros + +* Wrong Time:: Do the work in the expansion, not in the macro. +* Argument Evaluation:: The expansion should evaluate each macro arg once. +* Surprising Local Vars:: Local variable bindings in the expansion + require special care. +* Eval During Expansion:: Don't evaluate them; put them in the expansion. +* Repeated Expansion:: Avoid depending on how many times expansion is done. + +Writing Customization Definitions + +* Common Keywords:: Common keyword arguments for all kinds of + customization declarations. +* Group Definitions:: Writing customization group definitions. +* Variable Definitions:: Declaring user options. +* Customization Types:: Specifying the type of a user option. + +Customization Types + +* Simple Types:: Simple customization types: sexp, integer, number, + string, file, directory, alist. +* Composite Types:: Build new types from other types or data. +* Splicing into Lists:: Splice elements into list with @code{:inline}. +* Type Keywords:: Keyword-argument pairs in a customization type. +* Defining New Types:: Give your type a name. Loading * How Programs Do Loading:: The @code{load} function and others. +* Load Suffixes:: Details about the suffixes that @code{load} tries. +* Library Search:: Finding a library to load. +* Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files. * Autoload:: Setting up a function to autoload. -* Named Features:: Loading a library if it isn't already loaded. * Repeated Loading:: Precautions about loading a file twice. +* Named Features:: Loading a library if it isn't already loaded. +* Where Defined:: Finding which file defined a certain symbol. +* Unloading:: How to "unload" a library that was loaded. +* Hooks for Loading:: Providing code to be run when + particular libraries are loaded. Byte Compilation +* Speed of Byte-Code:: An example of speedup from byte compilation. * Compilation Functions:: Byte compilation functions. +* Docs and Compilation:: Dynamic loading of documentation strings. +* Dynamic Loading:: Dynamic loading of individual functions. +* Eval During Compile:: Code to be evaluated when you compile. +* Compiler Errors:: Handling compiler error messages. +* Byte-Code Objects:: The data type used for byte-compiled functions. * Disassembly:: Disassembling byte-code; how to read byte-code. +Advising Emacs Lisp Functions + +* Simple Advice:: A simple example to explain the basics of advice. +* Defining Advice:: Detailed description of @code{defadvice}. +* Around-Advice:: Wrapping advice around a function's definition. +* Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}. +* Activation of Advice:: Advice doesn't do anything until you activate it. +* Enabling Advice:: You can enable or disable each piece of advice. +* Preactivation:: Preactivation is a way of speeding up the + loading of compiled advice. +* Argument Access in Advice:: How advice can access the function's arguments. +* Advising Primitives:: Accessing arguments when advising a primitive. +* Combined Definition:: How advice is implemented. + Debugging Lisp Programs * Debugger:: How the Emacs Lisp debugger is implemented. +* Edebug:: A source-level Emacs Lisp debugger. * Syntax Errors:: How to find syntax errors. +* Test Coverage:: Ensuring you have tested all branches in your code. * Compilation Errors:: How to find errors that show up in byte compilation. -* Edebug:: A source-level Emacs Lisp debugger. The Lisp Debugger * Error Debugging:: Entering the debugger when an error happens. +* Infinite Loops:: Stopping and debugging a program that doesn't exit. * Function Debugging:: Entering it when a certain function is called. * Explicit Debug:: Entering it at a certain point in the program. * Using Debugger:: What the debugger does; what you see while in it. @@ -535,6 +588,27 @@ The Lisp Debugger * Invoking the Debugger:: How to call the function @code{debug}. * Internals of Debugger:: Subroutines of the debugger, and global variables. +Edebug + +* Using Edebug:: Introduction to use of Edebug. +* Instrumenting:: You must instrument your code + in order to debug it with Edebug. +* Edebug Execution Modes:: Execution modes, stopping more or less often. +* Jumping:: Commands to jump to a specified place. +* Edebug Misc:: Miscellaneous commands. +* Breaks:: Setting breakpoints to make the program stop. +* Trapping Errors:: Trapping errors with Edebug. +* Edebug Views:: Views inside and outside of Edebug. +* Edebug Eval:: Evaluating expressions within Edebug. +* Eval List:: Expressions whose values are displayed + each time you enter Edebug. +* Printing in Edebug:: Customization of printing. +* Trace Buffer:: How to produce trace output in a buffer. +* Coverage Testing:: How to test evaluation coverage. +* The Outside Context:: Data that Edebug saves and restores. +* Edebug and Macros:: Specifying how to handle macro calls. +* Edebug Options:: Option variables for customizing Edebug. + Debugging Invalid Lisp Syntax * Excess Open:: How to find a spurious open paren or missing close. @@ -549,14 +623,25 @@ Reading and Printing Lisp Objects * Output Streams:: Various data types that can be used as output streams. * Output Functions:: Functions to print Lisp objects as text. +* Output Variables:: Variables that control what the printing + functions do. Minibuffers * Intro to Minibuffers:: Basic information about minibuffers. * Text from Minibuffer:: How to read a straight text string. * Object from Minibuffer:: How to read a Lisp object or expression. +* Minibuffer History:: Recording previous minibuffer inputs + so the user can reuse them. +* Initial Input:: Specifying initial contents for the minibuffer. * Completion:: How to invoke and customize completion. * Yes-or-No Queries:: Asking a question with a simple answer. +* Multiple Queries:: Asking a series of similar questions. +* Reading a Password:: Reading a password from the terminal. +* Minibuffer Commands:: Commands used as key bindings in minibuffers. +* Minibuffer Contents:: How such commands access the minibuffer text. +* Minibuffer Windows:: Operating on the special minibuffer windows. +* Recursive Mini:: Whether recursive entry to minibuffer is allowed. * Minibuffer Misc:: Various customization hooks and variables. Completion @@ -576,8 +661,10 @@ Command Loop * Defining Commands:: Specifying how a function should read arguments. * Interactive Call:: Calling a command, so that it will read arguments. * Command Loop Info:: Variables set by the command loop for you to examine. +* Adjusting Point:: Adjustment of point after a command. * Input Events:: What input looks like when you read it. * Reading Input:: How to read input events from the keyboard or mouse. +* Special Events:: Events processed immediately and individually. * Waiting:: Waiting for user input or elapsed time. * Quitting:: How @kbd{C-g} works. How to catch or defer quitting. * Prefix Command Arguments:: How the commands to set prefix args work. @@ -594,50 +681,155 @@ Defining Commands in various ways. * Interactive Examples:: Examples of how to read interactive arguments. +Input Events + +* Keyboard Events:: Ordinary characters--keys with symbols on them. +* Function Keys:: Function keys--keys with names, not symbols. +* Mouse Events:: Overview of mouse events. +* Click Events:: Pushing and releasing a mouse button. +* Drag Events:: Moving the mouse before releasing the button. +* Button-Down Events:: A button was pushed and not yet released. +* Repeat Events:: Double and triple click (or drag, or down). +* Motion Events:: Just moving the mouse, not pushing a button. +* Focus Events:: Moving the mouse between frames. +* Misc Events:: Other events the system can generate. +* Event Examples:: Examples of the lists for mouse events. +* Classifying Events:: Finding the modifier keys in an event symbol. +* Accessing Events:: Functions to extract info from events. +* Strings of Events:: Special considerations for putting + keyboard character events in a string. + +Reading Input + +* Key Sequence Input:: How to read one key sequence. +* Reading One Event:: How to read just one event. +* Event Mod:: How Emacs modifies events as they are read. +* Invoking the Input Method:: How reading an event uses the input method. +* Quoted Character Input:: Asking the user to specify a character. +* Event Input Misc:: How to reread or throw away input events. + Keymaps -* Keymap Terminology:: Definitions of terms pertaining to keymaps. -* Format of Keymaps:: What a keymap looks like as a Lisp object. -* Creating Keymaps:: Functions to create and copy keymaps. -* Inheritance and Keymaps:: How one keymap can inherit the bindings - of another keymap. -* Prefix Keys:: Defining a key with a keymap as its definition. -* Menu Keymaps:: A keymap can define a menu for X - or for use from the terminal. -* Active Keymaps:: Each buffer has a local keymap - to override the standard (global) bindings. - Each minor mode can also override them. -* Key Lookup:: How extracting elements from keymaps works. +* Key Sequences:: Key sequences as Lisp objects. +* Keymap Basics:: Basic concepts of keymaps. +* Format of Keymaps:: What a keymap looks like as a Lisp object. +* Creating Keymaps:: Functions to create and copy keymaps. +* Inheritance and Keymaps:: How one keymap can inherit the bindings + of another keymap. +* Prefix Keys:: Defining a key with a keymap as its definition. +* Active Keymaps:: How Emacs searches the active keymaps + for a key binding. +* Searching Keymaps:: A pseudo-Lisp summary of searching active maps. +* Controlling Active Maps:: Each buffer has a local keymap + to override the standard (global) bindings. + A minor mode can also override them. +* Key Lookup:: How extracting elements from keymaps works. * Functions for Key Lookup:: How to request key lookup. -* Changing Key Bindings:: Redefining a key in a keymap. -* Key Binding Commands:: Interactive interfaces for redefining keys. -* Scanning Keymaps:: Looking through all keymaps, for printing help. +* Changing Key Bindings:: Redefining a key in a keymap. +* Remapping Commands:: A keymap can translate one command to another. +* Translation Keymaps:: Keymaps for translating sequences of events. +* Key Binding Commands:: Interactive interfaces for redefining keys. +* Scanning Keymaps:: Looking through all keymaps, for printing help. +* Menu Keymaps:: A keymap can define a menu for X + or for use from the terminal. +* Standard Keymaps:: List of standard keymaps. Major and Minor Modes +* Hooks:: How to use hooks; how to write code that + provides hooks. * Major Modes:: Defining major modes. * Minor Modes:: Defining minor modes. * Mode Line Format:: Customizing the text that appears in the mode line. -* Hooks:: How to use hooks; how to write code that - provides hooks. +* Imenu:: How a mode can provide a menu + of definitions in the buffer. +* Font Lock Mode:: How modes can highlight text according to syntax. +* Desktop Save Mode:: How modes can have buffer state saved between + Emacs sessions. + +Menu Keymaps + +* Defining Menus:: How to make a keymap that defines a menu. +* Mouse Menus:: How users actuate the menu with the mouse. +* Keyboard Menus:: How users actuate the menu with the keyboard. +* Menu Example:: Making a simple menu. +* Menu Bar:: How to customize the menu bar. +* Tool Bar:: A tool bar is a row of images. +* Modifying Menus:: How to add new items to a menu. + +Defining Menus + +* Simple Menu Items:: A simple kind of menu key binding, + limited in capabilities. +* Extended Menu Items:: More powerful menu item definitions + let you specify keywords to enable + various features. +* Menu Separators:: Drawing a horizontal line through a menu. +* Alias Menu Items:: Using command aliases in menu items. + +Major and Minor Modes + +* Hooks:: How to use hooks; how to write code that provides hooks. +* Major Modes:: Defining major modes. +* Minor Modes:: Defining minor modes. +* Mode Line Format:: Customizing the text that appears in the mode line. +* Imenu:: How a mode can provide a menu + of definitions in the buffer. +* Font Lock Mode:: How modes can highlight text according to syntax. +* Desktop Save Mode:: How modes can have buffer state saved between + Emacs sessions. Major Modes +* Major Mode Basics:: * Major Mode Conventions:: Coding conventions for keymaps, etc. * Example Major Modes:: Text mode and Lisp modes. * Auto Major Mode:: How Emacs chooses the major mode automatically. * Mode Help:: Finding out how to use a mode. +* Derived Modes:: Defining a new major mode based on another major + mode. +* Generic Modes:: Defining a simple major mode that supports + comment syntax and Font Lock mode. +* Mode Hooks:: Hooks run at the end of major mode functions. Minor Modes * Minor Mode Conventions:: Tips for writing a minor mode. * Keymaps and Minor Modes:: How a minor mode can have its own keymap. +* Defining Minor Modes:: A convenient facility for defining minor modes. Mode Line Format +* Mode Line Basics:: * Mode Line Data:: The data structure that controls the mode line. * Mode Line Variables:: Variables used in that data structure. * %-Constructs:: Putting information into a mode line. +* Properties in Mode:: Using text properties in the mode line. +* Header Lines:: Like a mode line, but at the top. +* Emulating Mode Line:: Formatting text as the mode line would. + +Font Lock Mode + +* Font Lock Basics:: Overview of customizing Font Lock. +* Search-based Fontification:: Fontification based on regexps. +* Customizing Keywords:: Customizing search-based fontification. +* Other Font Lock Variables:: Additional customization facilities. +* Levels of Font Lock:: Each mode can define alternative levels + so that the user can select more or less. +* Precalculated Fontification:: How Lisp programs that produce the buffer + contents can also specify how to fontify it. +* Faces for Font Lock:: Special faces specifically for Font Lock. +* Syntactic Font Lock:: Fontification based on syntax tables. +* Setting Syntax Properties:: Defining character syntax based on context + using the Font Lock mechanism. +* Multiline Font Lock:: How to coerce Font Lock into properly + highlighting multiline constructs. + +Multiline Font Lock Constructs + +* Font Lock Multiline:: Marking multiline chunks with a text property +* Region to Fontify:: Controlling which region gets refontified + after a buffer change. Documentation @@ -656,11 +848,15 @@ Files * Reading from Files:: Reading files into other buffers. * Writing to Files:: Writing new files from parts of buffers. * File Locks:: Locking and unlocking files, to prevent - simultaneous editing by two people. -* Information about Files:: Testing existence, accessibility, size of files. -* Contents of Directories:: Getting a list of the files in a directory. -* Changing File Attributes:: Renaming files, changing protection, etc. -* File Names:: Decomposing and expanding file names. + simultaneous editing by two people. +* Information about Files:: Testing existence, accessibility, size of files. +* Changing Files:: Renaming files, changing protection, etc. +* File Names:: Decomposing and expanding file names. +* Contents of Directories:: Getting a list of the files in a directory. +* Create/Delete Dirs:: Creating and Deleting Directories. +* Magic File Names:: Defining "magic" special handling + for certain file names. +* Format Conversion:: Conversion to and from various file formats. Visiting Files @@ -670,19 +866,23 @@ Visiting Files Information about Files * Testing Accessibility:: Is a given file readable? Writable? -* Kinds of Files:: Is it a directory? A link? +* Kinds of Files:: Is it a directory? A symbolic link? +* Truenames:: Eliminating symbolic links from a file name. * File Attributes:: How large is it? Any other names? Etc. +* Locating Files:: How to find a file in standard places. File Names * File Name Components:: The directory part of a file name, and the rest. -* Directory Names:: A directory's name as a directory - is different from its name as a file. * Relative File Names:: Some file names are relative to a current directory. +* Directory Names:: A directory's name as a directory + is different from its name as a file. * File Name Expansion:: Converting relative file names to absolute ones. * Unique File Names:: Generating names for temporary files. * File Name Completion:: Finding the completions for a given file name. +* Standard File Names:: If your package uses a fixed file name, + how to handle various operating systems simply. Backups and Auto-Saving @@ -704,19 +904,22 @@ Backup Files Buffers * Buffer Basics:: What is a buffer? +* Current Buffer:: Designating a buffer as current + so primitives will access its contents. * Buffer Names:: Accessing and changing buffer names. * Buffer File Name:: The buffer file name indicates which file is visited. * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. * Modification Time:: Determining whether the visited file was changed - "behind Emacs's back". + ``behind Emacs's back''. * Read Only Buffers:: Modifying text is not allowed in a read-only buffer. * The Buffer List:: How to look at all the existing buffers. * Creating Buffers:: Functions that create buffers. * Killing Buffers:: Buffers exist until explicitly killed. -* Current Buffer:: Designating a buffer as current - so primitives will access its contents. +* Indirect Buffers:: An indirect buffer shares text with some + other buffer. +* Buffer Gap:: The gap in the buffer. Windows @@ -726,21 +929,28 @@ Windows * Selecting Windows:: The selected window is the one that you edit in. * Cyclic Window Ordering:: Moving around the existing windows. * Buffers and Windows:: Each window displays the contents of a buffer. -* Displaying Buffers:: Higher-lever functions for displaying a buffer +* Displaying Buffers:: Higher-level functions for displaying a buffer and choosing a window for it. +* Choosing Window:: How to choose a window for displaying a buffer. * Window Point:: Each window has its own location of point. * Window Start:: The display-start position controls which text is on-screen in the window. -* Vertical Scrolling:: Moving text up and down in the window. -* Horizontal Scrolling:: Moving text sideways on the window. +* Textual Scrolling:: Moving text up and down through the window. +* Vertical Scrolling:: Moving the contents up and down on the window. +* Horizontal Scrolling:: Moving the contents sideways on the window. * Size of Window:: Accessing the size of a window. * Resizing Windows:: Changing the size of a window. +* Coordinates and Windows:: Converting coordinates to windows. +* Window Tree:: The layout and sizes of all windows in a frame. * Window Configurations:: Saving and restoring the state of the screen. +* Window Hooks:: Hooks for scrolling, window size changes, + redisplay going past a certain point, + or window configuration changes. Frames * Creating Frames:: Creating additional frames. -* Multiple Displays:: Creating frames on other X displays. +* Multiple Displays:: Creating frames on other displays. * Frame Parameters:: Controlling frame size, position, font, etc. * Frame Titles:: Automatic updating of frame titles. * Deleting Frames:: Frames last until explicitly deleted. @@ -750,18 +960,40 @@ Frames * Minibuffers and Frames:: How a frame finds the minibuffer to use. * Input Focus:: Specifying the selected frame. * Visibility of Frames:: Frames may be visible or invisible, or icons. -* Raising and Lowering:: Raising a frame makes it hide other X windows; - lowering it makes the others hide them. +* Raising and Lowering:: Raising a frame makes it hide other windows; + lowering it puts it underneath the others. * Frame Configurations:: Saving the state of all frames. * Mouse Tracking:: Getting events that say when the mouse moves. * Mouse Position:: Asking where the mouse is, or moving it. * Pop-Up Menus:: Displaying a menu for the user to select from. * Dialog Boxes:: Displaying a box to ask yes or no. -* Pointer Shapes:: Specifying the shape of the mouse pointer. -* X Selections:: Transferring text to and from other X clients. +* Pointer Shape:: Specifying the shape of the mouse pointer. +* Window System Selections::Transferring text to and from other windows. +* Drag and Drop:: Internals of Drag-and-Drop implementation. * Color Names:: Getting the definitions of color names. +* Text Terminal Colors:: Defining colors for text-only terminals. * Resources:: Getting resource values from the server. -* Server Data:: Getting info about the X server. +* Display Feature Testing:: Determining the features of a terminal. + +Frame Parameters + +* Parameter Access:: How to change a frame's parameters. +* Initial Parameters:: Specifying frame parameters when you make a frame. +* Window Frame Parameters:: List of frame parameters for window systems. +* Size and Position:: Changing the size and position of a frame. +* Geometry:: Parsing geometry specifications. + +Window Frame Parameters + +* Basic Parameters:: Parameters that are fundamental. +* Position Parameters:: The position of the frame on the screen. +* Size Parameters:: Frame's size. +* Layout Parameters:: Size of parts of the frame, and + enabling or disabling some parts. +* Buffer Parameters:: Which buffers have been or should be shown. +* Management Parameters:: Communicating with the window manager. +* Cursor Parameters:: Controlling the cursor appearance. +* Color Parameters:: Colors of various parts of the frame. Positions @@ -785,9 +1017,11 @@ Markers * Overview of Markers:: The components of a marker, and how it relocates. * Predicates on Markers:: Testing whether an object is a marker. * Creating Markers:: Making empty markers or markers at certain places. -* Information from Markers:: Finding the marker's buffer or character - position. -* Changing Markers:: Moving the marker to a new buffer or position. +* Information from Markers::Finding the marker's buffer or character + position. +* Marker Insertion Types:: Two ways a marker can relocate when you + insert where it points. +* Moving Markers:: Moving the marker to a new buffer or position. * The Mark:: How "the mark" is implemented with a marker. * The Region:: How to access "the region". @@ -795,6 +1029,7 @@ Text * Near Point:: Examining text in the vicinity of point. * Buffer Contents:: Examining text in a general fashion. +* Comparing Text:: Comparing substrings of buffers. * Insertion:: Adding new text to a buffer. * Commands for Insertion:: User-level commands to insert text. * Deletion:: Removing text from a buffer. @@ -802,21 +1037,32 @@ Text * The Kill Ring:: Where removed text sometimes is saved for later use. * Undo:: Undoing changes to the text of a buffer. -* Auto Filling:: How auto-fill mode is implemented to break lines. +* Maintaining Undo:: How to enable and disable undo information. + How to control how much information is kept. * Filling:: Functions for explicit filling. * Margins:: How to specify margins for filling commands. +* Adaptive Fill:: Adaptive Fill mode chooses a fill prefix + from context. +* Auto Filling:: How auto-fill mode is implemented to break lines. * Sorting:: Functions for sorting parts of the buffer. -* Indentation:: Functions to insert or adjust indentation. * Columns:: Computing horizontal positions, and using them. +* Indentation:: Functions to insert or adjust indentation. * Case Changes:: Case conversion of parts of the buffer. +* Text Properties:: Assigning Lisp property lists to text characters. * Substitution:: Replacing a given character wherever it appears. +* Transposition:: Swapping two portions of a buffer. * Registers:: How registers are implemented. Accessing the text or position stored in a register. +* Base 64:: Conversion to or from base 64 encoding. +* MD5 Checksum:: Compute the MD5 "message digest"/"checksum". +* Atomic Changes:: Installing several buffer changes "atomically". +* Change Hooks:: Supplying functions to be run when text is changed. The Kill Ring * Kill Ring Concepts:: What text looks like in the kill ring. * Kill Functions:: Functions that kill text. +* Yanking:: How yanking is done. * Yank Commands:: Commands that access the kill ring. * Low-Level Kill Ring:: Functions and variables for kill ring access. * Internals of Kill Ring:: Variables that hold kill-ring data. @@ -830,48 +1076,130 @@ Indentation * Indent Tabs:: Adjustable, typewriter-like tab stops. * Motion by Indent:: Move to first non-blank character. +Text Properties + +* Examining Properties:: Looking at the properties of one character. +* Changing Properties:: Setting the properties of a range of text. +* Property Search:: Searching for where a property changes value. +* Special Properties:: Particular properties with special meanings. +* Format Properties:: Properties for representing formatting of text. +* Sticky Properties:: How inserted text gets properties from + neighboring text. +* Saving Properties:: Saving text properties in files, and reading + them back. +* Lazy Properties:: Computing text properties in a lazy fashion + only when text is examined. +* Clickable Text:: Using text properties to make regions of text + do something when you click on them. +* Links and Mouse-1:: How to make @key{Mouse-1} follow a link. +* Fields:: The @code{field} property defines + fields within the buffer. +* Not Intervals:: Why text properties do not use + Lisp-visible text intervals. + +Non-ASCII Characters + +* Text Representations:: Unibyte and multibyte representations +* Converting Representations:: Converting unibyte to multibyte and vice versa. +* Selecting a Representation:: Treating a byte sequence as unibyte or multi. +* Character Codes:: How unibyte and multibyte relate to + codes of individual characters. +* Character Sets:: The space of possible character codes + is divided into various character sets. +* Chars and Bytes:: More information about multibyte encodings. +* Splitting Characters:: Converting a character to its byte sequence. +* Scanning Charsets:: Which character sets are used in a buffer? +* Translation of Characters:: Translation tables are used for conversion. +* Coding Systems:: Coding systems are conversions for saving files. +* Input Methods:: Input methods allow users to enter various + non-ASCII characters without special keyboards. +* Locales:: Interacting with the POSIX locale. + +Coding Systems + +* Coding System Basics:: Basic concepts. +* Encoding and I/O:: How file I/O functions handle coding systems. +* Lisp and Coding Systems:: Functions to operate on coding system names. +* User-Chosen Coding Systems:: Asking the user to choose a coding system. +* Default Coding Systems:: Controlling the default choices. +* Specifying Coding Systems:: Requesting a particular coding system + for a single file operation. +* Explicit Encoding:: Encoding or decoding text without doing I/O. +* Terminal I/O Encoding:: Use of encoding for terminal I/O. +* MS-DOS File Types:: How DOS "text" and "binary" files + relate to coding systems. + Searching and Matching * String Search:: Search for an exact match. +* Searching and Case:: Case-independent or case-significant searching. * Regular Expressions:: Describing classes of strings. * Regexp Search:: Searching for a match for a regexp. -* Match Data:: Finding out which part of the text matched - various parts of a regexp, after regexp search. -* Saving Match Data:: Saving and restoring this information. +* POSIX Regexps:: Searching POSIX-style for the longest match. +* Match Data:: Finding out which part of the text matched, + after a string or regexp search. +* Search and Replace:: Commands that loop, searching and replacing. * Standard Regexps:: Useful regexps for finding sentences, pages,... -* Searching and Case:: Case-independent or case-significant searching. Regular Expressions * Syntax of Regexps:: Rules for writing regular expressions. * Regexp Example:: Illustrates regular expression syntax. +* Regexp Functions:: Functions for operating on regular expressions. + +Syntax of Regular Expressions + +* Regexp Special:: Special characters in regular expressions. +* Char Classes:: Character classes used in regular expressions. +* Regexp Backslash:: Backslash-sequences in regular expressions. + +The Match Data + +* Replacing Match:: Replacing a substring that was matched. +* Simple Match Data:: Accessing single items of match data, + such as where a particular subexpression started. +* Entire Match Data:: Accessing the entire match data at once, as a list. +* Saving Match Data:: Saving and restoring the match data. Syntax Tables +* Syntax Basics:: Basic concepts of syntax tables. * Syntax Descriptors:: How characters are classified. * Syntax Table Functions:: How to create, examine and alter syntax tables. +* Syntax Properties:: Overriding syntax with text properties. +* Motion and Syntax:: Moving over characters with certain syntaxes. * Parsing Expressions:: Parsing balanced expressions using the syntax table. * Standard Syntax Tables:: Syntax tables used by various major modes. * Syntax Table Internals:: How syntax table information is stored. +* Categories:: Another way of classifying character syntax. Syntax Descriptors * Syntax Class Table:: Table of syntax classes. * Syntax Flags:: Additional flags each character can have. +Parsing Expressions + +* Motion via Parsing:: Motion functions that work by parsing. +* Position Parse:: Determining the syntactic state of a position. +* Parser State:: How Emacs represents a syntactic state. +* Low-Level Parsing:: Parsing across a specified region. +* Control Parsing:: Parameters that affect parsing. + Abbrevs And Abbrev Expansion * Abbrev Mode:: Setting up Emacs for abbreviation. -* Tables: Abbrev Tables. Creating and working with abbrev tables. +* Abbrev Tables:: Creating and working with abbrev tables. * Defining Abbrevs:: Specifying abbreviations and their expansions. -* Files: Abbrev Files. Saving abbrevs in files. -* Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines. +* Abbrev Files:: Saving abbrevs in files. +* Abbrev Expansion:: Controlling expansion; expansion subroutines. * Standard Abbrev Tables:: Abbrev tables used by various major modes. Processes * Subprocess Creation:: Functions that start subprocesses. +* Shell Arguments:: Quoting an argument to pass it to a shell. * Synchronous Processes:: Details of using synchronous subprocesses. * Asynchronous Processes:: Starting up an asynchronous subprocess. * Deleting Processes:: Eliminating an asynchronous subprocess. @@ -881,68 +1209,219 @@ Processes an asynchronous subprocess. * Output from Processes:: Collecting output from an asynchronous subprocess. * Sentinels:: Sentinels run when process run-status changes. +* Query Before Exit:: Whether to query if exiting will kill a process. +* Transaction Queues:: Transaction-based communication with subprocesses. * Network:: Opening network connections. +* Network Servers:: Network servers let Emacs accept net connections. +* Datagrams:: UDP network connections. +* Low-Level Network:: Lower-level but more general function + to create connections and servers. +* Misc Network:: Additional relevant functions for network connections. +* Byte Packing:: Using bindat to pack and unpack binary data. Receiving Output from Processes * Process Buffers:: If no filter, output is put in a buffer. * Filter Functions:: Filter functions accept output from the process. +* Decoding Output:: Filters can get unibyte or multibyte strings. * Accepting Output:: How to wait until process output arrives. +Low-Level Network Access + +* Proc: Network Processes. Using @code{make-network-process}. +* Options: Network Options. Further control over network connections. +* Features: Network Feature Testing. + Determining which network features work on + the machine you are using. + +Packing and Unpacking Byte Arrays + +* Bindat Spec:: Describing data layout. +* Bindat Functions:: Doing the unpacking and packing. +* Bindat Examples:: Samples of what bindat.el can do for you! + +Emacs Display + +* Refresh Screen:: Clearing the screen and redrawing everything on it. +* Forcing Redisplay:: Forcing redisplay. +* Truncation:: Folding or wrapping long text lines. +* The Echo Area:: Displaying messages at the bottom of the screen. +* Warnings:: Displaying warning messages for the user. +* Invisible Text:: Hiding part of the buffer text. +* Selective Display:: Hiding part of the buffer text (the old way). +* Temporary Displays:: Displays that go away automatically. +* Overlays:: Use overlays to highlight parts of the buffer. +* Width:: How wide a character or string is on the screen. +* Line Height:: Controlling the height of lines. +* Faces:: A face defines a graphics style + for text characters: font, colors, etc. +* Fringes:: Controlling window fringes. +* Scroll Bars:: Controlling vertical scroll bars. +* Display Property:: Enabling special display features. +* Images:: Displaying images in Emacs buffers. +* Buttons:: Adding clickable buttons to Emacs buffers. +* Abstract Display:: Emacs' Widget for Object Collections. +* Blinking:: How Emacs shows the matching open parenthesis. +* Usual Display:: The usual conventions for displaying nonprinting chars. +* Display Tables:: How to specify other conventions. +* Beeping:: Audible signal to the user. +* Window Systems:: Which window system is being used. + +The Echo Area + +* Displaying Messages:: Explicitly displaying text in the echo area. +* Progress:: Informing user about progress of a long operation. +* Logging Messages:: Echo area messages are logged for the user. +* Echo Area Customization:: Controlling the echo area. + +Reporting Warnings + +* Warning Basics:: Warnings concepts and functions to report them. +* Warning Variables:: Variables programs bind to customize their warnings. +* Warning Options:: Variables users set to control display of warnings. + +Overlays + +* Managing Overlays:: Creating and moving overlays. +* Overlay Properties:: How to read and set properties. + What properties do to the screen display. +* Finding Overlays:: Searching for overlays. + +Faces + +* Defining Faces:: How to define a face with @code{defface}. +* Face Attributes:: What is in a face? +* Attribute Functions:: Functions to examine and set face attributes. +* Displaying Faces:: How Emacs combines the faces specified for + a character. +* Font Selection:: Finding the best available font for a face. +* Face Functions:: How to define and examine faces. +* Auto Faces:: Hook for automatic face assignment. +* Font Lookup:: Looking up the names of available fonts + and information about them. +* Fontsets:: A fontset is a collection of fonts + that handle a range of character sets. + +Fringes + +* Fringe Size/Pos:: Specifying where to put the window fringes. +* Fringe Indicators:: Displaying indicator icons in the window fringes. +* Fringe Cursors:: Displaying cursors in the right fringe. +* Fringe Bitmaps:: Specifying bitmaps for fringe indicators. +* Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes. +* Overlay Arrow:: Display of an arrow to indicate position. + +The @code{display} Property + +* Specified Space:: Displaying one space with a specified width. +* Pixel Specification:: Specifying space width or height in pixels. +* Other Display Specs:: Displaying an image; magnifying text; moving it + up or down on the page; adjusting the width + of spaces within text. +* Display Margins:: Displaying text or images to the side of + the main text. + +Images + +* Image Descriptors:: How to specify an image for use in @code{:display}. +* XBM Images:: Special features for XBM format. +* XPM Images:: Special features for XPM format. +* GIF Images:: Special features for GIF format. +* PostScript Images:: Special features for PostScript format. +* Other Image Types:: Various other formats are supported. +* Defining Images:: Convenient ways to define an image for later use. +* Showing Images:: Convenient ways to display an image once + it is defined. +* Image Cache:: Internal mechanisms of image display. + +Buttons + +* Button Properties:: Button properties with special meanings. +* Button Types:: Defining common properties for classes of buttons. +* Making Buttons:: Adding buttons to Emacs buffers. +* Manipulating Buttons:: Getting and setting properties of buttons. +* Button Buffer Commands:: Buffer-wide commands and bindings for buttons. + +Abstract Display + +* Abstract Display Functions:: Functions in the Ewoc package. +* Abstract Display Example:: Example of using Ewoc. + +Display Tables + +* Display Table Format:: What a display table consists of. +* Active Display Table:: How Emacs selects a display table to use. +* Glyphs:: How to define a glyph, and what glyphs mean. + Operating System Interface * Starting Up:: Customizing Emacs start-up processing. * Getting Out:: How exiting works (permanent or temporary). * System Environment:: Distinguish the name and kind of system. -* Terminal Input:: Recording terminal input for debugging. -* Terminal Output:: Recording terminal output for debugging. -* Flow Control:: How to turn output flow control on or off. +* User Identification:: Finding the name and user id of the user. +* Time of Day:: Getting the current time. +* Time Conversion:: Converting a time from numeric form to a string, or + to calendrical data (or vice versa). +* Time Parsing:: Converting a time from numeric form to text + and vice versa. +* Processor Run Time:: Getting the run time used by Emacs. +* Time Calculations:: Adding, subtracting, comparing times, etc. +* Timers:: Setting a timer to call a function at a certain time. +* Idle Timers:: Setting a timer to call a function when Emacs has + been idle for a certain length of time. +* Terminal Input:: Accessing and recording terminal input. +* Terminal Output:: Controlling and recording terminal output. +* Sound Output:: Playing sounds on the computer's speaker. +* X11 Keysyms:: Operating on key symbols for X Windows * Batch Mode:: Running Emacs without terminal interaction. +* Session Management:: Saving and restoring state with X Session Management. Starting Up Emacs -* Start-up Summary:: Sequence of actions Emacs performs at start-up. +* Startup Summary:: Sequence of actions Emacs performs at start-up. * Init File:: Details on reading the init file (@file{.emacs}). * Terminal-Specific:: How the terminal-specific Lisp file is read. -* Command Line Arguments:: How command line arguments are processed, +* Command-Line Arguments:: How command-line arguments are processed, and how you can customize them. -Getting out of Emacs +Getting Out of Emacs * Killing Emacs:: Exiting Emacs irreversibly. * Suspending Emacs:: Exiting Emacs reversibly. -Emacs Display +Terminal Input -* Refresh Screen:: Clearing the screen and redrawing everything on it. -* Truncation:: Folding or wrapping long text lines. -* The Echo Area:: Where messages are displayed. -* Selective Display:: Hiding part of the buffer text. -* Overlay Arrow:: Display of an arrow to indicate position. -* Temporary Displays:: Displays that go away automatically. -* Waiting:: Forcing display update and waiting for user. -* Blinking:: How Emacs shows the matching open parenthesis. -* Usual Display:: How control characters are displayed. -* Beeping:: Audible signal to the user. -* Window Systems:: Which window system is being used. +* Input Modes:: Options for how input is processed. +* Recording Input:: Saving histories of recent or all input events. + +Tips and Conventions + +* Coding Conventions:: Conventions for clean and robust programs. +* Key Binding Conventions:: Which keys should be bound by which programs. +* Programming Tips:: Making Emacs code fit smoothly in Emacs. +* Compilation Tips:: Making compiled code run fast. +* Warning Tips:: Turning off compiler warnings. +* Documentation Tips:: Writing readable documentation strings. +* Comment Tips:: Conventions for writing comments. +* Library Headers:: Standard headers for library packages. GNU Emacs Internals -* Building Emacs:: How to preload Lisp libraries into Emacs. +* Building Emacs:: How the dumped Emacs is made. * Pure Storage:: A kludge to make preloaded Lisp functions sharable. * Garbage Collection:: Reclaiming space for Lisp objects no longer used. -* Object Internals:: Data formats of buffers, windows, processes. +* Memory Usage:: Info about total size of Lisp objects made so far. * Writing Emacs Primitives:: Writing C code for Emacs. +* Object Internals:: Data formats of buffers, windows, processes. Object Internals * Buffer Internals:: Components of a buffer structure. * Window Internals:: Components of a window structure. * Process Internals:: Components of a process structure. +@end detailmenu @end menu -@c ================ Volume 1 ================ - @include intro.texi @include objects.texi @include numbers.texi @@ -950,6 +1429,7 @@ Object Internals @include lists.texi @include sequences.texi +@include hash.texi @include symbols.texi @include eval.texi @@ -958,36 +1438,40 @@ Object Internals @include functions.texi @include macros.texi +@include customize.texi @include loading.texi @include compile.texi +@include advice.texi + @include debugging.texi @include streams.texi - @include minibuf.texi @include commands.texi + @include keymaps.texi @include modes.texi +@include help.texi +@include files.texi + +@include backups.texi @c ================ Beginning of Volume 2 ================ - -@c include help.texi -@c include files.texi -@c include backups.texi @c include buffers.texi - @c include windows.texi @c include frames.texi + @c include positions.texi @c include markers.texi @c include text.texi +@c include nonascii.texi @c include searching.texi @c include syntax.texi @c include abbrevs.texi - @c include processes.texi -@c include os.texi + @c include display.texi +@c include os.texi @c MOVE to Emacs Manual: include misc-modes.texi @@ -995,21 +1479,24 @@ Object Internals @c REMOVE this: include non-hacker.texi +@c include anti.texi +@c include doclicense.texi +@c include gpl.texi @c include tips.texi @c include internals.texi @c include errors.texi @c include locals.texi @c include maps.texi @c include hooks.texi -@c include anti.texi -@include index-vol1.texi +@include index.texi -@page -@c Print the tables of contents -@summarycontents -@contents -@c That's all +@ignore +@node New Symbols, , Index, Top +@unnumbered New Symbols Since the Previous Edition + +@printindex tp +@end ignore @bye diff --git a/lispref/vol2.texi b/lispref/vol2.texi index d21723be037..706464c3316 100644 --- a/lispref/vol2.texi +++ b/lispref/vol2.texi @@ -1,214 +1,129 @@ -This file is obsolete, and no longer part of the Emacs Lisp Reference Manual. -It is still present in CVS in case we ever want to use some of it again. - -@c This is part of the GNU Emacs Lisp Reference Manual. +\input texinfo @c -*-texinfo-*- +@c This file is used for printing the GNU Emacs Lisp Reference Manual +@c in two volumes. It is a modified version of elisp.texi. @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, @c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. -@c See the file elisp.texi for copying conditions. - - -\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename elisp @settitle GNU Emacs Lisp Reference Manual: Volume 2 -@smallbook @c %**end of header - +@c See two-volume-cross-refs.txt. @tex -%%%% Experiment with smaller skip before sections and subsections. -%%%% --rjc 30mar92 - -\global\secheadingskip = 17pt plus 6pt minus 3pt -\global\subsecheadingskip = 14pt plus 6pt minus 3pt - -% The defaults are: -% \secheadingskip = 21pt plus 8pt minus 4pt -% \subsecheadingskip = 17pt plus 8pt minus 4pt +\message{Formatting for two volume edition...Volume 2...} +% +% Read special toc file, set up in two-volume.make. +\gdef\tocreadfilename{elisp2-toc-ready.toc} +% +% Don't make outlines, they're not needed and \readdatafile can't pay +% attention to the special definition above. +\global\let\pdfmakeoutlines=\relax +% +% Start volume 2 chapter numbering at 27; this must be listed as chapno26 +\global\chapno=26 @end tex -@finalout -@c tex -@c \overfullrule=0pt -@c end tex +@c Version of the manual and of Emacs. +@c Please remember to update the edition number in README as well. +@set VERSION 2.9 +@set EMACSVER 22.0.99 -@c Start volume 2 chapter numbering on chapter 21; -@c this must be listed as chapno 20. +@dircategory Emacs +@direntry +* Elisp: (elisp). The Emacs Lisp Reference Manual. +@end direntry + +@c in general, keep the following line commented out, unless doing a +@c copy of this manual that will be published. the manual should go +@c onto the distribution in the full, 8.5 x 11" size. +@set smallbook + +@ifset smallbook +@smallbook +@end ifset + +@c per rms and peterb, use 10pt fonts for the main text, mostly to +@c save on paper cost. +@c Do this inside @tex for now, so current makeinfo does not complain. @tex -\global\chapno=20 +@ifset smallbook +@fonttextsize 10 +@set EMACSVER 22 +\global\let\urlcolor=\Black % don't print links in grayscale +\global\let\linkcolor=\Black +@end ifset +\global\hbadness=6666 % don't worry about not-too-underfull boxes @end tex -@c ================================================================ -@c Note: I was unable to figure out how to get .aux files copied -@c properly in the time I had. Hence need to copy .aux file before -@c running Tex. --rjc - -@tex - -\message{} -\message{Redefining contents commands...} -\message{} - -% Special @contents command - -% This inputs fixed up table of contents file rather than create new one. -\global\def\contents{% - \startcontents{Table of Contents}% - \input elisp2-toc-ready.toc - \endgroup - \vfill \eject -} - -% Special @summarycontents command -% This inputs fixed up table of contents file rather than create new one. -\global\def\summarycontents{% - \startcontents{Short Contents}% - % - \let\chapentry = \shortchapentry - \let\unnumbchapentry = \shortunnumberedentry - % We want a true roman here for the page numbers. - \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl - \rm - \advance\baselineskip by 1pt % Open it up a little. - \def\secentry ##1##2##3##4{} - \def\unnumbsecentry ##1##2{} - \def\subsecentry ##1##2##3##4##5{} - \def\unnumbsubsecentry ##1##2{} - \def\subsubsecentry ##1##2##3##4##5##6{} - \def\unnumbsubsubsecentry ##1##2{} - \input elisp2-toc-ready.toc - \endgroup - \vfill \eject -} - -\message{} -\message{Formatting special two volume edition...Volume 2...} -\message{} -@end tex -@c ================================================================ - - -@c ==> This `elisp-small.texi' is a `smallbook' version of the manual. - -@c ==== Following are acceptable over and underfull hboxes in TeX ==== - -@c ----- -@c [163] [164] [165] [166]) (loading.texi Chapter 13 [167] [168] [169] -@c Overfull \hbox (20.5428pt too wide) in paragraph at lines 131--131 -@c []@ninett -@c setenv EMAC-SLOAD-PATH .:/user/bil/emacs:/usr/local/lib/emacs/lisp[] -@c ----- -@c (minibuf.texi Chapter 17 [206] [207] [208] [209] [210] [211] [212] [213] -@c [214] [215] -@c Overfull \hbox (2.09094pt too wide) in paragraph at lines 550--560 -@c @texttt map[] @textrm if @textsl require-match @textrm is -@c @texttt nil[]@textrm , or else with the keymap @texttt minibuffer- -@c ----- -@c (locals.texi Appendix @char 68 [533] [534] -@c Underfull \hbox (badness 2512) in paragraph at lines 4--4 -@c []@chaprm Appendix DStandard Buffer-Local - -@c ------------------------------------------------------------------- - -@c @c Combine indices. @synindex cp fn @syncodeindex vr fn @syncodeindex ky fn @syncodeindex pg fn -@syncodeindex tp fn -@c oops: texinfo-format-buffer ignores synindex -@c +@c We use the "type index" to index new functions and variables. +@c @syncodeindex tp fn -@ifinfo -This file documents GNU Emacs Lisp. +@copying +This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* +corresponding to Emacs version @value{EMACSVER}. -@c The edition number appears in several places in this file -@c and also in the file intro.texi. -This is edition 2.4 of the GNU Emacs Lisp Reference -Manual. It corresponds to Emacs Version 19.29. -@c Please REMEMBER to update edition number in *four* places in this file -@c and also in *one* place in ==> intro.texi <== -@c huh? i only found three real places where the edition is stated, and -@c one place where it is not stated explicitly ("this info file is newer -@c than the foobar edition"). --mew 13sep93 +Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, +1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software +Foundation, Inc. -Published by the Free Software Foundation -51 Franklin Street, Fifth Floor -Boston, MA 02110-1301 USA -@end ifinfo +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License,'' with the +Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover +Texts as in (a) below. A copy of the license is included in the +section entitled ``GNU Free Documentation License.'' -@setchapternewpage odd +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' +@end quotation +@end copying -@iftex -@shorttitlepage The GNU Emacs Lisp Reference Manual: Volume 2 -@end iftex @titlepage -@sp 1 -@center @titlefont{The} -@sp 1 -@center @titlefont{GNU Emacs Lisp} -@sp 1 -@center @titlefont{Reference Manual} -@sp 2 -@center GNU Emacs Version 19.29 -@center for Unix Users -@sp 1 -@center Edition 2.4, June 1995 -@sp 2 -@center @titlefont{Volume 2} -@sp 3 -@center by Bil Lewis, Dan LaLiberte, -@center and the GNU Manual Group +@title GNU Emacs Lisp Reference Manual +@subtitle Volume 2 +@subtitle For Emacs Version @value{EMACSVER} +@subtitle Revision @value{VERSION}, June 2007 + +@author by Bil Lewis, Dan LaLiberte, Richard Stallman +@author and the GNU Manual Group @page @vskip 0pt plus 1filll -Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - -@sp 2 -Edition 2.4 @* -Revised for Emacs Version 19.29,@* -June, 1995.@* -@sp 2 -ISBN 1-882114-71-X +@insertcopying @sp 2 Published by the Free Software Foundation @* -51 Franklin Street, Fifth Floor @* -Boston, MA 02110-1301 USA - -@sp 1 -Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that the -section entitled ``GNU General Public License'' is included -exactly as in the original, and provided that the entire resulting -derived work is distributed under the terms of a permission notice -identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that the section entitled ``GNU General Public License'' may be -included in a translation approved by the Free Software Foundation -instead of in the original English. +51 Franklin St, Fifth Floor @* +Boston, MA 02110-1301 @* +USA @* +ISBN 1-882114-74-4 @sp 2 Cover art by Etienne Suvasa. @end titlepage -@page -@node Top, Copying, (dir), (dir) -@ifinfo -This Info file contains edition 2.4 of the GNU Emacs Lisp Reference -Manual, corresponding to GNU Emacs version 19.29. -@end ifinfo +@c Print the tables of contents +@summarycontents +@contents + + +@ifnottex +@node Top, Introduction, (dir), (dir) +@top Emacs Lisp + +This Info file contains edition @value{VERSION} of the GNU Emacs Lisp +Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}. +@end ifnottex @menu -* Copying:: Conditions for copying and changing GNU Emacs. * Introduction:: Introduction and conventions used. * Lisp Data Types:: Data types of objects in Emacs Lisp. @@ -218,6 +133,7 @@ Manual, corresponding to GNU Emacs version 19.29. * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences. Certain functions act on any kind of sequence. The description of vectors is here as well. +* Hash Tables:: Very fast lookup-tables. * Symbols:: Symbols represent names, uniquely. * Evaluation:: How Lisp expressions are evaluated. @@ -226,9 +142,11 @@ Manual, corresponding to GNU Emacs version 19.29. * Functions:: A function is a Lisp program that can be invoked from other functions. * Macros:: Macros are a way to extend the Lisp language. +* Customization:: Writing customization declarations. * Loading:: Reading files of Lisp code into Lisp. * Byte Compilation:: Compilation makes programs run faster. +* Advising Functions:: Adding to the definition of a function. * Debugging:: Tools and tips for debugging Lisp programs. * Read and Print:: Converting Lisp objects to text and back. @@ -244,36 +162,51 @@ Manual, corresponding to GNU Emacs version 19.29. files are made. * Buffers:: Creating and using buffer objects. * Windows:: Manipulating windows and displaying buffers. -* Frames:: Making multiple X windows. +* Frames:: Making multiple system-level windows. * Positions:: Buffer positions and motion functions. * Markers:: Markers represent positions and update automatically when the text is changed. * Text:: Examining and changing text in buffers. +* Non-ASCII Characters:: Non-ASCII text in buffers and strings. * Searching and Matching:: Searching buffers for strings or regexps. * Syntax Tables:: The syntax table controls word and list parsing. * Abbrevs:: How Abbrev mode works, and its data structures. * Processes:: Running and communicating with subprocesses. +* Display:: Features for controlling the screen display. * System Interface:: Getting the user id, system type, environment variables, and other such things. -* Display:: Parameters controlling screen usage. - The bell. Waiting for input. Appendices -* Tips:: Advice for writing Lisp programs. +* Antinews:: Info for users downgrading to Emacs 21. +* GNU Free Documentation License:: The license for this documentation +* GPL:: Conditions for copying and changing GNU Emacs. +* Tips:: Advice and coding conventions for Emacs Lisp. * GNU Emacs Internals:: Building and dumping Emacs; internal data structures. * Standard Errors:: List of all error symbols. -* Standard Buffer-Local Variables:: List of variables local in all buffers. +* Standard Buffer-Local Variables:: + List of variables buffer-local in all buffers. * Standard Keymaps:: List of standard keymaps. * Standard Hooks:: List of standard hook variables. * Index:: Index including concepts, functions, variables, and other terms. - --- The Detailed Node Listing --- +@ignore +* New Symbols:: New functions and variables in Emacs @value{EMACSVER}. +@end ignore + +@c Do NOT modify the following 3 lines! They must have this form to +@c be correctly identified by `texinfo-multiple-files-update'. In +@c particular, the detailed menu header line MUST be identical to the +@c value of `texinfo-master-menu-header'. See texnfo-upd.el. + +@detailmenu + --- The Detailed Node Listing --- + --------------------------------- Here are other nodes that are inferiors of those already listed, mentioned here so you can get to them in one step: @@ -283,6 +216,7 @@ Introduction * Caveats:: Flaws and a request for help. * Lisp History:: Emacs Lisp is descended from Maclisp. * Conventions:: How the manual is formatted. +* Version Info:: Which Emacs version is running? * Acknowledgements:: The authors, editors, and sponsors of this manual. Conventions @@ -297,8 +231,10 @@ Conventions Format of Descriptions -* A Sample Function Description:: -* A Sample Variable Description:: +* A Sample Function Description:: A description of an imaginary + function, @code{foo}. +* A Sample Variable Description:: A description of an imaginary + variable, @code{electric-future-map}. Lisp Data Types @@ -306,6 +242,7 @@ Lisp Data Types * Comments:: Comments and their formatting conventions. * Programming Types:: Types found in all Lisp systems. * Editing Types:: Types specific to Emacs. +* Circular Objects:: Read syntax for circular structure. * Type Predicates:: Tests related to types. * Equality Predicates:: Tests of equality between any two objects. @@ -314,70 +251,95 @@ Programming Types * Integer Type:: Numbers without fractional parts. * Floating Point Type:: Numbers with fractional parts and with a large range. * Character Type:: The representation of letters, numbers and - control characters. + control characters. +* Symbol Type:: A multi-use object that refers to a function, + variable, property list, or itself. * Sequence Type:: Both lists and arrays are classified as sequences. * Cons Cell Type:: Cons cells, and lists (which are made from cons cells). * Array Type:: Arrays include strings and vectors. * String Type:: An (efficient) array of characters. * Vector Type:: One-dimensional arrays. -* Symbol Type:: A multi-use object that refers to a function, - variable, property list, or itself. +* Char-Table Type:: One-dimensional sparse arrays indexed by characters. +* Bool-Vector Type:: One-dimensional arrays of @code{t} or @code{nil}. +* Hash Table Type:: Super-fast lookup tables. * Function Type:: A piece of executable code you can call from elsewhere. * Macro Type:: A method of expanding an expression into another expression, more fundamental but less pretty. * Primitive Function Type:: A function written in C, callable from Lisp. * Byte-Code Type:: A function written in Lisp, then compiled. * Autoload Type:: A type used for automatically loading seldom-used - functions. + functions. -List Type +Character Type +* Basic Char Syntax:: Syntax for regular characters. +* General Escape Syntax:: How to specify characters by their codes. +* Ctl-Char Syntax:: Syntax for control characters. +* Meta-Char Syntax:: Syntax for meta-characters. +* Other Char Bits:: Syntax for hyper-, super-, and alt-characters. + +Cons Cell and List Types + +* Box Diagrams:: Drawing pictures of lists. * Dotted Pair Notation:: An alternative syntax for lists. * Association List Type:: A specially constructed list. +String Type + +* Syntax for Strings:: How to specify Lisp strings. +* Non-ASCII in Strings:: International characters in strings. +* Nonprinting Characters:: Literal unprintable characters in strings. +* Text Props and Strings:: Strings with text properties. + Editing Types * Buffer Type:: The basic object of editing. -* Window Type:: What makes buffers visible. -* Window Configuration Type::Save what the screen looks like. * Marker Type:: A position in a buffer. +* Window Type:: What makes buffers visible. +* Frame Type:: Windows subdivide frames. +* Window Configuration Type:: Recording the way a frame is subdivided. +* Frame Configuration Type:: Recording the status of all frames. * Process Type:: A process running on the underlying OS. * Stream Type:: Receive or send characters. * Keymap Type:: What function a keystroke invokes. -* Syntax Table Type:: What a character means. +* Overlay Type:: How an overlay is represented. Numbers -* Integer Basics:: Representation and range of integers. -* Float Basics:: Representation and range of floating point. -* Predicates on Numbers:: Testing for numbers. -* Comparison of Numbers:: Equality and inequality predicates. -* Arithmetic Operations:: How to add, subtract, multiply and divide. -* Bitwise Operations:: Logical and, or, not, shifting. -* Numeric Conversions:: Converting float to integer and vice versa. -* Math Functions:: Trig, exponential and logarithmic functions. -* Random Numbers:: Obtaining random integers, predictable or not. +* Integer Basics:: Representation and range of integers. +* Float Basics:: Representation and range of floating point. +* Predicates on Numbers:: Testing for numbers. +* Comparison of Numbers:: Equality and inequality predicates. +* Numeric Conversions:: Converting float to integer and vice versa. +* Arithmetic Operations:: How to add, subtract, multiply and divide. +* Rounding Operations:: Explicitly rounding floating point numbers. +* Bitwise Operations:: Logical and, or, not, shifting. +* Math Functions:: Trig, exponential and logarithmic functions. +* Random Numbers:: Obtaining random integers, predictable or not. Strings and Characters * String Basics:: Basic properties of strings and characters. * Predicates for Strings:: Testing whether an object is a string or char. * Creating Strings:: Functions to allocate new strings. +* Modifying Strings:: Altering the contents of an existing string. * Text Comparison:: Comparing characters or strings. -* String Conversion:: Converting characters or strings and vice versa. -* Formatting Strings:: @code{format}: Emacs's analog of @code{printf}. -* Character Case:: Case conversion functions. +* String Conversion:: Converting characters to strings and vice versa. +* Formatting Strings:: @code{format}: Emacs's analogue of @code{printf}. +* Case Conversion:: Case conversion functions. +* Case Tables:: Customizing case conversion. Lists * Cons Cells:: How lists are made out of cons cells. -* Lists as Boxes:: Graphical notation to explain lists. * List-related Predicates:: Is this object a list? Comparing two lists. * List Elements:: Extracting the pieces of a list. * Building Lists:: Creating list structure. +* List Variables:: Modifying lists stored in variables. * Modifying Lists:: Storing new pieces into an existing list. * Sets And Lists:: A list can represent a finite mathematical set. * Association Lists:: A list can represent a finite relation or mapping. +* Rings:: Managing a fixed-size ring of objects. Modifying Existing List Structure @@ -391,7 +353,17 @@ Sequences, Arrays, and Vectors * Sequence Functions:: Functions that accept any kind of sequence. * Arrays:: Characteristics of arrays in Emacs Lisp. * Array Functions:: Functions specifically for arrays. -* Vectors:: Functions specifically for vectors. +* Vectors:: Special characteristics of Emacs Lisp vectors. +* Vector Functions:: Functions specifically for vectors. +* Char-Tables:: How to work with char-tables. +* Bool-Vectors:: How to work with bool-vectors. + +Hash Tables + +* Creating Hash:: Functions to create hash tables. +* Hash Access:: Reading and writing the hash table contents. +* Defining Hash:: Defining new comparison methods +* Other Hash:: Miscellaneous. Symbols @@ -402,19 +374,28 @@ Symbols * Property Lists:: Each symbol has a property list for recording miscellaneous information. +Property Lists + +* Plists and Alists:: Comparison of the advantages of property + lists and association lists. +* Symbol Plists:: Functions to access symbols' property lists. +* Other Plists:: Accessing property lists stored elsewhere. + Evaluation * Intro Eval:: Evaluation in the scheme of things. -* Eval:: How to invoke the Lisp interpreter explicitly. * Forms:: How various sorts of objects are evaluated. * Quoting:: Avoiding evaluation (to put constants in the program). +* Eval:: How to invoke the Lisp interpreter explicitly. Kinds of Forms * Self-Evaluating Forms:: Forms that evaluate to themselves. * Symbol Forms:: Symbols evaluate as variables. * Classifying Lists:: How to distinguish various sorts of list forms. +* Function Indirection:: When a symbol appears as the car of a list, + we find the real function via the symbol. * Function Forms:: Forms that call functions. * Macro Forms:: Forms that call macros. * Special Forms:: "Special forms" are idiosyncratic primitives, @@ -425,7 +406,7 @@ Kinds of Forms Control Structures * Sequencing:: Evaluation in textual order. -* Conditionals:: @code{if}, @code{cond}. +* Conditionals:: @code{if}, @code{cond}, @code{when}, @code{unless}. * Combining Conditions:: @code{and}, @code{or}, @code{not}. * Iteration:: @code{while} loops. * Nonlocal Exits:: Jumping out of a sequence. @@ -444,6 +425,7 @@ Errors * Processing of Errors:: What Emacs does when you report an error. * Handling Errors:: How you can trap errors and continue execution. * Error Symbols:: How errors are classified for trapping them. +* Standard Errors:: List of all error symbols. Variables @@ -452,11 +434,21 @@ Variables * Local Variables:: Variable values that exist only temporarily. * Void Variables:: Symbols that lack values. * Defining Variables:: A definition says a symbol is used as a variable. +* Tips for Defining:: Things you should think about when you + define a variable. * Accessing Variables:: Examining values of variables whose names are known only at run time. * Setting Variables:: Storing new values in variables. * Variable Scoping:: How Lisp chooses among local and global values. * Buffer-Local Variables:: Variable values in effect only in one buffer. +* Frame-Local Variables:: Variable values in effect only in one frame. +* Future Local Variables:: New kinds of local values we might add some day. +* File Local Variables:: Handling local variable lists in files. +* Variable Aliases:: Variables that are aliases for other variables. +* Variables with Restricted Values:: Non-constant variables whose value can + @emph{not} be an arbitrary Lisp object. +* Standard Buffer-Local Variables:: + List of variables buffer-local in all buffers. Scoping Rules for Variable Bindings @@ -472,7 +464,7 @@ Buffer-Local Variables * Intro to Buffer-Local:: Introduction and concepts. * Creating Buffer-Local:: Creating and destroying buffer-local bindings. * Default Value:: The default value is seen in buffers - that don't have their own local values. + that don't have their own buffer-local values. Functions @@ -485,6 +477,9 @@ Functions * Anonymous Functions:: Lambda-expressions are functions with no names. * Function Cells:: Accessing or setting the function definition of a symbol. +* Obsolete Functions:: Declaring functions obsolete. +* Inline Functions:: Defining functions that the compiler will open code. +* Function Safety:: Determining whether a function is safe to call. * Related Topics:: Cross-references to specific Lisp primitives that have a special bearing on how functions work. @@ -505,30 +500,86 @@ Macros * Backquote:: Easier construction of list structure. * Problems with Macros:: Don't evaluate the macro arguments too many times. Don't hide the user's variables. +* Indenting Macros:: Specifying how to indent macro calls. + +Common Problems Using Macros + +* Wrong Time:: Do the work in the expansion, not in the macro. +* Argument Evaluation:: The expansion should evaluate each macro arg once. +* Surprising Local Vars:: Local variable bindings in the expansion + require special care. +* Eval During Expansion:: Don't evaluate them; put them in the expansion. +* Repeated Expansion:: Avoid depending on how many times expansion is done. + +Writing Customization Definitions + +* Common Keywords:: Common keyword arguments for all kinds of + customization declarations. +* Group Definitions:: Writing customization group definitions. +* Variable Definitions:: Declaring user options. +* Customization Types:: Specifying the type of a user option. + +Customization Types + +* Simple Types:: Simple customization types: sexp, integer, number, + string, file, directory, alist. +* Composite Types:: Build new types from other types or data. +* Splicing into Lists:: Splice elements into list with @code{:inline}. +* Type Keywords:: Keyword-argument pairs in a customization type. +* Defining New Types:: Give your type a name. Loading * How Programs Do Loading:: The @code{load} function and others. +* Load Suffixes:: Details about the suffixes that @code{load} tries. +* Library Search:: Finding a library to load. +* Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files. * Autoload:: Setting up a function to autoload. -* Named Features:: Loading a library if it isn't already loaded. * Repeated Loading:: Precautions about loading a file twice. +* Named Features:: Loading a library if it isn't already loaded. +* Where Defined:: Finding which file defined a certain symbol. +* Unloading:: How to "unload" a library that was loaded. +* Hooks for Loading:: Providing code to be run when + particular libraries are loaded. Byte Compilation +* Speed of Byte-Code:: An example of speedup from byte compilation. * Compilation Functions:: Byte compilation functions. +* Docs and Compilation:: Dynamic loading of documentation strings. +* Dynamic Loading:: Dynamic loading of individual functions. +* Eval During Compile:: Code to be evaluated when you compile. +* Compiler Errors:: Handling compiler error messages. +* Byte-Code Objects:: The data type used for byte-compiled functions. * Disassembly:: Disassembling byte-code; how to read byte-code. +Advising Emacs Lisp Functions + +* Simple Advice:: A simple example to explain the basics of advice. +* Defining Advice:: Detailed description of @code{defadvice}. +* Around-Advice:: Wrapping advice around a function's definition. +* Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}. +* Activation of Advice:: Advice doesn't do anything until you activate it. +* Enabling Advice:: You can enable or disable each piece of advice. +* Preactivation:: Preactivation is a way of speeding up the + loading of compiled advice. +* Argument Access in Advice:: How advice can access the function's arguments. +* Advising Primitives:: Accessing arguments when advising a primitive. +* Combined Definition:: How advice is implemented. + Debugging Lisp Programs * Debugger:: How the Emacs Lisp debugger is implemented. +* Edebug:: A source-level Emacs Lisp debugger. * Syntax Errors:: How to find syntax errors. +* Test Coverage:: Ensuring you have tested all branches in your code. * Compilation Errors:: How to find errors that show up in byte compilation. -* Edebug:: A source-level Emacs Lisp debugger. The Lisp Debugger * Error Debugging:: Entering the debugger when an error happens. +* Infinite Loops:: Stopping and debugging a program that doesn't exit. * Function Debugging:: Entering it when a certain function is called. * Explicit Debug:: Entering it at a certain point in the program. * Using Debugger:: What the debugger does; what you see while in it. @@ -536,6 +587,27 @@ The Lisp Debugger * Invoking the Debugger:: How to call the function @code{debug}. * Internals of Debugger:: Subroutines of the debugger, and global variables. +Edebug + +* Using Edebug:: Introduction to use of Edebug. +* Instrumenting:: You must instrument your code + in order to debug it with Edebug. +* Edebug Execution Modes:: Execution modes, stopping more or less often. +* Jumping:: Commands to jump to a specified place. +* Edebug Misc:: Miscellaneous commands. +* Breaks:: Setting breakpoints to make the program stop. +* Trapping Errors:: Trapping errors with Edebug. +* Edebug Views:: Views inside and outside of Edebug. +* Edebug Eval:: Evaluating expressions within Edebug. +* Eval List:: Expressions whose values are displayed + each time you enter Edebug. +* Printing in Edebug:: Customization of printing. +* Trace Buffer:: How to produce trace output in a buffer. +* Coverage Testing:: How to test evaluation coverage. +* The Outside Context:: Data that Edebug saves and restores. +* Edebug and Macros:: Specifying how to handle macro calls. +* Edebug Options:: Option variables for customizing Edebug. + Debugging Invalid Lisp Syntax * Excess Open:: How to find a spurious open paren or missing close. @@ -550,14 +622,25 @@ Reading and Printing Lisp Objects * Output Streams:: Various data types that can be used as output streams. * Output Functions:: Functions to print Lisp objects as text. +* Output Variables:: Variables that control what the printing + functions do. Minibuffers * Intro to Minibuffers:: Basic information about minibuffers. * Text from Minibuffer:: How to read a straight text string. * Object from Minibuffer:: How to read a Lisp object or expression. +* Minibuffer History:: Recording previous minibuffer inputs + so the user can reuse them. +* Initial Input:: Specifying initial contents for the minibuffer. * Completion:: How to invoke and customize completion. * Yes-or-No Queries:: Asking a question with a simple answer. +* Multiple Queries:: Asking a series of similar questions. +* Reading a Password:: Reading a password from the terminal. +* Minibuffer Commands:: Commands used as key bindings in minibuffers. +* Minibuffer Contents:: How such commands access the minibuffer text. +* Minibuffer Windows:: Operating on the special minibuffer windows. +* Recursive Mini:: Whether recursive entry to minibuffer is allowed. * Minibuffer Misc:: Various customization hooks and variables. Completion @@ -577,8 +660,10 @@ Command Loop * Defining Commands:: Specifying how a function should read arguments. * Interactive Call:: Calling a command, so that it will read arguments. * Command Loop Info:: Variables set by the command loop for you to examine. +* Adjusting Point:: Adjustment of point after a command. * Input Events:: What input looks like when you read it. * Reading Input:: How to read input events from the keyboard or mouse. +* Special Events:: Events processed immediately and individually. * Waiting:: Waiting for user input or elapsed time. * Quitting:: How @kbd{C-g} works. How to catch or defer quitting. * Prefix Command Arguments:: How the commands to set prefix args work. @@ -595,50 +680,155 @@ Defining Commands in various ways. * Interactive Examples:: Examples of how to read interactive arguments. +Input Events + +* Keyboard Events:: Ordinary characters--keys with symbols on them. +* Function Keys:: Function keys--keys with names, not symbols. +* Mouse Events:: Overview of mouse events. +* Click Events:: Pushing and releasing a mouse button. +* Drag Events:: Moving the mouse before releasing the button. +* Button-Down Events:: A button was pushed and not yet released. +* Repeat Events:: Double and triple click (or drag, or down). +* Motion Events:: Just moving the mouse, not pushing a button. +* Focus Events:: Moving the mouse between frames. +* Misc Events:: Other events the system can generate. +* Event Examples:: Examples of the lists for mouse events. +* Classifying Events:: Finding the modifier keys in an event symbol. +* Accessing Events:: Functions to extract info from events. +* Strings of Events:: Special considerations for putting + keyboard character events in a string. + +Reading Input + +* Key Sequence Input:: How to read one key sequence. +* Reading One Event:: How to read just one event. +* Event Mod:: How Emacs modifies events as they are read. +* Invoking the Input Method:: How reading an event uses the input method. +* Quoted Character Input:: Asking the user to specify a character. +* Event Input Misc:: How to reread or throw away input events. + Keymaps -* Keymap Terminology:: Definitions of terms pertaining to keymaps. -* Format of Keymaps:: What a keymap looks like as a Lisp object. -* Creating Keymaps:: Functions to create and copy keymaps. -* Inheritance and Keymaps:: How one keymap can inherit the bindings - of another keymap. -* Prefix Keys:: Defining a key with a keymap as its definition. -* Menu Keymaps:: A keymap can define a menu for X - or for use from the terminal. -* Active Keymaps:: Each buffer has a local keymap - to override the standard (global) bindings. - Each minor mode can also override them. -* Key Lookup:: How extracting elements from keymaps works. +* Key Sequences:: Key sequences as Lisp objects. +* Keymap Basics:: Basic concepts of keymaps. +* Format of Keymaps:: What a keymap looks like as a Lisp object. +* Creating Keymaps:: Functions to create and copy keymaps. +* Inheritance and Keymaps:: How one keymap can inherit the bindings + of another keymap. +* Prefix Keys:: Defining a key with a keymap as its definition. +* Active Keymaps:: How Emacs searches the active keymaps + for a key binding. +* Searching Keymaps:: A pseudo-Lisp summary of searching active maps. +* Controlling Active Maps:: Each buffer has a local keymap + to override the standard (global) bindings. + A minor mode can also override them. +* Key Lookup:: How extracting elements from keymaps works. * Functions for Key Lookup:: How to request key lookup. -* Changing Key Bindings:: Redefining a key in a keymap. -* Key Binding Commands:: Interactive interfaces for redefining keys. -* Scanning Keymaps:: Looking through all keymaps, for printing help. +* Changing Key Bindings:: Redefining a key in a keymap. +* Remapping Commands:: A keymap can translate one command to another. +* Translation Keymaps:: Keymaps for translating sequences of events. +* Key Binding Commands:: Interactive interfaces for redefining keys. +* Scanning Keymaps:: Looking through all keymaps, for printing help. +* Menu Keymaps:: A keymap can define a menu for X + or for use from the terminal. +* Standard Keymaps:: List of standard keymaps. Major and Minor Modes +* Hooks:: How to use hooks; how to write code that + provides hooks. * Major Modes:: Defining major modes. * Minor Modes:: Defining minor modes. * Mode Line Format:: Customizing the text that appears in the mode line. -* Hooks:: How to use hooks; how to write code that - provides hooks. +* Imenu:: How a mode can provide a menu + of definitions in the buffer. +* Font Lock Mode:: How modes can highlight text according to syntax. +* Desktop Save Mode:: How modes can have buffer state saved between + Emacs sessions. + +Menu Keymaps + +* Defining Menus:: How to make a keymap that defines a menu. +* Mouse Menus:: How users actuate the menu with the mouse. +* Keyboard Menus:: How users actuate the menu with the keyboard. +* Menu Example:: Making a simple menu. +* Menu Bar:: How to customize the menu bar. +* Tool Bar:: A tool bar is a row of images. +* Modifying Menus:: How to add new items to a menu. + +Defining Menus + +* Simple Menu Items:: A simple kind of menu key binding, + limited in capabilities. +* Extended Menu Items:: More powerful menu item definitions + let you specify keywords to enable + various features. +* Menu Separators:: Drawing a horizontal line through a menu. +* Alias Menu Items:: Using command aliases in menu items. + +Major and Minor Modes + +* Hooks:: How to use hooks; how to write code that provides hooks. +* Major Modes:: Defining major modes. +* Minor Modes:: Defining minor modes. +* Mode Line Format:: Customizing the text that appears in the mode line. +* Imenu:: How a mode can provide a menu + of definitions in the buffer. +* Font Lock Mode:: How modes can highlight text according to syntax. +* Desktop Save Mode:: How modes can have buffer state saved between + Emacs sessions. Major Modes +* Major Mode Basics:: * Major Mode Conventions:: Coding conventions for keymaps, etc. * Example Major Modes:: Text mode and Lisp modes. * Auto Major Mode:: How Emacs chooses the major mode automatically. * Mode Help:: Finding out how to use a mode. +* Derived Modes:: Defining a new major mode based on another major + mode. +* Generic Modes:: Defining a simple major mode that supports + comment syntax and Font Lock mode. +* Mode Hooks:: Hooks run at the end of major mode functions. Minor Modes * Minor Mode Conventions:: Tips for writing a minor mode. * Keymaps and Minor Modes:: How a minor mode can have its own keymap. +* Defining Minor Modes:: A convenient facility for defining minor modes. Mode Line Format +* Mode Line Basics:: * Mode Line Data:: The data structure that controls the mode line. * Mode Line Variables:: Variables used in that data structure. * %-Constructs:: Putting information into a mode line. +* Properties in Mode:: Using text properties in the mode line. +* Header Lines:: Like a mode line, but at the top. +* Emulating Mode Line:: Formatting text as the mode line would. + +Font Lock Mode + +* Font Lock Basics:: Overview of customizing Font Lock. +* Search-based Fontification:: Fontification based on regexps. +* Customizing Keywords:: Customizing search-based fontification. +* Other Font Lock Variables:: Additional customization facilities. +* Levels of Font Lock:: Each mode can define alternative levels + so that the user can select more or less. +* Precalculated Fontification:: How Lisp programs that produce the buffer + contents can also specify how to fontify it. +* Faces for Font Lock:: Special faces specifically for Font Lock. +* Syntactic Font Lock:: Fontification based on syntax tables. +* Setting Syntax Properties:: Defining character syntax based on context + using the Font Lock mechanism. +* Multiline Font Lock:: How to coerce Font Lock into properly + highlighting multiline constructs. + +Multiline Font Lock Constructs + +* Font Lock Multiline:: Marking multiline chunks with a text property +* Region to Fontify:: Controlling which region gets refontified + after a buffer change. Documentation @@ -657,11 +847,15 @@ Files * Reading from Files:: Reading files into other buffers. * Writing to Files:: Writing new files from parts of buffers. * File Locks:: Locking and unlocking files, to prevent - simultaneous editing by two people. -* Information about Files:: Testing existence, accessibility, size of files. -* Contents of Directories:: Getting a list of the files in a directory. -* Changing File Attributes:: Renaming files, changing protection, etc. -* File Names:: Decomposing and expanding file names. + simultaneous editing by two people. +* Information about Files:: Testing existence, accessibility, size of files. +* Changing Files:: Renaming files, changing protection, etc. +* File Names:: Decomposing and expanding file names. +* Contents of Directories:: Getting a list of the files in a directory. +* Create/Delete Dirs:: Creating and Deleting Directories. +* Magic File Names:: Defining "magic" special handling + for certain file names. +* Format Conversion:: Conversion to and from various file formats. Visiting Files @@ -671,19 +865,23 @@ Visiting Files Information about Files * Testing Accessibility:: Is a given file readable? Writable? -* Kinds of Files:: Is it a directory? A link? +* Kinds of Files:: Is it a directory? A symbolic link? +* Truenames:: Eliminating symbolic links from a file name. * File Attributes:: How large is it? Any other names? Etc. +* Locating Files:: How to find a file in standard places. File Names * File Name Components:: The directory part of a file name, and the rest. -* Directory Names:: A directory's name as a directory - is different from its name as a file. * Relative File Names:: Some file names are relative to a current directory. +* Directory Names:: A directory's name as a directory + is different from its name as a file. * File Name Expansion:: Converting relative file names to absolute ones. * Unique File Names:: Generating names for temporary files. * File Name Completion:: Finding the completions for a given file name. +* Standard File Names:: If your package uses a fixed file name, + how to handle various operating systems simply. Backups and Auto-Saving @@ -705,19 +903,22 @@ Backup Files Buffers * Buffer Basics:: What is a buffer? +* Current Buffer:: Designating a buffer as current + so primitives will access its contents. * Buffer Names:: Accessing and changing buffer names. * Buffer File Name:: The buffer file name indicates which file is visited. * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. * Modification Time:: Determining whether the visited file was changed - "behind Emacs's back". + ``behind Emacs's back''. * Read Only Buffers:: Modifying text is not allowed in a read-only buffer. * The Buffer List:: How to look at all the existing buffers. * Creating Buffers:: Functions that create buffers. * Killing Buffers:: Buffers exist until explicitly killed. -* Current Buffer:: Designating a buffer as current - so primitives will access its contents. +* Indirect Buffers:: An indirect buffer shares text with some + other buffer. +* Buffer Gap:: The gap in the buffer. Windows @@ -727,21 +928,28 @@ Windows * Selecting Windows:: The selected window is the one that you edit in. * Cyclic Window Ordering:: Moving around the existing windows. * Buffers and Windows:: Each window displays the contents of a buffer. -* Displaying Buffers:: Higher-lever functions for displaying a buffer +* Displaying Buffers:: Higher-level functions for displaying a buffer and choosing a window for it. +* Choosing Window:: How to choose a window for displaying a buffer. * Window Point:: Each window has its own location of point. * Window Start:: The display-start position controls which text is on-screen in the window. -* Vertical Scrolling:: Moving text up and down in the window. -* Horizontal Scrolling:: Moving text sideways on the window. +* Textual Scrolling:: Moving text up and down through the window. +* Vertical Scrolling:: Moving the contents up and down on the window. +* Horizontal Scrolling:: Moving the contents sideways on the window. * Size of Window:: Accessing the size of a window. * Resizing Windows:: Changing the size of a window. +* Coordinates and Windows:: Converting coordinates to windows. +* Window Tree:: The layout and sizes of all windows in a frame. * Window Configurations:: Saving and restoring the state of the screen. +* Window Hooks:: Hooks for scrolling, window size changes, + redisplay going past a certain point, + or window configuration changes. Frames * Creating Frames:: Creating additional frames. -* Multiple Displays:: Creating frames on other X displays. +* Multiple Displays:: Creating frames on other displays. * Frame Parameters:: Controlling frame size, position, font, etc. * Frame Titles:: Automatic updating of frame titles. * Deleting Frames:: Frames last until explicitly deleted. @@ -751,18 +959,40 @@ Frames * Minibuffers and Frames:: How a frame finds the minibuffer to use. * Input Focus:: Specifying the selected frame. * Visibility of Frames:: Frames may be visible or invisible, or icons. -* Raising and Lowering:: Raising a frame makes it hide other X windows; - lowering it makes the others hide them. +* Raising and Lowering:: Raising a frame makes it hide other windows; + lowering it puts it underneath the others. * Frame Configurations:: Saving the state of all frames. * Mouse Tracking:: Getting events that say when the mouse moves. * Mouse Position:: Asking where the mouse is, or moving it. * Pop-Up Menus:: Displaying a menu for the user to select from. * Dialog Boxes:: Displaying a box to ask yes or no. -* Pointer Shapes:: Specifying the shape of the mouse pointer. -* X Selections:: Transferring text to and from other X clients. +* Pointer Shape:: Specifying the shape of the mouse pointer. +* Window System Selections::Transferring text to and from other windows. +* Drag and Drop:: Internals of Drag-and-Drop implementation. * Color Names:: Getting the definitions of color names. +* Text Terminal Colors:: Defining colors for text-only terminals. * Resources:: Getting resource values from the server. -* Server Data:: Getting info about the X server. +* Display Feature Testing:: Determining the features of a terminal. + +Frame Parameters + +* Parameter Access:: How to change a frame's parameters. +* Initial Parameters:: Specifying frame parameters when you make a frame. +* Window Frame Parameters:: List of frame parameters for window systems. +* Size and Position:: Changing the size and position of a frame. +* Geometry:: Parsing geometry specifications. + +Window Frame Parameters + +* Basic Parameters:: Parameters that are fundamental. +* Position Parameters:: The position of the frame on the screen. +* Size Parameters:: Frame's size. +* Layout Parameters:: Size of parts of the frame, and + enabling or disabling some parts. +* Buffer Parameters:: Which buffers have been or should be shown. +* Management Parameters:: Communicating with the window manager. +* Cursor Parameters:: Controlling the cursor appearance. +* Color Parameters:: Colors of various parts of the frame. Positions @@ -786,9 +1016,11 @@ Markers * Overview of Markers:: The components of a marker, and how it relocates. * Predicates on Markers:: Testing whether an object is a marker. * Creating Markers:: Making empty markers or markers at certain places. -* Information from Markers:: Finding the marker's buffer or character - position. -* Changing Markers:: Moving the marker to a new buffer or position. +* Information from Markers::Finding the marker's buffer or character + position. +* Marker Insertion Types:: Two ways a marker can relocate when you + insert where it points. +* Moving Markers:: Moving the marker to a new buffer or position. * The Mark:: How "the mark" is implemented with a marker. * The Region:: How to access "the region". @@ -796,6 +1028,7 @@ Text * Near Point:: Examining text in the vicinity of point. * Buffer Contents:: Examining text in a general fashion. +* Comparing Text:: Comparing substrings of buffers. * Insertion:: Adding new text to a buffer. * Commands for Insertion:: User-level commands to insert text. * Deletion:: Removing text from a buffer. @@ -803,21 +1036,32 @@ Text * The Kill Ring:: Where removed text sometimes is saved for later use. * Undo:: Undoing changes to the text of a buffer. -* Auto Filling:: How auto-fill mode is implemented to break lines. +* Maintaining Undo:: How to enable and disable undo information. + How to control how much information is kept. * Filling:: Functions for explicit filling. * Margins:: How to specify margins for filling commands. +* Adaptive Fill:: Adaptive Fill mode chooses a fill prefix + from context. +* Auto Filling:: How auto-fill mode is implemented to break lines. * Sorting:: Functions for sorting parts of the buffer. -* Indentation:: Functions to insert or adjust indentation. * Columns:: Computing horizontal positions, and using them. +* Indentation:: Functions to insert or adjust indentation. * Case Changes:: Case conversion of parts of the buffer. +* Text Properties:: Assigning Lisp property lists to text characters. * Substitution:: Replacing a given character wherever it appears. +* Transposition:: Swapping two portions of a buffer. * Registers:: How registers are implemented. Accessing the text or position stored in a register. +* Base 64:: Conversion to or from base 64 encoding. +* MD5 Checksum:: Compute the MD5 "message digest"/"checksum". +* Atomic Changes:: Installing several buffer changes "atomically". +* Change Hooks:: Supplying functions to be run when text is changed. The Kill Ring * Kill Ring Concepts:: What text looks like in the kill ring. * Kill Functions:: Functions that kill text. +* Yanking:: How yanking is done. * Yank Commands:: Commands that access the kill ring. * Low-Level Kill Ring:: Functions and variables for kill ring access. * Internals of Kill Ring:: Variables that hold kill-ring data. @@ -831,48 +1075,130 @@ Indentation * Indent Tabs:: Adjustable, typewriter-like tab stops. * Motion by Indent:: Move to first non-blank character. +Text Properties + +* Examining Properties:: Looking at the properties of one character. +* Changing Properties:: Setting the properties of a range of text. +* Property Search:: Searching for where a property changes value. +* Special Properties:: Particular properties with special meanings. +* Format Properties:: Properties for representing formatting of text. +* Sticky Properties:: How inserted text gets properties from + neighboring text. +* Saving Properties:: Saving text properties in files, and reading + them back. +* Lazy Properties:: Computing text properties in a lazy fashion + only when text is examined. +* Clickable Text:: Using text properties to make regions of text + do something when you click on them. +* Links and Mouse-1:: How to make @key{Mouse-1} follow a link. +* Fields:: The @code{field} property defines + fields within the buffer. +* Not Intervals:: Why text properties do not use + Lisp-visible text intervals. + +Non-ASCII Characters + +* Text Representations:: Unibyte and multibyte representations +* Converting Representations:: Converting unibyte to multibyte and vice versa. +* Selecting a Representation:: Treating a byte sequence as unibyte or multi. +* Character Codes:: How unibyte and multibyte relate to + codes of individual characters. +* Character Sets:: The space of possible character codes + is divided into various character sets. +* Chars and Bytes:: More information about multibyte encodings. +* Splitting Characters:: Converting a character to its byte sequence. +* Scanning Charsets:: Which character sets are used in a buffer? +* Translation of Characters:: Translation tables are used for conversion. +* Coding Systems:: Coding systems are conversions for saving files. +* Input Methods:: Input methods allow users to enter various + non-ASCII characters without special keyboards. +* Locales:: Interacting with the POSIX locale. + +Coding Systems + +* Coding System Basics:: Basic concepts. +* Encoding and I/O:: How file I/O functions handle coding systems. +* Lisp and Coding Systems:: Functions to operate on coding system names. +* User-Chosen Coding Systems:: Asking the user to choose a coding system. +* Default Coding Systems:: Controlling the default choices. +* Specifying Coding Systems:: Requesting a particular coding system + for a single file operation. +* Explicit Encoding:: Encoding or decoding text without doing I/O. +* Terminal I/O Encoding:: Use of encoding for terminal I/O. +* MS-DOS File Types:: How DOS "text" and "binary" files + relate to coding systems. + Searching and Matching * String Search:: Search for an exact match. +* Searching and Case:: Case-independent or case-significant searching. * Regular Expressions:: Describing classes of strings. * Regexp Search:: Searching for a match for a regexp. -* Match Data:: Finding out which part of the text matched - various parts of a regexp, after regexp search. -* Saving Match Data:: Saving and restoring this information. +* POSIX Regexps:: Searching POSIX-style for the longest match. +* Match Data:: Finding out which part of the text matched, + after a string or regexp search. +* Search and Replace:: Commands that loop, searching and replacing. * Standard Regexps:: Useful regexps for finding sentences, pages,... -* Searching and Case:: Case-independent or case-significant searching. Regular Expressions * Syntax of Regexps:: Rules for writing regular expressions. * Regexp Example:: Illustrates regular expression syntax. +* Regexp Functions:: Functions for operating on regular expressions. + +Syntax of Regular Expressions + +* Regexp Special:: Special characters in regular expressions. +* Char Classes:: Character classes used in regular expressions. +* Regexp Backslash:: Backslash-sequences in regular expressions. + +The Match Data + +* Replacing Match:: Replacing a substring that was matched. +* Simple Match Data:: Accessing single items of match data, + such as where a particular subexpression started. +* Entire Match Data:: Accessing the entire match data at once, as a list. +* Saving Match Data:: Saving and restoring the match data. Syntax Tables +* Syntax Basics:: Basic concepts of syntax tables. * Syntax Descriptors:: How characters are classified. * Syntax Table Functions:: How to create, examine and alter syntax tables. +* Syntax Properties:: Overriding syntax with text properties. +* Motion and Syntax:: Moving over characters with certain syntaxes. * Parsing Expressions:: Parsing balanced expressions using the syntax table. * Standard Syntax Tables:: Syntax tables used by various major modes. * Syntax Table Internals:: How syntax table information is stored. +* Categories:: Another way of classifying character syntax. Syntax Descriptors * Syntax Class Table:: Table of syntax classes. * Syntax Flags:: Additional flags each character can have. +Parsing Expressions + +* Motion via Parsing:: Motion functions that work by parsing. +* Position Parse:: Determining the syntactic state of a position. +* Parser State:: How Emacs represents a syntactic state. +* Low-Level Parsing:: Parsing across a specified region. +* Control Parsing:: Parameters that affect parsing. + Abbrevs And Abbrev Expansion * Abbrev Mode:: Setting up Emacs for abbreviation. -* Tables: Abbrev Tables. Creating and working with abbrev tables. +* Abbrev Tables:: Creating and working with abbrev tables. * Defining Abbrevs:: Specifying abbreviations and their expansions. -* Files: Abbrev Files. Saving abbrevs in files. -* Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines. +* Abbrev Files:: Saving abbrevs in files. +* Abbrev Expansion:: Controlling expansion; expansion subroutines. * Standard Abbrev Tables:: Abbrev tables used by various major modes. Processes * Subprocess Creation:: Functions that start subprocesses. +* Shell Arguments:: Quoting an argument to pass it to a shell. * Synchronous Processes:: Details of using synchronous subprocesses. * Asynchronous Processes:: Starting up an asynchronous subprocess. * Deleting Processes:: Eliminating an asynchronous subprocess. @@ -882,68 +1208,219 @@ Processes an asynchronous subprocess. * Output from Processes:: Collecting output from an asynchronous subprocess. * Sentinels:: Sentinels run when process run-status changes. +* Query Before Exit:: Whether to query if exiting will kill a process. +* Transaction Queues:: Transaction-based communication with subprocesses. * Network:: Opening network connections. +* Network Servers:: Network servers let Emacs accept net connections. +* Datagrams:: UDP network connections. +* Low-Level Network:: Lower-level but more general function + to create connections and servers. +* Misc Network:: Additional relevant functions for network connections. +* Byte Packing:: Using bindat to pack and unpack binary data. Receiving Output from Processes * Process Buffers:: If no filter, output is put in a buffer. * Filter Functions:: Filter functions accept output from the process. +* Decoding Output:: Filters can get unibyte or multibyte strings. * Accepting Output:: How to wait until process output arrives. +Low-Level Network Access + +* Proc: Network Processes. Using @code{make-network-process}. +* Options: Network Options. Further control over network connections. +* Features: Network Feature Testing. + Determining which network features work on + the machine you are using. + +Packing and Unpacking Byte Arrays + +* Bindat Spec:: Describing data layout. +* Bindat Functions:: Doing the unpacking and packing. +* Bindat Examples:: Samples of what bindat.el can do for you! + +Emacs Display + +* Refresh Screen:: Clearing the screen and redrawing everything on it. +* Forcing Redisplay:: Forcing redisplay. +* Truncation:: Folding or wrapping long text lines. +* The Echo Area:: Displaying messages at the bottom of the screen. +* Warnings:: Displaying warning messages for the user. +* Invisible Text:: Hiding part of the buffer text. +* Selective Display:: Hiding part of the buffer text (the old way). +* Temporary Displays:: Displays that go away automatically. +* Overlays:: Use overlays to highlight parts of the buffer. +* Width:: How wide a character or string is on the screen. +* Line Height:: Controlling the height of lines. +* Faces:: A face defines a graphics style + for text characters: font, colors, etc. +* Fringes:: Controlling window fringes. +* Scroll Bars:: Controlling vertical scroll bars. +* Display Property:: Enabling special display features. +* Images:: Displaying images in Emacs buffers. +* Buttons:: Adding clickable buttons to Emacs buffers. +* Abstract Display:: Emacs' Widget for Object Collections. +* Blinking:: How Emacs shows the matching open parenthesis. +* Usual Display:: The usual conventions for displaying nonprinting chars. +* Display Tables:: How to specify other conventions. +* Beeping:: Audible signal to the user. +* Window Systems:: Which window system is being used. + +The Echo Area + +* Displaying Messages:: Explicitly displaying text in the echo area. +* Progress:: Informing user about progress of a long operation. +* Logging Messages:: Echo area messages are logged for the user. +* Echo Area Customization:: Controlling the echo area. + +Reporting Warnings + +* Warning Basics:: Warnings concepts and functions to report them. +* Warning Variables:: Variables programs bind to customize their warnings. +* Warning Options:: Variables users set to control display of warnings. + +Overlays + +* Managing Overlays:: Creating and moving overlays. +* Overlay Properties:: How to read and set properties. + What properties do to the screen display. +* Finding Overlays:: Searching for overlays. + +Faces + +* Defining Faces:: How to define a face with @code{defface}. +* Face Attributes:: What is in a face? +* Attribute Functions:: Functions to examine and set face attributes. +* Displaying Faces:: How Emacs combines the faces specified for + a character. +* Font Selection:: Finding the best available font for a face. +* Face Functions:: How to define and examine faces. +* Auto Faces:: Hook for automatic face assignment. +* Font Lookup:: Looking up the names of available fonts + and information about them. +* Fontsets:: A fontset is a collection of fonts + that handle a range of character sets. + +Fringes + +* Fringe Size/Pos:: Specifying where to put the window fringes. +* Fringe Indicators:: Displaying indicator icons in the window fringes. +* Fringe Cursors:: Displaying cursors in the right fringe. +* Fringe Bitmaps:: Specifying bitmaps for fringe indicators. +* Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes. +* Overlay Arrow:: Display of an arrow to indicate position. + +The @code{display} Property + +* Specified Space:: Displaying one space with a specified width. +* Pixel Specification:: Specifying space width or height in pixels. +* Other Display Specs:: Displaying an image; magnifying text; moving it + up or down on the page; adjusting the width + of spaces within text. +* Display Margins:: Displaying text or images to the side of + the main text. + +Images + +* Image Descriptors:: How to specify an image for use in @code{:display}. +* XBM Images:: Special features for XBM format. +* XPM Images:: Special features for XPM format. +* GIF Images:: Special features for GIF format. +* PostScript Images:: Special features for PostScript format. +* Other Image Types:: Various other formats are supported. +* Defining Images:: Convenient ways to define an image for later use. +* Showing Images:: Convenient ways to display an image once + it is defined. +* Image Cache:: Internal mechanisms of image display. + +Buttons + +* Button Properties:: Button properties with special meanings. +* Button Types:: Defining common properties for classes of buttons. +* Making Buttons:: Adding buttons to Emacs buffers. +* Manipulating Buttons:: Getting and setting properties of buttons. +* Button Buffer Commands:: Buffer-wide commands and bindings for buttons. + +Abstract Display + +* Abstract Display Functions:: Functions in the Ewoc package. +* Abstract Display Example:: Example of using Ewoc. + +Display Tables + +* Display Table Format:: What a display table consists of. +* Active Display Table:: How Emacs selects a display table to use. +* Glyphs:: How to define a glyph, and what glyphs mean. + Operating System Interface * Starting Up:: Customizing Emacs start-up processing. * Getting Out:: How exiting works (permanent or temporary). * System Environment:: Distinguish the name and kind of system. -* Terminal Input:: Recording terminal input for debugging. -* Terminal Output:: Recording terminal output for debugging. -* Flow Control:: How to turn output flow control on or off. +* User Identification:: Finding the name and user id of the user. +* Time of Day:: Getting the current time. +* Time Conversion:: Converting a time from numeric form to a string, or + to calendrical data (or vice versa). +* Time Parsing:: Converting a time from numeric form to text + and vice versa. +* Processor Run Time:: Getting the run time used by Emacs. +* Time Calculations:: Adding, subtracting, comparing times, etc. +* Timers:: Setting a timer to call a function at a certain time. +* Idle Timers:: Setting a timer to call a function when Emacs has + been idle for a certain length of time. +* Terminal Input:: Accessing and recording terminal input. +* Terminal Output:: Controlling and recording terminal output. +* Sound Output:: Playing sounds on the computer's speaker. +* X11 Keysyms:: Operating on key symbols for X Windows * Batch Mode:: Running Emacs without terminal interaction. +* Session Management:: Saving and restoring state with X Session Management. Starting Up Emacs -* Start-up Summary:: Sequence of actions Emacs performs at start-up. +* Startup Summary:: Sequence of actions Emacs performs at start-up. * Init File:: Details on reading the init file (@file{.emacs}). * Terminal-Specific:: How the terminal-specific Lisp file is read. -* Command Line Arguments:: How command line arguments are processed, +* Command-Line Arguments:: How command-line arguments are processed, and how you can customize them. -Getting out of Emacs +Getting Out of Emacs * Killing Emacs:: Exiting Emacs irreversibly. * Suspending Emacs:: Exiting Emacs reversibly. -Emacs Display +Terminal Input -* Refresh Screen:: Clearing the screen and redrawing everything on it. -* Truncation:: Folding or wrapping long text lines. -* The Echo Area:: Where messages are displayed. -* Selective Display:: Hiding part of the buffer text. -* Overlay Arrow:: Display of an arrow to indicate position. -* Temporary Displays:: Displays that go away automatically. -* Waiting:: Forcing display update and waiting for user. -* Blinking:: How Emacs shows the matching open parenthesis. -* Usual Display:: How control characters are displayed. -* Beeping:: Audible signal to the user. -* Window Systems:: Which window system is being used. +* Input Modes:: Options for how input is processed. +* Recording Input:: Saving histories of recent or all input events. + +Tips and Conventions + +* Coding Conventions:: Conventions for clean and robust programs. +* Key Binding Conventions:: Which keys should be bound by which programs. +* Programming Tips:: Making Emacs code fit smoothly in Emacs. +* Compilation Tips:: Making compiled code run fast. +* Warning Tips:: Turning off compiler warnings. +* Documentation Tips:: Writing readable documentation strings. +* Comment Tips:: Conventions for writing comments. +* Library Headers:: Standard headers for library packages. GNU Emacs Internals -* Building Emacs:: How to preload Lisp libraries into Emacs. +* Building Emacs:: How the dumped Emacs is made. * Pure Storage:: A kludge to make preloaded Lisp functions sharable. * Garbage Collection:: Reclaiming space for Lisp objects no longer used. -* Object Internals:: Data formats of buffers, windows, processes. +* Memory Usage:: Info about total size of Lisp objects made so far. * Writing Emacs Primitives:: Writing C code for Emacs. +* Object Internals:: Data formats of buffers, windows, processes. Object Internals * Buffer Internals:: Components of a buffer structure. * Window Internals:: Components of a window structure. * Process Internals:: Components of a process structure. +@end detailmenu @end menu -@c ================ Volume 1 ================ - @c include intro.texi @c include objects.texi @c include numbers.texi @@ -951,6 +1428,7 @@ Object Internals @c include lists.texi @c include sequences.texi +@c include hash.texi @c include symbols.texi @c include eval.texi @@ -959,36 +1437,40 @@ Object Internals @c include functions.texi @c include macros.texi +@c include customize.texi @c include loading.texi @c include compile.texi +@c include advice.texi + @c include debugging.texi @c include streams.texi - @c include minibuf.texi @c include commands.texi + @c include keymaps.texi @c include modes.texi +@c include help.texi +@c include files.texi + +@c include backups.texi @c ================ Beginning of Volume 2 ================ - -@include help.texi -@include files.texi -@include backups.texi @include buffers.texi - @include windows.texi @include frames.texi + @include positions.texi @include markers.texi @include text.texi +@include nonascii.texi @include searching.texi @include syntax.texi @include abbrevs.texi - @include processes.texi -@include os.texi + @include display.texi +@include os.texi @c MOVE to Emacs Manual: include misc-modes.texi @@ -996,6 +1478,9 @@ Object Internals @c REMOVE this: include non-hacker.texi +@include anti.texi +@include doclicense.texi +@include gpl.texi @include tips.texi @include internals.texi @include errors.texi @@ -1003,13 +1488,14 @@ Object Internals @include maps.texi @include hooks.texi -@include index-vol2.texi +@include index.texi -@page -@c Print the tables of contents -@summarycontents -@contents -@c That's all +@ignore +@node New Symbols, , Index, Top +@unnumbered New Symbols Since the Previous Edition + +@printindex tp +@end ignore @bye @@ -1017,5 +1503,5 @@ Object Internals These words prevent "local variables" above from confusing Emacs. @ignore - arch-tag: dfdbecf8-fec2-49c1-8427-3e8ac8b0b849 + arch-tag: 9594760d-8801-4d1b-aeb9-f3b3166b5be2 @end ignore From 1f445a397e3411eda2c6baf712b7a48a7de26c8d Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Wed, 13 Jun 2007 19:08:44 +0000 Subject: [PATCH 13/14] * term/xterm.el (terminal-init-xterm): Escape parens in character constants. --- lisp/ChangeLog | 5 +++++ lisp/term/xterm.el | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6391ddf708..c8bd63eb17e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-06-13 Johan Bockg,Ae(Brd (tiny change) + + * term/xterm.el (terminal-init-xterm): Escape parens in character + constants. + 2007-06-12 Ralf Angeli * scroll-lock.el (scroll-lock-mode): Doc fix. diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 297ee7df5cd..a7249536f7b 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -272,8 +272,8 @@ (define-key map "\e[27;6;36~" [?\C-$]) (define-key map "\e[27;6;37~" [?\C-%]) (define-key map "\e[27;6;38~" [?\C-&]) - (define-key map "\e[27;6;40~" [?\C-(]) - (define-key map "\e[27;6;41~" [?\C-)]) + (define-key map "\e[27;6;40~" [?\C-\(]) + (define-key map "\e[27;6;41~" [?\C-\)]) (define-key map "\e[27;6;42~" [?\C-*]) (define-key map "\e[27;6;43~" [?\C-+]) (define-key map "\e[27;6;58~" [?\C-:]) @@ -312,8 +312,8 @@ (define-key map "\e[27;14;36~" [?\C-\M-$]) (define-key map "\e[27;14;37~" [?\C-\M-%]) (define-key map "\e[27;14;38~" [?\C-\M-&]) - (define-key map "\e[27;14;40~" [?\C-\M-(]) - (define-key map "\e[27;14;41~" [?\C-\M-)]) + (define-key map "\e[27;14;40~" [?\C-\M-\(]) + (define-key map "\e[27;14;41~" [?\C-\M-\)]) (define-key map "\e[27;14;42~" [?\C-\M-*]) (define-key map "\e[27;14;43~" [?\C-\M-+]) (define-key map "\e[27;14;58~" [?\C-\M-:]) @@ -350,8 +350,8 @@ (define-key map "\e[27;8;36~" [?\C-\M-$]) (define-key map "\e[27;8;37~" [?\C-\M-%]) (define-key map "\e[27;8;38~" [?\C-\M-&]) - (define-key map "\e[27;8;40~" [?\C-\M-(]) - (define-key map "\e[27;8;41~" [?\C-\M-)]) + (define-key map "\e[27;8;40~" [?\C-\M-\(]) + (define-key map "\e[27;8;41~" [?\C-\M-\)]) (define-key map "\e[27;8;42~" [?\C-\M-*]) (define-key map "\e[27;8;43~" [?\C-\M-+]) (define-key map "\e[27;8;58~" [?\C-\M-:]) From 524705ae2da95c571fedb83b3a1c3a80e1335a72 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 14 Jun 2007 10:02:55 +0000 Subject: [PATCH 14/14] Merge from gnus--rel--5.10 Patches applied: * emacs--devo--0 (patch 725, 740-741, 749, 768, 777, 786, 788-789, 792) - Merge from gnus--rel--5.10 - Update from CVS - Merge from emacs--rel--22, gnus--rel--5.10 * gnus--rel--5.10 (patch 217-229) - Update from CVS - Merge from emacs--devo--0, emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--rel--22--patch-44 --- lisp/gnus/ChangeLog | 44 ++++++++++++-- lisp/gnus/gnus-art.el | 15 ++--- lisp/gnus/gnus-ems.el | 123 +++++++++++++++++++++++++++++----------- lisp/gnus/gnus-start.el | 3 +- lisp/gnus/mm-decode.el | 25 ++++---- man/gnus.texi | 16 +++--- 6 files changed, 158 insertions(+), 68 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e5b314bf20a..f93bc55eb6e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,21 +1,50 @@ +2007-06-08 Katsumi Yamaoka + + * gnus-ems.el (gnus-x-splash): Make it work. + + * gnus-start.el (gnus-1): Relax restrictions that prevent gnus-x-splash + from being used. + + * lpath.el: Bind line-spacing and tool-bar-mode for XEmacs. + + * gnus-art.el (gnus-article-summary-command-nosave): Correct the order + of the arguments passed to pop-to-buffer. + (gnus-article-read-summary-keys): Ditto. + 2007-06-07 Juanma Barranquero - * gnus-art.el (gnus-split-methods): - * mail-source.el (mail-source-delete-old-incoming-confirm): - Fix typo in docstring. + * gnus-art.el (gnus-split-methods): Fix typo in docstring. 2007-06-06 Juanma Barranquero * gnus-diary.el (gnus-diary-time-format, gnus-summary-sort-by-schedule): * gnus-sum.el (gnus-summary-highlight): + * mail-source.el (mail-source-delete-old-incoming-confirm): * nndiary.el (nndiary-reminders): Fix typos in docstrings. +2007-06-04 Katsumi Yamaoka + + * gnus-art.el (gnus-mime-view-part-externally) + (gnus-mime-view-part-internally): Fix predicate function passed to + completing-read. + + * mm-decode.el (mm-image-fit-p): Return t if argument is not an image; + return t if image size is just the same as window size. + 2007-05-28 Katsumi Yamaoka * message.el (message-pop-to-buffer): Add switch-function argument. (message-mail): Pass switch-function argument to it. - (message-narrow-to-headers-or-head): Ignore mail-header-separator in - the body. + +2007-05-24 Katsumi Yamaoka + + * message.el (message-narrow-to-headers-or-head): Ignore + mail-header-separator in the body. + +2007-05-10 Reiner Steib + + * gnus-art.el (gnus-article-mode): Fix comment about displaying + non-break space. 2007-05-09 Didier Verna @@ -35,6 +64,11 @@ (mm-inline-text-html-render-with-w3m-standalone) (mm-inline-render-with-function): Use mail-parse-charset by default. +2007-04-18 Levin Du (tiny change) + + * calendar/parse-time.el (parse-time-string-chars): Check if CHAR + is less than the length of parse-time-syntax. + 2007-04-10 Katsumi Yamaoka * gnus-msg.el (gnus-inews-yank-articles): Use diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 83e4ec71b79..90af0740318 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3925,7 +3925,8 @@ commands: (make-local-variable 'gnus-article-image-alist) (make-local-variable 'gnus-article-charset) (make-local-variable 'gnus-article-ignored-charsets) - ;; Prevent recent Emacsen from displaying non-break space as "\ ". + ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space' + ;; face. (set (make-local-variable 'nobreak-char-display) nil) (setq cursor-in-non-selected-windows nil) (gnus-set-default-directory) @@ -4673,7 +4674,7 @@ specified charset." (mm-enable-external t)) (if (not (stringp method)) (gnus-mime-view-part-as-type - nil (lambda (type) (stringp (mailcap-mime-info type)))) + nil (lambda (types) (stringp (mailcap-mime-info (car types))))) (when handle (if (mm-handle-undisplayer handle) (mm-remove-part handle) @@ -4694,7 +4695,7 @@ If no internal viewer is available, use an external viewer." (inhibit-read-only t)) (if (not (mm-inlinable-p handle)) (gnus-mime-view-part-as-type - nil (lambda (type) (mm-inlinable-p handle type))) + nil (lambda (types) (mm-inlinable-p handle (car types)))) (when handle (if (mm-handle-undisplayer handle) (mm-remove-part handle) @@ -5606,7 +5607,7 @@ not have a face in `gnus-article-boring-faces'." "Execute the last keystroke in the summary buffer." (interactive) (let (func) - (pop-to-buffer gnus-article-current-summary 'norecord) + (pop-to-buffer gnus-article-current-summary nil 'norecord) (setq func (lookup-key (current-local-map) (this-command-keys))) (call-interactively func))) @@ -5645,7 +5646,7 @@ not have a face in `gnus-article-boring-faces'." (member keys nosave-in-article)) (let (func) (save-window-excursion - (pop-to-buffer gnus-article-current-summary 'norecord) + (pop-to-buffer gnus-article-current-summary nil 'norecord) ;; We disable the pick minor mode commands. (let (gnus-pick-mode) (setq func (lookup-key (current-local-map) keys)))) @@ -5657,14 +5658,14 @@ not have a face in `gnus-article-boring-faces'." (call-interactively func) (setq new-sum-point (point))) (when (member keys nosave-but-article) - (pop-to-buffer gnus-article-buffer 'norecord))) + (pop-to-buffer gnus-article-buffer nil 'norecord))) ;; These commands should restore window configuration. (let ((obuf (current-buffer)) (owin (current-window-configuration)) (opoint (point)) win func in-buffer selected new-sum-start new-sum-hscroll) (cond (not-restore-window - (pop-to-buffer gnus-article-current-summary 'norecord)) + (pop-to-buffer gnus-article-current-summary nil 'norecord)) ((setq win (get-buffer-window gnus-article-current-summary)) (select-window win)) (t diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index 60e66adc98b..4400b81f041 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el @@ -172,40 +172,95 @@ (defun gnus-x-splash () "Show a splash screen using a pixmap in the current buffer." - (let ((dir (nnheader-find-etc-directory "gnus")) - pixmap file height beg i) - (save-excursion - (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer)) - (let ((buffer-read-only nil) - width height) - (erase-buffer) - (when (and dir - (file-exists-p (setq file - (expand-file-name "x-splash" dir)))) - (let ((coding-system-for-read 'raw-text) - default-enable-multibyte-characters) - (with-temp-buffer - (insert-file-contents file) - (goto-char (point-min)) - (ignore-errors - (setq pixmap (read (current-buffer))))))) - (when pixmap - (make-face 'gnus-splash) - (setq height (/ (car pixmap) (frame-char-height)) - width (/ (cadr pixmap) (frame-char-width))) - (set-face-foreground 'gnus-splash "Brown") - (set-face-stipple 'gnus-splash pixmap) - (insert-char ?\n (* (/ (window-height) 2 height) height)) - (setq i height) - (while (> i 0) - (insert-char ?\ (* (/ (window-width) 2 width) width)) - (setq beg (point)) - (insert-char ?\ width) - (set-text-properties beg (point) '(face gnus-splash)) - (insert ?\n) - (decf i)) - (goto-char (point-min)) - (sit-for 0)))))) + (interactive) + (unless window-system + (error "`gnus-x-splash' requires running on the window system")) + (switch-to-buffer (gnus-get-buffer-create (if (or (gnus-alive-p) + (interactive-p)) + "*gnus-x-splash*" + gnus-group-buffer))) + (let ((inhibit-read-only nil) + (file (nnheader-find-etc-directory "images/gnus/x-splash" t)) + pixmap fcw fch width height fringes sbars left yoffset top ls) + (erase-buffer) + (when (and file + (ignore-errors + (let ((coding-system-for-read 'raw-text) + default-enable-multibyte-characters) + (with-temp-buffer + (insert-file-contents file) + (goto-char (point-min)) + (setq pixmap (read (current-buffer))))))) + (setq fcw (float (frame-char-width)) + fch (float (frame-char-height)) + width (/ (car pixmap) fcw) + height (/ (cadr pixmap) fch) + fringes (if (fboundp 'window-fringes) + (eval '(window-fringes)) + '(10 11 nil)) + sbars (frame-parameter nil 'vertical-scroll-bars)) + (cond ((eq sbars 'right) + (setq sbars + (cons 0 (/ (or (frame-parameter nil 'scroll-bar-width) 14) + fcw)))) + (sbars + (setq sbars + (cons (/ (or (frame-parameter nil 'scroll-bar-width) 14) + fcw) + 0)))) + (setq left (- (* (round (/ (1- (/ (+ (window-width) + (car sbars) (cdr sbars) + (/ (+ (or (car fringes) 0) + (or (cadr fringes) 0)) + fcw)) + width)) + 2)) + width) + (car sbars) + (/ (or (car fringes) 0) fcw)) + yoffset (cadr (window-edges)) + top (max 0 (- (* (max (if (and tool-bar-mode + (not (featurep 'gtk)) + (eq (frame-first-window) + (selected-window))) + 1 0) + (round (/ (1- (/ (+ (1- (window-height)) + (* 2 yoffset)) + height)) + 2))) + height) + yoffset)) + ls (/ (or line-spacing 0) fch) + height (max 0 (- height ls))) + (cond ((>= (- top ls) 1) + (insert + (propertize + " " + 'display `(space :width 0 :ascent 100)) + "\n" + (propertize + " " + 'display `(space :width 0 :height ,(- top ls 1) :ascent 100)) + "\n")) + ((> (- top ls) 0) + (insert + (propertize + " " + 'display `(space :width 0 :height ,(- top ls) :ascent 100)) + "\n"))) + (if (and (> width 0) (> left 0)) + (insert (propertize + " " + 'display `(space :width ,left :height ,height :ascent 0))) + (setq width (+ width left))) + (when (> width 0) + (insert (propertize + " " + 'display `(space :width ,width :height ,height :ascent 0) + 'face `(gnus-splash :stipple ,pixmap)))) + (goto-char (if (<= (- top ls) 0) (1- (point)) (point-min))) + (redraw-frame (selected-frame)) + (sit-for 0)))) ;;; Image functions. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 9fbab8b340b..d906cec6c6a 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -758,8 +758,7 @@ prompt the user for the name of an NNTP server to use." (cond ((featurep 'xemacs) (gnus-xmas-splash)) - ((and window-system - (= (frame-height) (1+ (window-height)))) + (window-system (gnus-x-splash)))) (let ((level (and (numberp arg) (> arg 0) arg)) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 6d52d8b2f16..028855ab341 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1371,18 +1371,19 @@ be determined." (defun mm-image-fit-p (handle) "Say whether the image in HANDLE will fit the current window." (let ((image (mm-get-image handle))) - (if (fboundp 'glyph-width) - ;; XEmacs' glyphs can actually tell us about their width, so - ;; lets be nice and smart about them. - (or mm-inline-large-images - (and (< (glyph-width image) (window-pixel-width)) - (< (glyph-height image) (window-pixel-height)))) - (let* ((size (image-size image)) - (w (car size)) - (h (cdr size))) - (or mm-inline-large-images - (and (< h (1- (window-height))) ; Don't include mode line. - (< w (window-width)))))))) + (or (not image) + (if (fboundp 'glyph-width) + ;; XEmacs' glyphs can actually tell us about their width, so + ;; lets be nice and smart about them. + (or mm-inline-large-images + (and (<= (glyph-width image) (window-pixel-width)) + (<= (glyph-height image) (window-pixel-height)))) + (let* ((size (image-size image)) + (w (car size)) + (h (cdr size))) + (or mm-inline-large-images + (and (<= h (1- (window-height))) ; Don't include mode line. + (<= w (window-width))))))))) (defun mm-valid-image-format-p (format) "Say whether FORMAT can be displayed natively by Emacs." diff --git a/man/gnus.texi b/man/gnus.texi index a3026251cb1..85167d53432 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -4084,8 +4084,8 @@ happens. You just have to be careful if you do stuff like that. @item v @kindex v (Group) @cindex keys, reserved for users (Group) -The key @kbd{v} is reserved for users. You can bind it key to some -function or better use it as a prefix key. For example: +The key @kbd{v} is reserved for users. You can bind it to some +command or better use it as a prefix key. For example: @lisp (define-key gnus-group-mode-map (kbd "v j d") @@ -4498,8 +4498,8 @@ available in Emacs. @kindex v (Summary) @cindex keys, reserved for users (Summary) -The key @kbd{v} is reserved for users. You can bind it key to some -function or better use it as a prefix key. For example: +The key @kbd{v} is reserved for users. You can bind it to some +command or better use it as a prefix key. For example: @lisp (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread @end lisp @@ -11422,8 +11422,8 @@ buffer. @kindex v (Article) @cindex keys, reserved for users (Article) -The key @kbd{v} is reserved for users. You can bind it key to some -function or better use it as a prefix key. +The key @kbd{v} is reserved for users. You can bind it to some +command or better use it as a prefix key. A few additional keystrokes are available: @@ -12460,8 +12460,8 @@ Also @pxref{Formatting Variables}. @item v @kindex v (Server) @cindex keys, reserved for users (Server) -The key @kbd{v} is reserved for users. You can bind it key to some -function or better use it as a prefix key. +The key @kbd{v} is reserved for users. You can bind it to some +command or better use it as a prefix key. @item a @kindex a (Server)