From 14f7b89dd3d094e8969be187a0695d3c23f02941 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 3 Aug 2007 17:09:43 +0000 Subject: [PATCH 001/105] (telnet-mode): Fix previous change. --- lisp/net/telnet.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index 28f7d1ddb46..ef01c96ec8e 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -248,7 +248,7 @@ There is a variable ``telnet-interrupt-string'' which is the character sent to try to stop execution of a job on the remote host. Data is sent to the remote host when RET is typed." (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern) - (setq comint-use-prompt-regexp t)) + (set (make-local-variable 'comint-use-prompt-regexp) t)) ;;;###autoload (add-hook 'same-window-regexps "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)") From ddbdaf2420a5f2eea54ee023da9c2064e4d2d551 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 3 Aug 2007 20:19:08 +0000 Subject: [PATCH 002/105] *** empty log message *** --- admin/FOR-RELEASE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index ecd3de8c726..36dbabdd476 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -46,6 +46,8 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. ** sdl.web@gmail.com: problem with transparent PNG image display +** id.brep@gmail.com, 12 Jul: customize-group "erc-server" save buffer error + * FIXES FOR EMACS 22.2 Here we list small fixes that arrived too late for Emacs 22.1, but From e9bfd3a3f9953520b99e4dac4cc0e59b6a9fc83c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 4 Aug 2007 02:32:43 +0000 Subject: [PATCH 003/105] (cperl-compilation-error-regexp-alist): Remove duplicate defvar preventing initialization. (cperl-mode): Fix compilation-error-regexp-alist-alist setting. --- lisp/progmodes/cperl-mode.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index d1dc0e875c4..3badfed5d4f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1497,9 +1497,16 @@ the last)." (defvar cperl-use-major-mode 'cperl-mode) (defvar cperl-font-lock-multiline-start nil) (defvar cperl-font-lock-multiline nil) -(defvar cperl-compilation-error-regexp-alist nil) (defvar cperl-font-locking nil) +;; NB as it stands the code in cperl-mode assumes this only has one +;; element. If Xemacs 19 support were dropped, this could all be simplified. +(defvar cperl-compilation-error-regexp-alist + ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). + '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" + 2 3)) + "Alist that specifies how to match errors in perl output.") + ;;;###autoload (defun cperl-mode () "Major mode for editing Perl code. @@ -1786,7 +1793,7 @@ or as help on variables `cperl-tips', `cperl-problems', (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x (make-local-variable 'compilation-error-regexp-alist-alist) (set 'compilation-error-regexp-alist-alist - (cons (cons 'cperl cperl-compilation-error-regexp-alist) + (cons (cons 'cperl (car cperl-compilation-error-regexp-alist)) (symbol-value 'compilation-error-regexp-alist-alist))) (if (fboundp 'compilation-build-compilation-error-regexp-alist) (let ((f 'compilation-build-compilation-error-regexp-alist)) @@ -5702,13 +5709,6 @@ indentation and initial hashes. Behaves usually outside of comment." (t 5))) ; should not happen -(defvar cperl-compilation-error-regexp-alist - ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). - '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" - 2 3)) - "Alist that specifies how to match errors in perl output.") - - (defun cperl-windowed-init () "Initialization under windowed version." (cond ((featurep 'ps-print) From b1ab8c381057452c4ad8010c4da8be2ddfeed1cf Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 4 Aug 2007 02:35:10 +0000 Subject: [PATCH 004/105] (auto-revert-tail-mode): auto-revert-tail-pos is zero, not nil, when the library is first loaded. Check for a file that has been modified on disk. --- lisp/ChangeLog | 10 ++++++++++ lisp/autorevert.el | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1103f0e126..ca8741013f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2007-08-04 Glenn Morris + + * autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is + zero, not nil, when the library is first loaded. Check for a file + that has been modified on disk. + + * progmodes/cperl-mode.el (cperl-compilation-error-regexp-alist): + Remove duplicate defvar preventing initialization. + (cperl-mode): Fix compilation-error-regexp-alist-alist setting. + 2007-08-03 Miles Bader * vc-hooks.el (vc-handled-backends): Change capitalization of VC diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 1f4ebc57b19..cad94e789d6 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -337,6 +337,22 @@ Use `auto-revert-mode' for changes other than appends!" (not auto-revert-tail-pos) ; library was loaded only after finding file (not (y-or-n-p "Buffer is modified, so tail offset may be wrong. Proceed? "))) (auto-revert-tail-mode 0) + ;; a-r-tail-pos stores the size of the file at the time of the + ;; last revert. After this package loads, it adds a + ;; find-file-hook to set this variable every time a file is + ;; loaded. If the package is loaded only _after_ visiting the + ;; file to be reverted, then we have no idea what the value of + ;; a-r-tail-pos should have been when the file was visited. If + ;; the file has changed on disk in the meantime, all we can do + ;; is offer to revert the whole thing. If you choose not to + ;; revert, then you might miss some output then happened + ;; between visiting the file and activating a-r-t-mode. + (and (zerop auto-revert-tail-pos) + (not (verify-visited-file-modtime (current-buffer))) + (y-or-n-p "File changed on disk, content may be missing. \ +Perform a full revert? ") + ;; Use this (not just revert-buffer) for point-preservation. + (auto-revert-handler)) ;; else we might reappend our own end when we save (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t) (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position From 212b7268410aaf5bf4820a6c5e20eccedb7a4f32 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 5 Aug 2007 08:57:24 +0000 Subject: [PATCH 005/105] * files.el (set-auto-mode): Handle also remote files wrt `auto-mode-alist'. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca8741013f5..d07f01641c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-05 Michael Albinus + + * files.el (set-auto-mode): Handle also remote files wrt + `auto-mode-alist'. + 2007-08-04 Glenn Morris * autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is diff --git a/lisp/files.el b/lisp/files.el index 444e402f438..135ccfafb92 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2259,7 +2259,12 @@ we don't actually set it to the same mode the buffer already has." ;; Next compare the filename against the entries in auto-mode-alist. (unless done (if buffer-file-name - (let ((name buffer-file-name)) + (let ((name buffer-file-name) + (remote-id (file-remote-p buffer-file-name))) + ;; Remove remote file name identification. + (when (and (stringp remote-id) + (string-match remote-id name)) + (setq name (substring name (match-end 0)))) ;; Remove backup-suffixes from file name. (setq name (file-name-sans-versions name)) (while name From 6435918d3d459eba7c11d5cc4b0116285f196b28 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 5 Aug 2007 12:43:06 +0000 Subject: [PATCH 006/105] * net/tramp.el (tramp-handle-file-remote-p): Return a string as remote identification. --- lisp/ChangeLog | 3 +++ lisp/files.el | 2 +- lisp/net/tramp.el | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d07f01641c8..d3604800a02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,9 @@ * files.el (set-auto-mode): Handle also remote files wrt `auto-mode-alist'. + * net/tramp.el (tramp-handle-file-remote-p): Return a string as + remote identification. + 2007-08-04 Glenn Morris * autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is diff --git a/lisp/files.el b/lisp/files.el index 135ccfafb92..8e6fb9ff725 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2260,7 +2260,7 @@ we don't actually set it to the same mode the buffer already has." (unless done (if buffer-file-name (let ((name buffer-file-name) - (remote-id (file-remote-p buffer-file-name))) + (remote-id (regexp-quote (file-remote-p buffer-file-name)))) ;; Remove remote file name identification. (when (and (stringp remote-id) (string-match remote-id name)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 03e97b747da..9f665ca4707 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3872,7 +3872,7 @@ This will break if COMMAND prints a newline, followed by the value of "Like `file-remote-p' for tramp files." (when (tramp-tramp-file-p filename) (with-parsed-tramp-file-name filename nil - (vector multi-method method user host "")))) + (tramp-make-tramp-file-name multi-method method user host "")))) (defun tramp-handle-insert-file-contents (filename &optional visit beg end replace) From 70aa3317c570f15f8652ad959e5587e73a2281b3 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 5 Aug 2007 12:48:27 +0000 Subject: [PATCH 007/105] *** empty log message *** --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 8e6fb9ff725..dfa3cef384d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2260,10 +2260,10 @@ we don't actually set it to the same mode the buffer already has." (unless done (if buffer-file-name (let ((name buffer-file-name) - (remote-id (regexp-quote (file-remote-p buffer-file-name)))) + (remote-id (file-remote-p buffer-file-name))) ;; Remove remote file name identification. (when (and (stringp remote-id) - (string-match remote-id name)) + (string-match (regexp-quote remote-id) name)) (setq name (substring name (match-end 0)))) ;; Remove backup-suffixes from file name. (setq name (file-name-sans-versions name)) From 0dad68f0390a6a0c3d780650b38e9abe87a47914 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Sun, 5 Aug 2007 12:58:00 +0000 Subject: [PATCH 008/105] Require lpr and ps-print when loading printing package --- lisp/ChangeLog | 5 + lisp/printing.el | 876 ++++++++++++++++++++++++----------------------- 2 files changed, 454 insertions(+), 427 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3604800a02..0d9657200ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-05 Vinicius Jose Latorre + + * printing.el: Require lpr and ps-print when loading printing package. + Reported by Glenn Morris . + 2007-08-05 Michael Albinus * files.el (set-auto-mode): Handle also remote files wrt diff --git a/lisp/printing.el b/lisp/printing.el index f84a2112661..5ab1c9baee3 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -6,11 +6,11 @@ ;; Author: Vinicius Jose Latorre ;; Maintainer: Vinicius Jose Latorre ;; Keywords: wp, print, PostScript -;; Version: 6.8.4 +;; Version: 6.9.1 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre -(defconst pr-version "6.8.4" - "printing.el, v 6.8.4 <2005/06/11 vinicius> +(defconst pr-version "6.9.1" + "printing.el, v 6.9.1 <2007/08/02 vinicius> Please send all bug fixes and enhancements to Vinicius Jose Latorre @@ -1093,46 +1093,457 @@ If SUFFIX is non-nil, add that at the end of the file name." (set-default-file-modes umask))))) -;; GNU Emacs -(defalias 'pr-e-frame-char-height 'frame-char-height) -(defalias 'pr-e-frame-char-width 'frame-char-width) -(defalias 'pr-e-mouse-pixel-position 'mouse-pixel-position) -;; XEmacs -(defalias 'pr-x-add-submenu 'add-submenu) -(defalias 'pr-x-event-function 'event-function) -(defalias 'pr-x-event-object 'event-object) -(defalias 'pr-x-find-menu-item 'find-menu-item) -(defalias 'pr-x-font-height 'font-height) -(defalias 'pr-x-font-width 'font-width) -(defalias 'pr-x-get-popup-menu-response 'get-popup-menu-response) -(defalias 'pr-x-make-event 'make-event) -(defalias 'pr-x-misc-user-event-p 'misc-user-event-p) -(defalias 'pr-x-relabel-menu-item 'relabel-menu-item) -(defalias 'pr-x-event-x-pixel 'event-x-pixel) -(defalias 'pr-x-event-y-pixel 'event-y-pixel) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; XEmacs Definitions + (cond ((featurep 'xemacs) ; XEmacs - (defvar current-menubar nil) - (defvar current-mouse-event nil) - (defvar zmacs-region-stays nil) + ;; XEmacs (defalias 'pr-f-set-keymap-parents 'set-keymap-parents) (defalias 'pr-f-set-keymap-name 'set-keymap-name) + + ;; XEmacs (defun pr-f-read-string (prompt initial history default) (let ((str (read-string prompt initial))) (if (and str (not (string= str ""))) str default))) - (defun pr-keep-region-active () - (setq zmacs-region-stays t))) + ;; XEmacs + (defvar zmacs-region-stays nil) + + ;; XEmacs + (defun pr-keep-region-active () + (setq zmacs-region-stays t)) + + ;; XEmacs + (defun pr-region-active-p () + (and pr-auto-region (not zmacs-region-stays) (ps-mark-active-p))) + + ;; XEmacs + (defun pr-menu-char-height () + (font-height (face-font 'default))) + + ;; XEmacs + (defun pr-menu-char-width () + (font-width (face-font 'default))) + + ;; XEmacs + (defmacro pr-xemacs-global-menubar (&rest body) + `(save-excursion + (let ((temp (get-buffer-create (make-temp-name " *Temp")))) + ;; be sure to access global menubar + (set-buffer temp) + ,@body + (kill-buffer temp)))) + + ;; XEmacs + (defun pr-global-menubar (pr-menu-spec) + ;; Menu binding + (pr-xemacs-global-menubar + (add-submenu nil (cons "Printing" pr-menu-spec) "Apps")) + (setq pr-menu-print-item nil)) + + ;; XEmacs + (defvar current-mouse-event nil) + (defun pr-menu-position (entry index horizontal) + (make-event + 'button-release + (list 'button 1 + 'x (- (event-x-pixel current-mouse-event) ; X + (* horizontal pr-menu-char-width)) + 'y (- (event-y-pixel current-mouse-event) ; Y + (* (pr-menu-index entry index) pr-menu-char-height))))) + + (defvar pr-menu-position nil) + (defvar pr-menu-state nil) + + ;; XEmacs + (defvar current-menubar nil) ; to avoid compilation gripes + (defun pr-menu-lookup (path) + (car (find-menu-item current-menubar (cons "Printing" path)))) + + ;; XEmacs + (defun pr-menu-lock (entry index horizontal state path) + (when pr-menu-lock + (or (and pr-menu-position (eq state pr-menu-state)) + (setq pr-menu-position (pr-menu-position entry index horizontal) + pr-menu-state state)) + (let* ((menu (pr-menu-lookup path)) + (result (get-popup-menu-response menu pr-menu-position))) + (and (misc-user-event-p result) + (funcall (event-function result) + (event-object result)))) + (setq pr-menu-position nil))) + + ;; XEmacs + (defalias 'pr-update-mode-line 'set-menubar-dirty-flag) + + ;; XEmacs + (defvar pr-ps-name-old "PostScript Printers") + (defvar pr-txt-name-old "Text Printers") + (defvar pr-ps-utility-old "PostScript Utility") + (defvar pr-even-or-odd-old "Print All Pages") + + ;; XEmacs + (defun pr-do-update-menus (&optional force) + (pr-menu-alist pr-ps-printer-alist + 'pr-ps-name + 'pr-menu-set-ps-title + '("Printing") + 'pr-ps-printer-menu-modified + force + pr-ps-name-old + 'postscript 2) + (pr-menu-alist pr-txt-printer-alist + 'pr-txt-name + 'pr-menu-set-txt-title + '("Printing") + 'pr-txt-printer-menu-modified + force + pr-txt-name-old + 'text 2) + (let ((save-var pr-ps-utility-menu-modified)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("Printing" "PostScript Print" "File") + 'save-var + force + pr-ps-utility-old + nil 1)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("Printing" "PostScript Preview" "File") + 'pr-ps-utility-menu-modified + force + pr-ps-utility-old + nil 1) + (pr-even-or-odd-pages ps-even-or-odd-pages force)) + + ;; XEmacs + (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name + entry index) + (when (and alist (or force (symbol-value modified-sym))) + (pr-xemacs-global-menubar + (add-submenu menu-path + (pr-menu-create name alist var-sym + fun entry index))) + (funcall fun (symbol-value var-sym)) + (set modified-sym nil))) + + ;; XEmacs + (defun pr-relabel-menu-item (newname var-sym) + (pr-xemacs-global-menubar + (relabel-menu-item + (list "Printing" (symbol-value var-sym)) + newname) + (set var-sym newname))) + + ;; XEmacs + (defun pr-menu-set-ps-title (value &optional item entry index) + (pr-relabel-menu-item (format "PostScript Printer: %s" value) + 'pr-ps-name-old) + (pr-ps-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; XEmacs + (defun pr-menu-set-txt-title (value &optional item entry index) + (pr-relabel-menu-item (format "Text Printer: %s" value) + 'pr-txt-name-old) + (pr-txt-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; XEmacs + (defun pr-menu-set-utility-title (value &optional item entry index) + (pr-xemacs-global-menubar + (let ((newname (format "%s" value))) + (relabel-menu-item + (list "Printing" "PostScript Print" "File" pr-ps-utility-old) + newname) + (relabel-menu-item + (list "Printing" "PostScript Preview" "File" pr-ps-utility-old) + newname) + (setq pr-ps-utility-old newname))) + (pr-ps-set-utility value) + (and index + (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) + + ;; XEmacs + (defun pr-even-or-odd-pages (value &optional no-lock) + (pr-relabel-menu-item (cdr (assq value pr-even-or-odd-alist)) + 'pr-even-or-odd-old) + (setq ps-even-or-odd-pages value) + (or no-lock + (pr-menu-lock 'postscript-options 8 12 'toggle nil))) + + ) (t ; GNU Emacs - (defvar deactivate-mark nil) + ;; Do nothing + )) ; end cond featurep + + + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; GNU Emacs Definitions + + +(cond + ((featurep 'xemacs) ; XEmacs + ;; Do nothing + ) + (t ; GNU Emacs + ;; GNU Emacs (defalias 'pr-f-set-keymap-parents 'set-keymap-parent) (defalias 'pr-f-set-keymap-name 'ignore) (defalias 'pr-f-read-string 'read-string) + + ;; GNU Emacs + (defvar deactivate-mark) + + ;; GNU Emacs (defun pr-keep-region-active () - (setq deactivate-mark nil)))) + (setq deactivate-mark nil)) + + ;; GNU Emacs + (defun pr-region-active-p () + (and pr-auto-region transient-mark-mode mark-active)) + + ;; GNU Emacs + (defun pr-menu-char-height () + (frame-char-height)) + + ;; GNU Emacs + (defun pr-menu-char-width () + (frame-char-width)) + + ;; GNU Emacs + ;; Menu binding + ;; Replace existing "print" item by "Printing" item. + ;; If you're changing this file, you'll load it a second, + ;; third... time, but "print" item exists only in the first load. + (eval-and-compile + (cond + ;; GNU Emacs 20 + ((< emacs-major-version 21) + (defun pr-global-menubar (pr-menu-spec) + (require 'easymenu) + (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) + (when pr-menu-print-item + (easy-menu-remove-item nil '("tools") pr-menu-print-item) + (setq pr-menu-print-item nil + pr-menu-bar (vector 'menu-bar 'tools + (pr-get-symbol "Printing"))))) + ) + ;; GNU Emacs 21 & 22 + (t + (defun pr-global-menubar (pr-menu-spec) + (require 'easymenu) + (let ((menu-file (if (= emacs-major-version 21) + '("menu-bar" "files") ; GNU Emacs 21 + '("menu-bar" "file")))) ; GNU Emacs 22 or higher + (cond + (pr-menu-print-item + (easy-menu-add-item global-map menu-file + (easy-menu-create-menu "Print" pr-menu-spec) + "print-buffer") + (dolist (item '("print-buffer" "print-region" + "ps-print-buffer-faces" "ps-print-region-faces" + "ps-print-buffer" "ps-print-region")) + (easy-menu-remove-item global-map menu-file item)) + (setq pr-menu-print-item nil + pr-menu-bar (vector 'menu-bar + (pr-get-symbol (nth 1 menu-file)) + (pr-get-symbol "Print")))) + (t + (easy-menu-add-item global-map menu-file + (easy-menu-create-menu "Print" pr-menu-spec))) + ))) + ))) + + (eval-and-compile + (cond + (ps-windows-system + ;; GNU Emacs for Windows 9x/NT + (defun pr-menu-position (entry index horizontal) + (let ((pos (cdr (mouse-pixel-position)))) + (list + (list (or (car pos) 0) ; X + (- (or (cdr pos) 0) ; Y + (* (pr-menu-index entry index) pr-menu-char-height))) + (selected-frame)))) ; frame + ) + (t + ;; GNU Emacs + (defun pr-menu-position (entry index horizontal) + (let ((pos (cdr (mouse-pixel-position)))) + (list + (list (- (or (car pos) 0) ; X + (* horizontal pr-menu-char-width)) + (- (or (cdr pos) 0) ; Y + (* (pr-menu-index entry index) pr-menu-char-height))) + (selected-frame)))) ; frame + ))) + + (defvar pr-menu-position nil) + (defvar pr-menu-state nil) + + ;; GNU Emacs + (defun pr-menu-lookup (path) + (lookup-key global-map + (if path + (vconcat pr-menu-bar + (mapcar 'pr-get-symbol + (if (listp path) + path + (list path)))) + pr-menu-bar))) + + ;; GNU Emacs + (defun pr-menu-lock (entry index horizontal state path) + (when pr-menu-lock + (or (and pr-menu-position (eq state pr-menu-state)) + (setq pr-menu-position (pr-menu-position entry index horizontal) + pr-menu-state state)) + (let* ((menu (pr-menu-lookup path)) + (result (x-popup-menu pr-menu-position menu))) + (and result + (let ((command (lookup-key menu (vconcat result)))) + (if (fboundp command) + (funcall command) + (eval command))))) + (setq pr-menu-position nil))) + + ;; GNU Emacs + (defalias 'pr-update-mode-line 'force-mode-line-update) + + ;; GNU Emacs + (defun pr-do-update-menus (&optional force) + (pr-menu-alist pr-ps-printer-alist + 'pr-ps-name + 'pr-menu-set-ps-title + "PostScript Printers" + 'pr-ps-printer-menu-modified + force + "PostScript Printers" + 'postscript 2) + (pr-menu-alist pr-txt-printer-alist + 'pr-txt-name + 'pr-menu-set-txt-title + "Text Printers" + 'pr-txt-printer-menu-modified + force + "Text Printers" + 'text 2) + (let ((save-var pr-ps-utility-menu-modified)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("PostScript Print" "File" "PostScript Utility") + 'save-var + force + "PostScript Utility" + nil 1)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("PostScript Preview" "File" "PostScript Utility") + 'pr-ps-utility-menu-modified + force + "PostScript Utility" + nil 1) + (pr-even-or-odd-pages ps-even-or-odd-pages force)) + + ;; GNU Emacs + (defun pr-menu-get-item (name-list) + ;; NAME-LIST is a string or a list of strings. + (or (listp name-list) + (setq name-list (list name-list))) + (and name-list + (let* ((reversed (reverse name-list)) + (name (pr-get-symbol (car reversed))) + (path (nreverse (cdr reversed))) + (menu (lookup-key + global-map + (vconcat pr-menu-bar + (mapcar 'pr-get-symbol path))))) + (assq name (nthcdr 2 menu))))) + + ;; GNU Emacs + (defvar pr-temp-menu nil) + + ;; GNU Emacs + (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name + entry index) + (when (and alist (or force (symbol-value modified-sym))) + (easy-menu-define pr-temp-menu nil "" + (pr-menu-create name alist var-sym fun entry index)) + (let ((item (pr-menu-get-item menu-path))) + (and item + (let* ((binding (nthcdr 3 item)) + (key-binding (cdr binding))) + (setcar binding pr-temp-menu) + (and key-binding (listp (car key-binding)) + (setcdr binding (cdr key-binding))) ; skip KEY-BINDING + (funcall fun (symbol-value var-sym) item)))) + (set modified-sym nil))) + + ;; GNU Emacs + (defun pr-menu-set-item-name (item name) + (and item + (setcar (nthcdr 2 item) name))) ; ITEM-NAME + + ;; GNU Emacs + (defun pr-menu-set-ps-title (value &optional item entry index) + (pr-menu-set-item-name (or item + (pr-menu-get-item "PostScript Printers")) + (format "PostScript Printer: %s" value)) + (pr-ps-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; GNU Emacs + (defun pr-menu-set-txt-title (value &optional item entry index) + (pr-menu-set-item-name (or item + (pr-menu-get-item "Text Printers")) + (format "Text Printer: %s" value)) + (pr-txt-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; GNU Emacs + (defun pr-menu-set-utility-title (value &optional item entry index) + (let ((name (symbol-name value))) + (if item + (pr-menu-set-item-name item name) + (pr-menu-set-item-name + (pr-menu-get-item + '("PostScript Print" "File" "PostScript Utility")) + name) + (pr-menu-set-item-name + (pr-menu-get-item + '("PostScript Preview" "File" "PostScript Utility")) + name))) + (pr-ps-set-utility value) + (and index + (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) + + ;; GNU Emacs + (defun pr-even-or-odd-pages (value &optional no-lock) + (pr-menu-set-item-name (pr-menu-get-item "Print All Pages") + (cdr (assq value pr-even-or-odd-alist))) + (setq ps-even-or-odd-pages value) + (or no-lock + (pr-menu-lock 'postscript-options 8 12 'toggle nil))) + + )) ; end cond featurep ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1592,7 +2003,7 @@ DEFAULT It's a way to set default values when this entry is selected. (VARIABLE . VALUE) - That associates VARIABLE with VALUE. when this entry is + Which associates VARIABLE with VALUE. When this entry is selected, it's executed the following command: (set VARIABLE (eval VALUE)) @@ -2147,7 +2558,7 @@ DEFAULT It's a way to set default values when this entry is selected. (VARIABLE-SYM . VALUE) - That associates VARIABLE-SYM with VALUE. when this entry is + Which associates VARIABLE-SYM with VALUE. When this entry is selected, it's executed the following command: (set (make-local-variable VARIABLE-SYM) (eval VALUE)) @@ -2327,7 +2738,7 @@ DEFAULT It's a way to set default values when this entry is selected. (VARIABLE . VALUE) - That associates VARIABLE with VALUE. when this entry is + Which associates VARIABLE with VALUE. When this entry is selected, it's executed the following command: (set VARIABLE (eval VALUE)) @@ -2452,11 +2863,7 @@ See also `pr-menu-char-height' and `pr-menu-char-width'." :group 'printing) -(defcustom pr-menu-char-height - (cond ((featurep 'xemacs) ; XEmacs - (pr-x-font-height (face-font 'default))) - (t ; GNU Emacs - (pr-e-frame-char-height))) +(defcustom pr-menu-char-height (pr-menu-char-height) "*Specify menu char height in pixels. This variable is used to guess which vertical position should be locked the @@ -2468,11 +2875,7 @@ See also `pr-menu-lock' and `pr-menu-char-width'." :group 'printing) -(defcustom pr-menu-char-width - (cond ((featurep 'xemacs) ; XEmacs - (pr-x-font-width (face-font 'default))) - (t ; GNU Emacs - (pr-e-frame-char-width))) +(defcustom pr-menu-char-width (pr-menu-char-width) "*Specify menu char width in pixels. This variable is used to guess which horizontal position should be locked the @@ -2544,7 +2947,7 @@ SETTING It's a cons like: (VARIABLE . VALUE) - That associates VARIABLE with VALUE. when this entry is + Which associates VARIABLE with VALUE. When this entry is selected, it's executed the following command: * If LOCAL is non-nil: @@ -2772,15 +3175,6 @@ See `pr-ps-printer-alist'.") ;; Keys & Menus -(defmacro pr-xemacs-global-menubar (&rest body) - `(save-excursion - (let ((temp (get-buffer-create (make-temp-name " *Temp")))) - ;; be sure to access global menubar - (set-buffer temp) - ,@body - (kill-buffer temp)))) - - (defsubst pr-visible-p (key) (memq key pr-visible-entry-list)) @@ -2802,16 +3196,6 @@ See `pr-ps-printer-alist'.") 'easy-menu-intern (lambda (s) (if (stringp s) (intern s) s)))) -(cond - ((featurep 'xemacs) ; XEmacs - (defvar zmacs-region-stays nil) ; to avoid compilation gripes - (defun pr-region-active-p () - (and pr-auto-region (not zmacs-region-stays) (ps-mark-active-p)))) - - (t ; GNU Emacs - (defun pr-region-active-p () - (and pr-auto-region transient-mark-mode mark-active)))) - (defconst pr-menu-spec ;; Menu mapping: @@ -3070,51 +3454,7 @@ menu. Calls `pr-update-menus' to adjust menus." (interactive) - (cond - ((featurep 'xemacs) ; XEmacs - ;; Menu binding - (pr-xemacs-global-menubar - (pr-x-add-submenu nil (cons "Printing" pr-menu-spec) "Apps")) - (setq pr-menu-print-item nil)) - - - (t ; GNU Emacs - ;; Menu binding - (require 'easymenu) - ;; Replace existing "print" item by "Printing" item. - ;; If you're changing this file, you'll load it a second, - ;; third... time, but "print" item exists only in the first load. - (cond - ;; Emacs 20 - ((< emacs-major-version 21) - (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) - (when pr-menu-print-item - (easy-menu-remove-item nil '("tools") pr-menu-print-item) - (setq pr-menu-print-item nil - pr-menu-bar (vector 'menu-bar 'tools - (pr-get-symbol "Printing"))))) - ;; Emacs 21 & 22 - (t - (let ((menu-file (if (= emacs-major-version 21) - '("menu-bar" "files") ; Emacs 21 - '("menu-bar" "file")))) ; Emacs 22 or higher - (cond - (pr-menu-print-item - (easy-menu-add-item global-map menu-file - (easy-menu-create-menu "Print" pr-menu-spec) - "print-buffer") - (dolist (item '("print-buffer" "print-region" - "ps-print-buffer-faces" "ps-print-region-faces" - "ps-print-buffer" "ps-print-region")) - (easy-menu-remove-item global-map menu-file item)) - (setq pr-menu-print-item nil - pr-menu-bar (vector 'menu-bar - (pr-get-symbol (nth 1 menu-file)) - (pr-get-symbol "Print")))) - (t - (easy-menu-add-item global-map menu-file - (easy-menu-create-menu "Print" pr-menu-spec))) - )))))) + (pr-global-menubar pr-menu-spec) (pr-update-menus t)) @@ -4841,94 +5181,6 @@ See `pr-visible-entry-alist'.") (+ index 2)) -(defvar pr-menu-position nil) -(defvar pr-menu-state nil) - - -(cond - ((featurep 'xemacs) - ;; XEmacs - (defvar current-mouse-event nil) ; to avoid compilation gripes - (defun pr-menu-position (entry index horizontal) - (pr-x-make-event - 'button-release - (list 'button 1 - 'x (- (pr-x-event-x-pixel current-mouse-event) ; X - (* horizontal pr-menu-char-width)) - 'y (- (pr-x-event-y-pixel current-mouse-event) ; Y - (* (pr-menu-index entry index) pr-menu-char-height))))) - ) - (ps-windows-system - ;; GNU Emacs for Windows 9x/NT - (defun pr-menu-position (entry index horizontal) - (let ((pos (cdr (pr-e-mouse-pixel-position)))) - (list - (list (or (car pos) 0) ; X - (- (or (cdr pos) 0) ; Y - (* (pr-menu-index entry index) pr-menu-char-height))) - (selected-frame)))) ; frame - ) - (t - ;; GNU Emacs - (defun pr-menu-position (entry index horizontal) - (let ((pos (cdr (pr-e-mouse-pixel-position)))) - (list - (list (- (or (car pos) 0) ; X - (* horizontal pr-menu-char-width)) - (- (or (cdr pos) 0) ; Y - (* (pr-menu-index entry index) pr-menu-char-height))) - (selected-frame)))) ; frame - )) - -(cond - ((featurep 'xemacs) - ;; XEmacs - (defvar current-menubar nil) ; to avoid compilation gripes - (defun pr-menu-lookup (path) - (car (pr-x-find-menu-item current-menubar (cons "Printing" path)))) - - ;; XEmacs - (defun pr-menu-lock (entry index horizontal state path) - (when pr-menu-lock - (or (and pr-menu-position (eq state pr-menu-state)) - (setq pr-menu-position (pr-menu-position entry index horizontal) - pr-menu-state state)) - (let* ((menu (pr-menu-lookup path)) - (result (pr-x-get-popup-menu-response menu pr-menu-position))) - (and (pr-x-misc-user-event-p result) - (funcall (pr-x-event-function result) - (pr-x-event-object result)))) - (setq pr-menu-position nil)))) - - - (t - ;; GNU Emacs - (defun pr-menu-lookup (path) - (lookup-key global-map - (if path - (vconcat pr-menu-bar - (mapcar 'pr-get-symbol - (if (listp path) - path - (list path)))) - pr-menu-bar))) - - ;; GNU Emacs - (defun pr-menu-lock (entry index horizontal state path) - (when pr-menu-lock - (or (and pr-menu-position (eq state pr-menu-state)) - (setq pr-menu-position (pr-menu-position entry index horizontal) - pr-menu-state state)) - (let* ((menu (pr-menu-lookup path)) - (result (x-popup-menu pr-menu-position menu))) - (and result - (let ((command (lookup-key menu (vconcat result)))) - (if (fboundp command) - (funcall command) - (eval command))))) - (setq pr-menu-position nil))))) - - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Printer & Utility Selection @@ -4991,237 +5243,6 @@ If menu binding was not done, calls `pr-menu-bind'." alist))) -(cond - ((featurep 'xemacs) - ;; XEmacs - (defalias 'pr-update-mode-line 'set-menubar-dirty-flag) - - ;; XEmacs - (defvar pr-ps-name-old "PostScript Printers") - (defvar pr-txt-name-old "Text Printers") - (defvar pr-ps-utility-old "PostScript Utility") - (defvar pr-even-or-odd-old "Print All Pages") - - ;; XEmacs - (defun pr-do-update-menus (&optional force) - (pr-menu-alist pr-ps-printer-alist - 'pr-ps-name - 'pr-menu-set-ps-title - '("Printing") - 'pr-ps-printer-menu-modified - force - pr-ps-name-old - 'postscript 2) - (pr-menu-alist pr-txt-printer-alist - 'pr-txt-name - 'pr-menu-set-txt-title - '("Printing") - 'pr-txt-printer-menu-modified - force - pr-txt-name-old - 'text 2) - (let ((save-var pr-ps-utility-menu-modified)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("Printing" "PostScript Print" "File") - 'save-var - force - pr-ps-utility-old - nil 1)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("Printing" "PostScript Preview" "File") - 'pr-ps-utility-menu-modified - force - pr-ps-utility-old - nil 1) - (pr-even-or-odd-pages ps-even-or-odd-pages force)) - - ;; XEmacs - (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name - entry index) - (when (and alist (or force (symbol-value modified-sym))) - (pr-xemacs-global-menubar - (pr-x-add-submenu menu-path - (pr-menu-create name alist var-sym - fun entry index))) - (funcall fun (symbol-value var-sym)) - (set modified-sym nil))) - - ;; XEmacs - (defun pr-relabel-menu-item (newname var-sym) - (pr-xemacs-global-menubar - (pr-x-relabel-menu-item - (list "Printing" (symbol-value var-sym)) - newname) - (set var-sym newname))) - - ;; XEmacs - (defun pr-menu-set-ps-title (value &optional item entry index) - (pr-relabel-menu-item (format "PostScript Printer: %s" value) - 'pr-ps-name-old) - (pr-ps-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; XEmacs - (defun pr-menu-set-txt-title (value &optional item entry index) - (pr-relabel-menu-item (format "Text Printer: %s" value) - 'pr-txt-name-old) - (pr-txt-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; XEmacs - (defun pr-menu-set-utility-title (value &optional item entry index) - (pr-xemacs-global-menubar - (let ((newname (format "%s" value))) - (pr-x-relabel-menu-item - (list "Printing" "PostScript Print" "File" pr-ps-utility-old) - newname) - (pr-x-relabel-menu-item - (list "Printing" "PostScript Preview" "File" pr-ps-utility-old) - newname) - (setq pr-ps-utility-old newname))) - (pr-ps-set-utility value) - (and index - (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) - - ;; XEmacs - (defun pr-even-or-odd-pages (value &optional no-lock) - (pr-relabel-menu-item (cdr (assq value pr-even-or-odd-alist)) - 'pr-even-or-odd-old) - (setq ps-even-or-odd-pages value) - (or no-lock - (pr-menu-lock 'postscript-options 8 12 'toggle nil)))) - - - (t - ;; GNU Emacs - (defalias 'pr-update-mode-line 'force-mode-line-update) - - ;; GNU Emacs - (defun pr-do-update-menus (&optional force) - (pr-menu-alist pr-ps-printer-alist - 'pr-ps-name - 'pr-menu-set-ps-title - "PostScript Printers" - 'pr-ps-printer-menu-modified - force - "PostScript Printers" - 'postscript 2) - (pr-menu-alist pr-txt-printer-alist - 'pr-txt-name - 'pr-menu-set-txt-title - "Text Printers" - 'pr-txt-printer-menu-modified - force - "Text Printers" - 'text 2) - (let ((save-var pr-ps-utility-menu-modified)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("PostScript Print" "File" "PostScript Utility") - 'save-var - force - "PostScript Utility" - nil 1)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("PostScript Preview" "File" "PostScript Utility") - 'pr-ps-utility-menu-modified - force - "PostScript Utility" - nil 1) - (pr-even-or-odd-pages ps-even-or-odd-pages force)) - - ;; GNU Emacs - (defun pr-menu-get-item (name-list) - ;; NAME-LIST is a string or a list of strings. - (or (listp name-list) - (setq name-list (list name-list))) - (and name-list - (let* ((reversed (reverse name-list)) - (name (pr-get-symbol (car reversed))) - (path (nreverse (cdr reversed))) - (menu (lookup-key - global-map - (vconcat pr-menu-bar - (mapcar 'pr-get-symbol path))))) - (assq name (nthcdr 2 menu))))) - - ;; GNU Emacs - (defvar pr-temp-menu nil) - - ;; GNU Emacs - (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name - entry index) - (when (and alist (or force (symbol-value modified-sym))) - (easy-menu-define pr-temp-menu nil "" - (pr-menu-create name alist var-sym fun entry index)) - (let ((item (pr-menu-get-item menu-path))) - (and item - (let* ((binding (nthcdr 3 item)) - (key-binding (cdr binding))) - (setcar binding pr-temp-menu) - (and key-binding (listp (car key-binding)) - (setcdr binding (cdr key-binding))) ; skip KEY-BINDING - (funcall fun (symbol-value var-sym) item)))) - (set modified-sym nil))) - - ;; GNU Emacs - (defun pr-menu-set-item-name (item name) - (and item - (setcar (nthcdr 2 item) name))) ; ITEM-NAME - - ;; GNU Emacs - (defun pr-menu-set-ps-title (value &optional item entry index) - (pr-menu-set-item-name (or item - (pr-menu-get-item "PostScript Printers")) - (format "PostScript Printer: %s" value)) - (pr-ps-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; GNU Emacs - (defun pr-menu-set-txt-title (value &optional item entry index) - (pr-menu-set-item-name (or item - (pr-menu-get-item "Text Printers")) - (format "Text Printer: %s" value)) - (pr-txt-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; GNU Emacs - (defun pr-menu-set-utility-title (value &optional item entry index) - (let ((name (symbol-name value))) - (if item - (pr-menu-set-item-name item name) - (pr-menu-set-item-name - (pr-menu-get-item - '("PostScript Print" "File" "PostScript Utility")) - name) - (pr-menu-set-item-name - (pr-menu-get-item - '("PostScript Preview" "File" "PostScript Utility")) - name))) - (pr-ps-set-utility value) - (and index - (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) - - ;; GNU Emacs - (defun pr-even-or-odd-pages (value &optional no-lock) - (pr-menu-set-item-name (pr-menu-get-item "Print All Pages") - (cdr (assq value pr-even-or-odd-alist))) - (setq ps-even-or-odd-pages value) - (or no-lock - (pr-menu-lock 'postscript-options 8 12 'toggle nil))))) - - (defun pr-ps-set-utility (value) (let ((item (cdr (assq value pr-ps-utility-alist)))) (or item @@ -5997,9 +6018,10 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." ;; Printing Interface (inspired on ps-print-interface.el) -(require 'widget) -(require 'wid-edit) -(require 'cus-edit) +(eval-when-compile + (require 'cus-edit) + (require 'wid-edit) + (require 'widget)) (defvar pr-i-window-configuration nil) From a6f882f597eb7238df3ec104b93089511f3c3adc Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Sun, 5 Aug 2007 14:09:30 +0000 Subject: [PATCH 009/105] Honor term-default-fg-color and term-default-bg-color settings when modifying term-current-face. --- lisp/ChangeLog | 14 ++++++++++++++ lisp/term.el | 24 ++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d9657200ed..4dd70c7eff8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2007-08-05 Peter Povinec yahoo.com> (tiny change) + + * term.el: Honor term-default-fg-color and term-default-bg-color + settings when modifying term-current-face. + (term-default-fg-color, term-default-bg-color): Initialized from + default term-current-face. + (term-mode, term-reset-terminal): Set term-current-face with + term-default-fg-color and term-default-bg-color. + (term-handle-colors-array): term-current-face has term-default-fg-color + and term-default-bg-color after reset escape sequence. + (term-handle-colors-array): Set term-current-color with + term-default-fg/bg-color instead of ansi-term-color-vector when the + index (term-ansi-current-color or term-ansi-current-bg-color) is zero. + 2007-08-05 Vinicius Jose Latorre * printing.el: Require lpr and ps-print when loading printing package. diff --git a/lisp/term.el b/lisp/term.el index c7b5ee249d1..4d1c660543a 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -695,12 +695,12 @@ Buffer local variable.") ;;; faces -mm -(defcustom term-default-fg-color 'unspecified +(defcustom term-default-fg-color (face-foreground term-current-face) "Default color for foreground in `term'." :group 'term :type 'string) -(defcustom term-default-bg-color 'unspecified +(defcustom term-default-bg-color (face-background term-current-face) "Default color for background in `term'." :group 'term :type 'string) @@ -1098,6 +1098,8 @@ Entry to this mode runs the hooks on `term-mode-hook'." (make-local-variable 'term-pending-delete-marker) (setq term-pending-delete-marker (make-marker)) (make-local-variable 'term-current-face) + (setq term-current-face (list :background term-default-bg-color + :foreground term-default-fg-color)) (make-local-variable 'term-pending-frame) (setq term-pending-frame nil) ;; Cua-mode's keybindings interfere with the term keybindings, disable it. @@ -3055,7 +3057,8 @@ See `term-prompt-regexp'." (setq term-scroll-start 0) (setq term-scroll-end term-height) (setq term-insert-mode nil) - (setq term-current-face nil) + (setq term-current-face (list :background term-default-bg-color + :foreground term-default-fg-color)) (setq term-ansi-current-underline nil) (setq term-ansi-current-bold nil) (setq term-ansi-current-reverse nil) @@ -3117,7 +3120,8 @@ See `term-prompt-regexp'." ;;; 0 (Reset) or unknown (reset anyway) (t - (setq term-current-face nil) + (setq term-current-face (list :background term-default-bg-color + :foreground term-default-fg-color)) (setq term-ansi-current-underline nil) (setq term-ansi-current-bold nil) (setq term-ansi-current-reverse nil) @@ -3154,11 +3158,11 @@ See `term-prompt-regexp'." (setq term-current-face (list :background (if (= term-ansi-current-color 0) - (face-foreground 'default) + term-default-fg-color (elt ansi-term-color-vector term-ansi-current-color)) :foreground (if (= term-ansi-current-bg-color 0) - (face-background 'default) + term-default-bg-color (elt ansi-term-color-vector term-ansi-current-bg-color)))) (when term-ansi-current-bold (setq term-current-face @@ -3181,9 +3185,13 @@ See `term-prompt-regexp'." ) (setq term-current-face (list :foreground - (elt ansi-term-color-vector term-ansi-current-color) + (if (= term-ansi-current-color 0) + term-default-fg-color + (elt ansi-term-color-vector term-ansi-current-color)) :background - (elt ansi-term-color-vector term-ansi-current-bg-color))) + (if (= term-ansi-current-bg-color 0) + term-default-bg-color + (elt ansi-term-color-vector term-ansi-current-bg-color)))) (when term-ansi-current-bold (setq term-current-face (append '(:weight bold) term-current-face))) From 35ea56c96a85e8ecc3c97210a2006e6b3694b062 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 6 Aug 2007 06:44:31 +0000 Subject: [PATCH 010/105] (window_min_size_2): New function. (window_min_size_1, size_window, Fdisplay_buffer) (Fsplit_window, adjust_window_trailing_edge): Use it to avoid windows without mode- or header-lines when window-min-height is too small. (size_window): Reset nodelete_p after testing it, following an earlier note by Kim F. Storm. (display_buffer): Do not set split_height_threshold to twice the value of window_min_height to avoid changing the value of a customizable variable. Rather explicitly check whether the height of the window that shall be splitted is at least as large as split_height_threshold. (Fwindow_full_width_p): New defun. (syms_of_window): Defsubr it. (Fdisplay_buffer): Use NILP. (Fset_window_scroll_bars): Likewise. --- src/window.c | 117 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 70 insertions(+), 47 deletions(-) diff --git a/src/window.c b/src/window.c index e6fe32ea506..6fe78166ba1 100644 --- a/src/window.c +++ b/src/window.c @@ -62,6 +62,7 @@ static void window_scroll P_ ((Lisp_Object, int, int, int)); static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); static int window_min_size_1 P_ ((struct window *, int)); +static int window_min_size_2 P_ ((struct window *, int)); static int window_min_size P_ ((struct window *, int, int, int *)); static void size_window P_ ((Lisp_Object, int, int, int, int, int)); static int freeze_window_start P_ ((struct window *, void *)); @@ -556,6 +557,15 @@ use (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */) return make_number (window_box_text_cols (decode_any_window (window))); } +DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0, + doc: /* Return t if WINDOW is as wide as its frame. +WINDOW defaults to the selected window. */) + (window) + Lisp_Object window; +{ + return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil; +} + DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, doc: /* Return the number of columns by which WINDOW is scrolled from left margin. WINDOW defaults to the selected window. */) @@ -2553,7 +2563,6 @@ check_frame_size (frame, rows, cols) *cols = MIN_SAFE_WINDOW_WIDTH; } - /* Value is non-zero if window W is fixed-size. WIDTH_P non-zero means check if W's width can be changed, otherwise check W's height. CHECK_SIBLINGS_P non-zero means check resizablity of WINDOW's @@ -2655,6 +2664,33 @@ window_fixed_size_p (w, width_p, check_siblings_p) return fixed_p; } +/* Return the minimum size for leaf window W. WIDTH_P non-zero means + take into account fringes and the scrollbar of W. WIDTH_P zero + means take into account mode-line and header-line of W. Return 1 + for the minibuffer. */ + +static int +window_min_size_2 (w, width_p) + struct window *w; + int width_p; +{ + int size; + + if (width_p) + size = max (window_min_width, + (MIN_SAFE_WINDOW_WIDTH + + WINDOW_FRINGE_COLS (w) + + WINDOW_SCROLL_BAR_COLS (w))); + else if (MINI_WINDOW_P (w)) + size = 1; + else + size = max (window_min_height, + (MIN_SAFE_WINDOW_HEIGHT + + (WINDOW_WANTS_MODELINE_P (w) ? 1 : 0) + + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0 ))); + + return size; +} /* Return the minimum size of window W, not taking fixed-width windows into account. WIDTH_P non-zero means return the minimum width, @@ -2724,22 +2760,7 @@ window_min_size_1 (w, width_p) } } else - { - if (width_p) - size = max (window_min_width, - (MIN_SAFE_WINDOW_WIDTH - + WINDOW_FRINGE_COLS (w) - + WINDOW_SCROLL_BAR_COLS (w))); - else - { - if (MINI_WINDOW_P (w) - || (!WINDOW_WANTS_MODELINE_P (w) - && !WINDOW_WANTS_HEADER_LINE_P (w))) - size = 1; - else - size = window_min_height; - } - } + size = window_min_size_2 (w, width_p); return size; } @@ -2981,11 +3002,6 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) Lisp_Object child, *forward, *sideward; int old_size, min_size, safe_min_size; - /* We test nodelete_p != 2 and nodelete_p != 1 below, so it - seems like it's too soon to do this here. ++KFS. */ - if (nodelete_p == 2) - nodelete_p = 0; - check_min_window_sizes (); size = max (0, size); @@ -2996,22 +3012,23 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) { old_size = WINDOW_TOTAL_COLS (w); min_size = window_min_width; - /* Ensure that there is room for the scroll bar and fringes! - We may reduce display margins though. */ - safe_min_size = (MIN_SAFE_WINDOW_WIDTH - + WINDOW_FRINGE_COLS (w) - + WINDOW_SCROLL_BAR_COLS (w)); + safe_min_size = window_min_size_2 (w, 1); } else { old_size = XINT (w->total_lines); min_size = window_min_height; - safe_min_size = MIN_SAFE_WINDOW_HEIGHT; + safe_min_size = window_min_size_2 (w, 0); } if (old_size < min_size && nodelete_p != 2) w->too_small_ok = Qt; + /* Move the following test here since otherwise the + preceding test doesn't make sense. martin. */ + if (nodelete_p == 2) + nodelete_p = 0; + /* Maybe delete WINDOW if it's too small. */ if (nodelete_p != 1 && !NILP (w->parent)) { @@ -3708,9 +3725,6 @@ displayed. */) frames = Qnil; if (FRAME_MINIBUF_ONLY_P (f)) XSETFRAME (frames, last_nonminibuf_frame); - /* Don't try to create a window if we would get an error. */ - if (split_height_threshold < window_min_height << 1) - split_height_threshold = window_min_height << 1; /* Note that both Fget_largest_window and Fget_lru_window ignore minibuffers and dedicated windows. @@ -3733,25 +3747,30 @@ displayed. */) else window = Fget_largest_window (frames, Qt); - /* If we got a tall enough full-width window that can be split, - split it. */ + /* If the largest window is tall enough, full-width, and either eligible + for splitting or the only window, split it. */ if (!NILP (window) && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) - && window_height (window) >= split_height_threshold - && WINDOW_FULL_WIDTH_P (XWINDOW (window))) + && WINDOW_FULL_WIDTH_P (XWINDOW (window)) + && (window_height (window) >= split_height_threshold + || (NILP (XWINDOW (window)->parent))) + && (window_height (window) + >= (2 * window_min_size_2 (XWINDOW (window), 0)))) window = Fsplit_window (window, Qnil, Qnil); else { Lisp_Object upper, lower, other; window = Fget_lru_window (frames, Qt); - /* If the LRU window is selected, and big enough, - and can be split, split it. */ + /* If the LRU window is tall enough, and either eligible for splitting + and selected or the only window, split it. */ if (!NILP (window) && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) - && (EQ (window, selected_window) - || EQ (XWINDOW (window)->parent, Qnil)) - && window_height (window) >= window_min_height << 1) + && ((EQ (window, selected_window) + && window_height (window) >= split_height_threshold) + || (NILP (XWINDOW (window)->parent))) + && (window_height (window) + >= (2 * window_min_size_2 (XWINDOW (window), 0)))) window = Fsplit_window (window, Qnil, Qnil); else window = Fget_lru_window (frames, Qnil); @@ -4000,9 +4019,11 @@ See Info node `(elisp)Splitting Windows' for more details and examples.*/) if (NILP (horflag)) { - if (size_int < window_min_height) + int window_safe_height = window_min_size_2 (o, 0); + + if (size_int < window_safe_height) error ("Window height %d too small (after splitting)", size_int); - if (size_int + window_min_height > XFASTINT (o->total_lines)) + if (size_int + window_safe_height > XFASTINT (o->total_lines)) error ("Window height %d too small (after splitting)", XFASTINT (o->total_lines) - size_int); if (NILP (o->parent) @@ -4015,10 +4036,11 @@ See Info node `(elisp)Splitting Windows' for more details and examples.*/) } else { - if (size_int < window_min_width) + int window_safe_width = window_min_size_2 (o, 1); + + if (size_int < window_safe_width) error ("Window width %d too small (after splitting)", size_int); - - if (size_int + window_min_width > XFASTINT (o->total_cols)) + if (size_int + window_safe_width > XFASTINT (o->total_cols)) error ("Window width %d too small (after splitting)", XFASTINT (o->total_cols) - size_int); if (NILP (o->parent) @@ -4499,7 +4521,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag) /* Don't make this window too small. */ if (XINT (CURSIZE (window)) + delta - < (horiz_flag ? window_min_width : window_min_height)) + < window_min_size_2 (XWINDOW (window), horiz_flag)) { Fset_window_configuration (old_config); error ("Cannot adjust window size as specified"); @@ -6897,7 +6919,7 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */) vertical_type = Qnil; } - if (!(EQ (vertical_type, Qnil) + if (!(NILP (vertical_type) || EQ (vertical_type, Qleft) || EQ (vertical_type, Qright) || EQ (vertical_type, Qt))) @@ -7502,6 +7524,7 @@ The selected frame is the one whose configuration has changed. */); defsubr (&Swindow_buffer); defsubr (&Swindow_height); defsubr (&Swindow_width); + defsubr (&Swindow_full_width_p); defsubr (&Swindow_hscroll); defsubr (&Sset_window_hscroll); defsubr (&Swindow_redisplay_end_trigger); From 97958f77753833122cf38500fd1694307647854d Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 6 Aug 2007 06:47:09 +0000 Subject: [PATCH 011/105] Add EXFUN for Fwindow_full_width_p. --- src/ChangeLog | 24 ++++++++++++++++++++++++ src/window.h | 1 + 2 files changed, 25 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a1128d19c58..109153a9af3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,27 @@ +2007-08-06 Martin Rudalics + + * window.c (window_min_size_2): New function. + (window_min_size_1, size_window, Fdisplay_buffer) + (Fsplit_window, adjust_window_trailing_edge): Use it to avoid + windows without mode- or header-lines when window-min-height is + too small. + (size_window): Reset nodelete_p after testing it, following an + earlier note by Kim F. Storm. + (display_buffer): Do not set split_height_threshold to twice the + value of window_min_height to avoid changing the value of a + customizable variable. Rather explicitly check whether the + height of the window that shall be splitted is at least as large + as split_height_threshold. + (Fwindow_full_width_p): New defun. + (syms_of_window): Defsubr it. + + * window.h: Add EXFUN for Fwindow_full_width_p. + +2007-08-06 Andreas Schwab + + * window.c (Fdisplay_buffer): Use NILP. + (Fset_window_scroll_bars): Likewise. + 2007-08-03 Richard Stallman * fileio.c (Fvisited_file_modtime): Use make_time. diff --git a/src/window.h b/src/window.h index 7fc97448757..a5c1f34a0ce 100644 --- a/src/window.h +++ b/src/window.h @@ -777,6 +777,7 @@ extern Lisp_Object window_from_coordinates P_ ((struct frame *, int, int, EXFUN (Fwindow_dedicated_p, 1); extern int window_height P_ ((Lisp_Object)); extern int window_width P_ ((Lisp_Object)); +EXFUN (Fwindow_full_width_p, 1); extern void set_window_height P_ ((Lisp_Object, int, int)); extern void set_window_width P_ ((Lisp_Object, int, int)); extern void change_window_heights P_ ((Lisp_Object, int)); From 2a5f11a2b076479b66f65f698af4fbb09cc57282 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 6 Aug 2007 06:51:13 +0000 Subject: [PATCH 012/105] (resize-temp-buffer-window): Use window-full-width-p instead of comparing frame-width and window-width. --- lisp/ChangeLog | 5 +++++ lisp/help.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4dd70c7eff8..39c2cd1fdcf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-06 Martin Rudalics + + * help.el (resize-temp-buffer-window): Use window-full-width-p + instead of comparing frame-width and window-width. + 2007-08-05 Peter Povinec yahoo.com> (tiny change) * term.el: Honor term-default-fg-color and term-default-bg-color diff --git a/lisp/help.el b/lisp/help.el index f75e26f93e6..4a94fd35bc7 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -958,14 +958,14 @@ This applies to `help', `apropos' and `completion' buffers, and some others." (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window))) (defun resize-temp-buffer-window () - "Resize the current window to fit its contents. + "Resize the selected window to fit its contents. Will not make it higher than `temp-buffer-max-height' nor smaller than `window-min-height'. Do nothing if it is the only window on its frame, if it is not as wide as the frame or if some of the window's contents are scrolled out of view." (unless (or (one-window-p 'nomini) (not (pos-visible-in-window-p (point-min))) - (/= (frame-width) (window-width))) + (not (window-full-width-p))) (fit-window-to-buffer (selected-window) (if (functionp temp-buffer-max-height) From 8f06e122c551781a5fb5fc43819386383c9a9a84 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 6 Aug 2007 06:53:40 +0000 Subject: [PATCH 013/105] (Size of Window): Document window-full-width-p. --- lispref/ChangeLog | 4 ++++ lispref/windows.texi | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 9cb9115ef55..2e5949a42f0 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2007-08-06 Martin Rudalics + + * windows.texi (Size of Window): Document window-full-width-p. + 2007-07-25 Glenn Morris * gpl.texi (GPL): Replace license with GPLv3. diff --git a/lispref/windows.texi b/lispref/windows.texi index 22bb43ecaa0..bd8f7bc2d36 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi @@ -1887,6 +1887,12 @@ If @var{window} is @code{nil}, the function uses the selected window. @end example @end defun +@defun window-full-width-p &optional window +This function returns non-@code{nil} if @var{window} is as wide as +the frame that contains it; otherwise @code{nil}. +If @var{window} is @code{nil}, the function uses the selected window. +@end defun + @defun window-edges &optional window This function returns a list of the edge coordinates of @var{window}. If @var{window} is @code{nil}, the selected window is used. From 5bc880a47d90e1d140eb43c6037e628a06f127c7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 6 Aug 2007 06:57:31 +0000 Subject: [PATCH 014/105] * net/ange-ftp.el (ange-ftp-hook-function): Catch also errors in process-filter. --- lisp/ChangeLog | 5 +++++ lisp/net/ange-ftp.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39c2cd1fdcf..0f94bcb9f1d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-06 Michael Albinus + + * net/ange-ftp.el (ange-ftp-hook-function): Catch also errors in + process-filter. + 2007-08-06 Martin Rudalics * help.el (resize-temp-buffer-window): Use window-full-width-p diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 310442d4012..a05d9126dcd 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -4274,7 +4274,12 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") ;;;###autoload (defun ange-ftp-hook-function (operation &rest args) (let ((fn (get operation 'ange-ftp))) - (if fn (save-match-data (apply fn args)) + (if fn + ;; Catch also errors in process-filter. + (condition-case err + (let ((debug-on-error t)) + (save-match-data (apply fn args))) + (error (error (error-message-string err)))) (ange-ftp-run-real-handler operation args)))) ;; The following code is commented out because Tramp now deals with From 1f3d1bea39b05c380032b80343445b8a1af20429 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 6 Aug 2007 07:23:39 +0000 Subject: [PATCH 015/105] *** empty log message *** --- lisp/net/ange-ftp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index a05d9126dcd..67835c294fd 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -4279,7 +4279,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") (condition-case err (let ((debug-on-error t)) (save-match-data (apply fn args))) - (error (error (error-message-string err)))) + (error (signal (car err) (cdr err)))) (ange-ftp-run-real-handler operation args)))) ;; The following code is commented out because Tramp now deals with From f2b189796cf660c7cc06a6fb8b9f59295594b77b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Aug 2007 16:20:10 +0000 Subject: [PATCH 016/105] (tpu-before-save-hook): Rename from tpu-write-file-hook. Activate it with add-hook on buffer-save-hook. (newline, newline-and-indent, do-auto-fill): Use advice instead of redefining the function. (tpu-set-scroll-margins): Activate the pieces of advice. --- lisp/ChangeLog | 10 +++++- lisp/emulation/tpu-extras.el | 70 ++++++++++++++---------------------- 2 files changed, 36 insertions(+), 44 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0f94bcb9f1d..079f60d281c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2007-08-06 Stefan Monnier + + * emulation/tpu-extras.el (tpu-before-save-hook): Rename from + tpu-write-file-hook. Activate it with add-hook on buffer-save-hook. + (newline, newline-and-indent, do-auto-fill): Use advice instead of + redefining the function. + (tpu-set-scroll-margins): Activate the pieces of advice. + 2007-08-06 Michael Albinus * net/ange-ftp.el (ange-ftp-hook-function): Catch also errors in @@ -12,7 +20,7 @@ * term.el: Honor term-default-fg-color and term-default-bg-color settings when modifying term-current-face. - (term-default-fg-color, term-default-bg-color): Initialized from + (term-default-fg-color, term-default-bg-color): Initialize from default term-current-face. (term-mode, term-reset-terminal): Set term-current-face with term-default-fg-color and term-default-bg-color. diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 019896c0eb2..609ce2e203b 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el @@ -141,13 +141,11 @@ the previous line when starting from a line beginning." (add-hook 'picture-mode-hook 'tpu-set-cursor-free) -(defun tpu-write-file-hook nil +(defun tpu-before-save-hook () "Eliminate whitespace at ends of lines, if the cursor is free." (if (and (buffer-modified-p) tpu-cursor-free) (tpu-trim-line-ends))) -(or (memq 'tpu-write-file-hook write-file-functions) - (setq write-file-functions - (cons 'tpu-write-file-hook write-file-functions))) +(add-hook 'before-save-hook 'tpu-before-save-hook) ;;; Utility routines for implementing scroll margins @@ -246,7 +244,7 @@ Accepts a prefix argument for the number of lines to move." (end-of-line (- 1 num)))) (tpu-top-check beg num))) -(defun tpu-current-end-of-line nil +(defun tpu-current-end-of-line () "Move point to end of current line." (interactive) (let ((beg (point))) @@ -392,41 +390,24 @@ A repeat count means scroll that many sections." -;;; Replace the newline, newline-and-indent, and do-auto-fill functions - -(or (fboundp 'tpu-old-newline) - (fset 'tpu-old-newline (symbol-function 'newline))) -(or (fboundp 'tpu-old-do-auto-fill) - (fset 'tpu-old-do-auto-fill (symbol-function 'do-auto-fill))) -(or (fboundp 'tpu-old-newline-and-indent) - (fset 'tpu-old-newline-and-indent (symbol-function 'newline-and-indent))) - -(defun newline (&optional num) - "Insert a newline. With arg, insert that many newlines. -In Auto Fill mode, can break the preceding line if no numeric arg. -This is the TPU-edt version that respects the bottom scroll margin." - (interactive "p") - (let ((beg (tpu-current-line))) - (or num (setq num 1)) - (tpu-old-newline num) +;; Advise the newline, newline-and-indent, and do-auto-fill functions. +(defadvice newline (around tpu-respect-bottom-scroll-margin activate disable) + "Respect `tpu-bottom-scroll-margin'." + (let ((beg (tpu-current-line)) + (num (prefix-numeric-value (ad-get-arg 0)))) + ad-do-it (tpu-bottom-check beg num))) -(defun newline-and-indent nil - "Insert a newline, then indent according to major mode. -Indentation is done using the current indent-line-function. -In programming language modes, this is the same as TAB. -In some text modes, where TAB inserts a tab, this indents -to the specified left-margin column. This is the TPU-edt -version that respects the bottom scroll margin." - (interactive) +(defadvice newline-and-indent (around tpu-respect-bottom-scroll-margin) + "Respect `tpu-bottom-scroll-margin'." (let ((beg (tpu-current-line))) - (tpu-old-newline-and-indent) + ad-do-it (tpu-bottom-check beg 1))) -(defun do-auto-fill nil - "TPU-edt version that respects the bottom scroll margin." +(defadvice do-auto-fill (around tpu-respect-bottom-scroll-margin) + "Respect `tpu-bottom-scroll-margin'." (let ((beg (tpu-current-line))) - (tpu-old-do-auto-fill) + ad-do-it (tpu-bottom-check beg 1))) @@ -440,18 +421,21 @@ version that respects the bottom scroll margin." \nsEnter bottom scroll margin (N lines or N%% or RETURN for current value): ") ;; set top scroll margin (or (string= top "") - (if (string= "%" (substring top -1)) - (setq tpu-top-scroll-margin (string-to-number top)) - (setq tpu-top-scroll-margin + (setq tpu-top-scroll-margin + (if (string= "%" (substring top -1)) + (string-to-number top) (/ (1- (+ (* (string-to-number top) 100) (window-height))) (window-height))))) ;; set bottom scroll margin (or (string= bottom "") - (if (string= "%" (substring bottom -1)) - (setq tpu-bottom-scroll-margin (string-to-number bottom)) - (setq tpu-bottom-scroll-margin + (setq tpu-bottom-scroll-margin + (if (string= "%" (substring bottom -1)) + (string-to-number bottom) (/ (1- (+ (* (string-to-number bottom) 100) (window-height))) (window-height))))) + (dolist (f '(newline newline-and-indent do-auto-fill)) + (ad-enable-advice f 'around 'tpu-respect-bottom-scroll-margin) + (ad-activate f)) ;; report scroll margin settings if running interactively (and (interactive-p) (message "Scroll margins set. Top = %s%%, Bottom = %s%%" @@ -461,7 +445,7 @@ version that respects the bottom scroll margin." ;;; Functions to set cursor bound or free ;;;###autoload -(defun tpu-set-cursor-free nil +(defun tpu-set-cursor-free () "Allow the cursor to move freely about the screen." (interactive) (setq tpu-cursor-free t) @@ -471,7 +455,7 @@ version that respects the bottom scroll margin." (message "The cursor will now move freely about the screen.")) ;;;###autoload -(defun tpu-set-cursor-bound nil +(defun tpu-set-cursor-bound () "Constrain the cursor to the flow of the text." (interactive) (tpu-trim-line-ends) @@ -481,5 +465,5 @@ version that respects the bottom scroll margin." GOLD-map) (message "The cursor is now bound to the flow of your text.")) -;;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a +;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a ;;; tpu-extras.el ends here From 036f2966c3247692ee79a800b2f40f0778da19c7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Aug 2007 16:21:33 +0000 Subject: [PATCH 017/105] (tpu-current-line): Use posn-at-point and count-screen-lines. (tpu-edt-off): Disable relevant pieces of advice. --- lisp/ChangeLog | 4 ++++ lisp/emulation/tpu-edt.el | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 079f60d281c..f5319ac3ce9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2007-08-06 Stefan Monnier + * emulation/tpu-edt.el (tpu-current-line): Use posn-at-point and + count-screen-lines. + (tpu-edt-off): Disable relevant pieces of advice. + * emulation/tpu-extras.el (tpu-before-save-hook): Rename from tpu-write-file-hook. Activate it with add-hook on buffer-save-hook. (newline, newline-and-indent, do-auto-fill): Use advice instead of diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index 414ae7bf14e..9220090df25 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el @@ -826,10 +826,13 @@ Create the key map if necessary." (use-local-map tpu-buffer-local-map))) (local-set-key key func)) -(defun tpu-current-line nil +(defun tpu-current-line () "Return the vertical position of point in the selected window. Top line is 0. Counts each text line only once, even if it wraps." - (+ (count-lines (window-start) (point)) (if (= (current-column) 0) 1 0) -1)) + (or + (cdr (nth 6 (posn-at-point))) + (if (eq (window-start) (point)) 0 + (1- (count-screen-lines (window-start) (point) 'count-final-newline))))) ;;; @@ -2479,6 +2482,7 @@ If FILE is nil, try to load a default file. The default file names are (if (eq tpu-global-map parent) (set-keymap-parent map (keymap-parent parent)) (setq map parent))))) + (ad-disable-regexp "\\`tpu-") (setq tpu-edt-mode nil)) (provide 'tpu-edt) From f6969b1e38b0e3a0298ff99b2634296afaf3f759 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 6 Aug 2007 16:36:11 +0000 Subject: [PATCH 018/105] *** empty log message *** --- admin/FOR-RELEASE | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 36dbabdd476..3a4d64d80a5 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -48,6 +48,10 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. ** id.brep@gmail.com, 12 Jul: customize-group "erc-server" save buffer error +** ams@gnu.org, 9 July: eshell and external commands + +** timh@insightful.com, 25 June: undigestify-rmail-message in emacs 22.1 doesn't split a digest + * FIXES FOR EMACS 22.2 Here we list small fixes that arrived too late for Emacs 22.1, but From 675bab447089a136b2132b64ab9102c1e7f1bd3a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 6 Aug 2007 17:22:44 +0000 Subject: [PATCH 019/105] * xdisp.c (redisplay_window): When restoring original buffer position, make sure it is still valid. --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 109153a9af3..71cc5248ebd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-06 Chong Yidong + + * xdisp.c (redisplay_window): When restoring original buffer + position, make sure it is still valid. + 2007-08-06 Martin Rudalics * window.c (window_min_size_2): New function. From bc04f6bf4f2d77093b5a42f6f007b3474d86fb2d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 6 Aug 2007 17:23:03 +0000 Subject: [PATCH 020/105] (redisplay_window): When restoring original buffer position, make sure it is still valid. --- src/xdisp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 46247beb10f..1dd69e34590 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13520,7 +13520,10 @@ redisplay_window (window, just_this_one_p) /* Restore current_buffer and value of point in it. */ TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); set_buffer_internal_1 (old); - TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); + /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become + shorter. This can be caused by log truncation in *Messages*. */ + if (CHARPOS (lpoint) <= ZV) + TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); unbind_to (count, Qnil); } From dfbd373dfb9de125e016bb7d11b46d05fdf992c4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Aug 2007 20:08:55 +0000 Subject: [PATCH 021/105] (diff-unified->context, diff-reverse-direction, diff-fixup-modifs): Typo in docstring. --- lisp/ChangeLog | 5 +++++ lisp/diff-mode.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5319ac3ce9..790bb74d2d9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-06 Tom Tromey + + * diff-mode.el (diff-unified->context, diff-reverse-direction) + (diff-fixup-modifs): Typo in docstring. + 2007-08-06 Stefan Monnier * emulation/tpu-edt.el (tpu-current-line): Use posn-at-point and diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index f2800f1c337..e0aee67a62b 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -685,7 +685,7 @@ PREFIX is only used internally: don't use it." (defun diff-unified->context (start end) "Convert unified diffs to context diffs. START and END are either taken from the region (if a prefix arg is given) or -else cover the whole bufer." +else cover the whole buffer." (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) (list (region-beginning) (region-end)) (list (point-min) (point-max)))) @@ -847,7 +847,7 @@ With a prefix argument, convert unified format to context format." (defun diff-reverse-direction (start end) "Reverse the direction of the diffs. START and END are either taken from the region (if a prefix arg is given) or -else cover the whole bufer." +else cover the whole buffer." (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) (list (region-beginning) (region-end)) (list (point-min) (point-max)))) @@ -909,7 +909,7 @@ else cover the whole bufer." (defun diff-fixup-modifs (start end) "Fixup the hunk headers (in case the buffer was modified). START and END are either taken from the region (if a prefix arg is given) or -else cover the whole bufer." +else cover the whole buffer." (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) (list (region-beginning) (region-end)) (list (point-min) (point-max)))) From b6e6e09ac1bc4fb22843d9ba8920dffa88f8ce37 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Aug 2007 21:17:34 +0000 Subject: [PATCH 022/105] (vc-bzr-registered): Gracefully handle missing "bzr" program, and return nil (vc-bzr-state): Gracefully handle missing "bzr" program, and return nil. (vc-bzr-state): Look for path names relative to the repository root after status keyword. (vc-bzr-file-name-relative): New function. (vc-bzr-admin-dirname): Reinstate, as other vc-bzr-admin-... paths depend on it. (vc-bzr-admin-dirname, ...-checkout-format-file) (...-branch-format-file, ...-revhistory): Paths to some Bzr internal files that we now parse directly for speed. (vc-bzr-root-dir): Use `vc-bzr-admin-checkout-format-file' as witness. (vc-bzr-registered): Only parse vc-bzr-admin-dirstate file if it exists. (vc-bzr-state): "bzr status" successful only if exitcode is 0 (vc-bzr-root): Use `vc-bzr-shell-command'. Stderr may contain Bzr warnings, so we must discard it. (vc-bzr-workfile-version): Speedup counting lines from `vc-bzr-admin-revhistory' file, but fallback to spawning "bzr revno" if that file doesn't exist. (vc-bzr-responsible-p): Use `vc-bzr-root' instead of `vc-bzr-root-dir' for speed. add `vc-bzr-admin-dirname' (not ".bzr"!) to `vc-directory-exclusion-list' (vc-bzr-shell-command): New function. --- lisp/ChangeLog | 26 ++++++++++++++++++++++++++ lisp/vc-bzr.el | Bin 21032 -> 23605 bytes 2 files changed, 26 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 790bb74d2d9..2f77c64fa41 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,29 @@ +2007-08-06 Riccardo Murri + + * vc-bzr.el (vc-bzr-registered): Gracefully handle missing "bzr" + program, and return nil + (vc-bzr-state): Gracefully handle missing "bzr" program, and return nil. + (vc-bzr-state): Look for path names relative to the repository + root after status keyword. + (vc-bzr-file-name-relative): New function. + (vc-bzr-admin-dirname): Reinstate, as other vc-bzr-admin-... paths + depend on it. + (vc-bzr-admin-dirname, ...-checkout-format-file) + (...-branch-format-file, ...-revhistory): Paths to some Bzr internal + files that we now parse directly for speed. + (vc-bzr-root-dir): Use `vc-bzr-admin-checkout-format-file' as witness. + (vc-bzr-registered): Only parse vc-bzr-admin-dirstate file if it exists. + (vc-bzr-state): "bzr status" successful only if exitcode is 0 + (vc-bzr-root): Use `vc-bzr-shell-command'. Stderr may contain + Bzr warnings, so we must discard it. + (vc-bzr-workfile-version): Speedup counting lines from + `vc-bzr-admin-revhistory' file, but fallback to spawning "bzr revno" + if that file doesn't exist. + (vc-bzr-responsible-p): Use `vc-bzr-root' instead of + `vc-bzr-root-dir' for speed. + add `vc-bzr-admin-dirname' (not ".bzr"!) to `vc-directory-exclusion-list' + (vc-bzr-shell-command): New function. + 2007-08-06 Tom Tromey * diff-mode.el (diff-unified->context, diff-reverse-direction) diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index c2128de90c9e0615352109c7ed516167364ef4bd..907bcc5200ce0f434240bac99f03f67bde9e79a1 100644 GIT binary patch delta 2894 zcmb7GO>7%Q6qc(TiYblbq;c$|>8lHLH}X0uK?-fu61PoD5l;G(O1&W1?2hYE*0b); zteqB+PnNr0kOnUU zSk`6gICkLra%}Xc4zn8sisj8)K@sq`4CgLftFE4a;%oYo&!D~d+>2>|;+nGbYar?b zTpAEZ_`ywZd?swlD7y})Zv_yLrq8K9;ldUnhZ^+=FBi?U;gT9!a{(>KLg$w4Ht5UD za_Yp{@J1zJ@B+p&(AKesjG2XTqlD*^Tl3MaqG`(SMh_o;sDfw}A?_Oa>A>>yRvnvYvtJ_V&IBk)#4jsn|0;CkyXqqP4#ML0Tt_OAl z7*<&GL*{n>n)o@@Q5X+dVx)6bc*WU!wm`>G{_2woUA#<07%)u{(6~N#;g!|3N_7>u z2xzlO+=Ot*FhOl^C&!w$sF#cAD(d`|sP%Jk=L}teay$nH*>2j*)$O%(ER~(kq}OOY zFl_1Y%$9S7s`h~mh)fN11Zud-Hjahejrx_8Iviv!u}2^B+sRk6yD=mW8Us&OxcueE4Ea#T+8a{i*cKR!}OfVX=J-7oSFQu5R3 zy!>JMNEU?OuR+I@`({e{o@SPIo>ph3_JKzm6!D5A;9WAawCAKsS7R}0QiRmULyx>Y z`&MU&J-re3Wkb)d-|s{qlR7oqR8SL&^Th;%N@NGMCz&C3_6*`yU?B`;fHIKwp&0|4 z0d~u$u398pO4V(hNpBE(rIbOQ&K^@+L669(+w3|~!$3SldK@!oH)99Nk%io>ypx?? z#*rq{sB1L)MIx$L*w`e2C45Vf0yDzGF>y;LF26r`q%xp73G`KFC_q}(dT{1-;(3osW+<=~o1rrP&ZpQV**A~D!Ht5h0N_FI=(quOePwbIjkIi<^7XLUXKb+m) z87f6}MAxK6Wp$f4p&+15a6ju4II~`@R@TmfrfwuV6e$(QR$r6s%IR2^TDBJwpd4(q zVN%k` zM2?~`QA5%gEqPP4>$nqIB+yKc@8MJCJOUSyswzOvF&CdRaVcr^LF@)Tbgm=^L~}5% z6w7fbSMMLkwAV>n0gxY z`OsV}-bT#es!gUNQ|BfTvD5O|m2XCrWBKRG%7_wud8~3i`tn9)uA`3NsCpwQQpZv- zv|R^ru2hl{+!ff7xHjyHi)EL<$6*9*id(u(pn;d`iOH-$i%a6&QA?eTzGRM&0fTGSojngM0d_GC;0=D@+lVx@w|vG&-X1oUQ( z!det?V`g!LeVpCR*hGM?yNt=LZ<$iS3@)bRp)+@gmvbt(Xy$blhF-`?#j{k014Mhf{sH76UVtiF`qV_r*%qBW}7QfXN z!<)71nB2ZPB{5hTPEWQ}$tKPZ{r?vmf;#t_T)08i(QzF=pG)E7a(X)W2pUL+VaP(w THGjPRbMoZi*J=Kl-Ff8~{1?*P From 4a64fb3f72a8f8f8fff0b216af6b2506cb5ca8fb Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 6 Aug 2007 22:38:02 +0000 Subject: [PATCH 023/105] Include INSTALL in full-bin zip file. --- admin/nt/makedist.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/nt/makedist.bat b/admin/nt/makedist.bat index 87e151dd06a..5afef00e9b3 100755 --- a/admin/nt/makedist.bat +++ b/admin/nt/makedist.bat @@ -35,8 +35,8 @@ copy %3\README.W32 emacs-%1\README.W32 rem Info-ZIP zip seems to be broken on Windows. rem It always writes to zip.zip and treats the zipfile argument as one rem of the files to go in it. -rem zip -9 -r %2-bin-i386 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim -x emacs.mdp *.pdb *.opt *~ CVS -7z a -tZIP -mx=9 -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory %2-bin-i386.zip emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim emacs-%1/site-lisp +rem zip -9 -r %2-bin-i386 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/INSTALL emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim -x emacs.mdp *.pdb *.opt *~ CVS +7z a -tZIP -mx=9 -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory %2-bin-i386.zip emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/INSTALL emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim emacs-%1/site-lisp del emacs-%1\README.W32 if not (%4) == () goto end From 49084b3679991754df5f8059ee3c7323abf4f719 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Mon, 6 Aug 2007 23:33:37 +0000 Subject: [PATCH 024/105] Returning back printing.el --- lisp/ChangeLog | 5 - lisp/printing.el | 874 +++++++++++++++++++++++------------------------ 2 files changed, 426 insertions(+), 453 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f77c64fa41..323ec1b69c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -65,11 +65,6 @@ term-default-fg/bg-color instead of ansi-term-color-vector when the index (term-ansi-current-color or term-ansi-current-bg-color) is zero. -2007-08-05 Vinicius Jose Latorre - - * printing.el: Require lpr and ps-print when loading printing package. - Reported by Glenn Morris . - 2007-08-05 Michael Albinus * files.el (set-auto-mode): Handle also remote files wrt diff --git a/lisp/printing.el b/lisp/printing.el index 5ab1c9baee3..f84a2112661 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -6,11 +6,11 @@ ;; Author: Vinicius Jose Latorre ;; Maintainer: Vinicius Jose Latorre ;; Keywords: wp, print, PostScript -;; Version: 6.9.1 +;; Version: 6.8.4 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre -(defconst pr-version "6.9.1" - "printing.el, v 6.9.1 <2007/08/02 vinicius> +(defconst pr-version "6.8.4" + "printing.el, v 6.8.4 <2005/06/11 vinicius> Please send all bug fixes and enhancements to Vinicius Jose Latorre @@ -1093,457 +1093,46 @@ If SUFFIX is non-nil, add that at the end of the file name." (set-default-file-modes umask))))) - -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; XEmacs Definitions - +;; GNU Emacs +(defalias 'pr-e-frame-char-height 'frame-char-height) +(defalias 'pr-e-frame-char-width 'frame-char-width) +(defalias 'pr-e-mouse-pixel-position 'mouse-pixel-position) +;; XEmacs +(defalias 'pr-x-add-submenu 'add-submenu) +(defalias 'pr-x-event-function 'event-function) +(defalias 'pr-x-event-object 'event-object) +(defalias 'pr-x-find-menu-item 'find-menu-item) +(defalias 'pr-x-font-height 'font-height) +(defalias 'pr-x-font-width 'font-width) +(defalias 'pr-x-get-popup-menu-response 'get-popup-menu-response) +(defalias 'pr-x-make-event 'make-event) +(defalias 'pr-x-misc-user-event-p 'misc-user-event-p) +(defalias 'pr-x-relabel-menu-item 'relabel-menu-item) +(defalias 'pr-x-event-x-pixel 'event-x-pixel) +(defalias 'pr-x-event-y-pixel 'event-y-pixel) (cond ((featurep 'xemacs) ; XEmacs - ;; XEmacs + (defvar current-menubar nil) + (defvar current-mouse-event nil) + (defvar zmacs-region-stays nil) (defalias 'pr-f-set-keymap-parents 'set-keymap-parents) (defalias 'pr-f-set-keymap-name 'set-keymap-name) - - ;; XEmacs (defun pr-f-read-string (prompt initial history default) (let ((str (read-string prompt initial))) (if (and str (not (string= str ""))) str default))) - - ;; XEmacs - (defvar zmacs-region-stays nil) - - ;; XEmacs (defun pr-keep-region-active () - (setq zmacs-region-stays t)) + (setq zmacs-region-stays t))) - ;; XEmacs - (defun pr-region-active-p () - (and pr-auto-region (not zmacs-region-stays) (ps-mark-active-p))) - - ;; XEmacs - (defun pr-menu-char-height () - (font-height (face-font 'default))) - - ;; XEmacs - (defun pr-menu-char-width () - (font-width (face-font 'default))) - - ;; XEmacs - (defmacro pr-xemacs-global-menubar (&rest body) - `(save-excursion - (let ((temp (get-buffer-create (make-temp-name " *Temp")))) - ;; be sure to access global menubar - (set-buffer temp) - ,@body - (kill-buffer temp)))) - - ;; XEmacs - (defun pr-global-menubar (pr-menu-spec) - ;; Menu binding - (pr-xemacs-global-menubar - (add-submenu nil (cons "Printing" pr-menu-spec) "Apps")) - (setq pr-menu-print-item nil)) - - ;; XEmacs - (defvar current-mouse-event nil) - (defun pr-menu-position (entry index horizontal) - (make-event - 'button-release - (list 'button 1 - 'x (- (event-x-pixel current-mouse-event) ; X - (* horizontal pr-menu-char-width)) - 'y (- (event-y-pixel current-mouse-event) ; Y - (* (pr-menu-index entry index) pr-menu-char-height))))) - - (defvar pr-menu-position nil) - (defvar pr-menu-state nil) - - ;; XEmacs - (defvar current-menubar nil) ; to avoid compilation gripes - (defun pr-menu-lookup (path) - (car (find-menu-item current-menubar (cons "Printing" path)))) - - ;; XEmacs - (defun pr-menu-lock (entry index horizontal state path) - (when pr-menu-lock - (or (and pr-menu-position (eq state pr-menu-state)) - (setq pr-menu-position (pr-menu-position entry index horizontal) - pr-menu-state state)) - (let* ((menu (pr-menu-lookup path)) - (result (get-popup-menu-response menu pr-menu-position))) - (and (misc-user-event-p result) - (funcall (event-function result) - (event-object result)))) - (setq pr-menu-position nil))) - - ;; XEmacs - (defalias 'pr-update-mode-line 'set-menubar-dirty-flag) - - ;; XEmacs - (defvar pr-ps-name-old "PostScript Printers") - (defvar pr-txt-name-old "Text Printers") - (defvar pr-ps-utility-old "PostScript Utility") - (defvar pr-even-or-odd-old "Print All Pages") - - ;; XEmacs - (defun pr-do-update-menus (&optional force) - (pr-menu-alist pr-ps-printer-alist - 'pr-ps-name - 'pr-menu-set-ps-title - '("Printing") - 'pr-ps-printer-menu-modified - force - pr-ps-name-old - 'postscript 2) - (pr-menu-alist pr-txt-printer-alist - 'pr-txt-name - 'pr-menu-set-txt-title - '("Printing") - 'pr-txt-printer-menu-modified - force - pr-txt-name-old - 'text 2) - (let ((save-var pr-ps-utility-menu-modified)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("Printing" "PostScript Print" "File") - 'save-var - force - pr-ps-utility-old - nil 1)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("Printing" "PostScript Preview" "File") - 'pr-ps-utility-menu-modified - force - pr-ps-utility-old - nil 1) - (pr-even-or-odd-pages ps-even-or-odd-pages force)) - - ;; XEmacs - (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name - entry index) - (when (and alist (or force (symbol-value modified-sym))) - (pr-xemacs-global-menubar - (add-submenu menu-path - (pr-menu-create name alist var-sym - fun entry index))) - (funcall fun (symbol-value var-sym)) - (set modified-sym nil))) - - ;; XEmacs - (defun pr-relabel-menu-item (newname var-sym) - (pr-xemacs-global-menubar - (relabel-menu-item - (list "Printing" (symbol-value var-sym)) - newname) - (set var-sym newname))) - - ;; XEmacs - (defun pr-menu-set-ps-title (value &optional item entry index) - (pr-relabel-menu-item (format "PostScript Printer: %s" value) - 'pr-ps-name-old) - (pr-ps-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; XEmacs - (defun pr-menu-set-txt-title (value &optional item entry index) - (pr-relabel-menu-item (format "Text Printer: %s" value) - 'pr-txt-name-old) - (pr-txt-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; XEmacs - (defun pr-menu-set-utility-title (value &optional item entry index) - (pr-xemacs-global-menubar - (let ((newname (format "%s" value))) - (relabel-menu-item - (list "Printing" "PostScript Print" "File" pr-ps-utility-old) - newname) - (relabel-menu-item - (list "Printing" "PostScript Preview" "File" pr-ps-utility-old) - newname) - (setq pr-ps-utility-old newname))) - (pr-ps-set-utility value) - (and index - (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) - - ;; XEmacs - (defun pr-even-or-odd-pages (value &optional no-lock) - (pr-relabel-menu-item (cdr (assq value pr-even-or-odd-alist)) - 'pr-even-or-odd-old) - (setq ps-even-or-odd-pages value) - (or no-lock - (pr-menu-lock 'postscript-options 8 12 'toggle nil))) - - ) (t ; GNU Emacs - ;; Do nothing - )) ; end cond featurep - - - -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; GNU Emacs Definitions - - -(cond - ((featurep 'xemacs) ; XEmacs - ;; Do nothing - ) - (t ; GNU Emacs - ;; GNU Emacs + (defvar deactivate-mark nil) (defalias 'pr-f-set-keymap-parents 'set-keymap-parent) (defalias 'pr-f-set-keymap-name 'ignore) (defalias 'pr-f-read-string 'read-string) - - ;; GNU Emacs - (defvar deactivate-mark) - - ;; GNU Emacs (defun pr-keep-region-active () - (setq deactivate-mark nil)) - - ;; GNU Emacs - (defun pr-region-active-p () - (and pr-auto-region transient-mark-mode mark-active)) - - ;; GNU Emacs - (defun pr-menu-char-height () - (frame-char-height)) - - ;; GNU Emacs - (defun pr-menu-char-width () - (frame-char-width)) - - ;; GNU Emacs - ;; Menu binding - ;; Replace existing "print" item by "Printing" item. - ;; If you're changing this file, you'll load it a second, - ;; third... time, but "print" item exists only in the first load. - (eval-and-compile - (cond - ;; GNU Emacs 20 - ((< emacs-major-version 21) - (defun pr-global-menubar (pr-menu-spec) - (require 'easymenu) - (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) - (when pr-menu-print-item - (easy-menu-remove-item nil '("tools") pr-menu-print-item) - (setq pr-menu-print-item nil - pr-menu-bar (vector 'menu-bar 'tools - (pr-get-symbol "Printing"))))) - ) - ;; GNU Emacs 21 & 22 - (t - (defun pr-global-menubar (pr-menu-spec) - (require 'easymenu) - (let ((menu-file (if (= emacs-major-version 21) - '("menu-bar" "files") ; GNU Emacs 21 - '("menu-bar" "file")))) ; GNU Emacs 22 or higher - (cond - (pr-menu-print-item - (easy-menu-add-item global-map menu-file - (easy-menu-create-menu "Print" pr-menu-spec) - "print-buffer") - (dolist (item '("print-buffer" "print-region" - "ps-print-buffer-faces" "ps-print-region-faces" - "ps-print-buffer" "ps-print-region")) - (easy-menu-remove-item global-map menu-file item)) - (setq pr-menu-print-item nil - pr-menu-bar (vector 'menu-bar - (pr-get-symbol (nth 1 menu-file)) - (pr-get-symbol "Print")))) - (t - (easy-menu-add-item global-map menu-file - (easy-menu-create-menu "Print" pr-menu-spec))) - ))) - ))) - - (eval-and-compile - (cond - (ps-windows-system - ;; GNU Emacs for Windows 9x/NT - (defun pr-menu-position (entry index horizontal) - (let ((pos (cdr (mouse-pixel-position)))) - (list - (list (or (car pos) 0) ; X - (- (or (cdr pos) 0) ; Y - (* (pr-menu-index entry index) pr-menu-char-height))) - (selected-frame)))) ; frame - ) - (t - ;; GNU Emacs - (defun pr-menu-position (entry index horizontal) - (let ((pos (cdr (mouse-pixel-position)))) - (list - (list (- (or (car pos) 0) ; X - (* horizontal pr-menu-char-width)) - (- (or (cdr pos) 0) ; Y - (* (pr-menu-index entry index) pr-menu-char-height))) - (selected-frame)))) ; frame - ))) - - (defvar pr-menu-position nil) - (defvar pr-menu-state nil) - - ;; GNU Emacs - (defun pr-menu-lookup (path) - (lookup-key global-map - (if path - (vconcat pr-menu-bar - (mapcar 'pr-get-symbol - (if (listp path) - path - (list path)))) - pr-menu-bar))) - - ;; GNU Emacs - (defun pr-menu-lock (entry index horizontal state path) - (when pr-menu-lock - (or (and pr-menu-position (eq state pr-menu-state)) - (setq pr-menu-position (pr-menu-position entry index horizontal) - pr-menu-state state)) - (let* ((menu (pr-menu-lookup path)) - (result (x-popup-menu pr-menu-position menu))) - (and result - (let ((command (lookup-key menu (vconcat result)))) - (if (fboundp command) - (funcall command) - (eval command))))) - (setq pr-menu-position nil))) - - ;; GNU Emacs - (defalias 'pr-update-mode-line 'force-mode-line-update) - - ;; GNU Emacs - (defun pr-do-update-menus (&optional force) - (pr-menu-alist pr-ps-printer-alist - 'pr-ps-name - 'pr-menu-set-ps-title - "PostScript Printers" - 'pr-ps-printer-menu-modified - force - "PostScript Printers" - 'postscript 2) - (pr-menu-alist pr-txt-printer-alist - 'pr-txt-name - 'pr-menu-set-txt-title - "Text Printers" - 'pr-txt-printer-menu-modified - force - "Text Printers" - 'text 2) - (let ((save-var pr-ps-utility-menu-modified)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("PostScript Print" "File" "PostScript Utility") - 'save-var - force - "PostScript Utility" - nil 1)) - (pr-menu-alist pr-ps-utility-alist - 'pr-ps-utility - 'pr-menu-set-utility-title - '("PostScript Preview" "File" "PostScript Utility") - 'pr-ps-utility-menu-modified - force - "PostScript Utility" - nil 1) - (pr-even-or-odd-pages ps-even-or-odd-pages force)) - - ;; GNU Emacs - (defun pr-menu-get-item (name-list) - ;; NAME-LIST is a string or a list of strings. - (or (listp name-list) - (setq name-list (list name-list))) - (and name-list - (let* ((reversed (reverse name-list)) - (name (pr-get-symbol (car reversed))) - (path (nreverse (cdr reversed))) - (menu (lookup-key - global-map - (vconcat pr-menu-bar - (mapcar 'pr-get-symbol path))))) - (assq name (nthcdr 2 menu))))) - - ;; GNU Emacs - (defvar pr-temp-menu nil) - - ;; GNU Emacs - (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name - entry index) - (when (and alist (or force (symbol-value modified-sym))) - (easy-menu-define pr-temp-menu nil "" - (pr-menu-create name alist var-sym fun entry index)) - (let ((item (pr-menu-get-item menu-path))) - (and item - (let* ((binding (nthcdr 3 item)) - (key-binding (cdr binding))) - (setcar binding pr-temp-menu) - (and key-binding (listp (car key-binding)) - (setcdr binding (cdr key-binding))) ; skip KEY-BINDING - (funcall fun (symbol-value var-sym) item)))) - (set modified-sym nil))) - - ;; GNU Emacs - (defun pr-menu-set-item-name (item name) - (and item - (setcar (nthcdr 2 item) name))) ; ITEM-NAME - - ;; GNU Emacs - (defun pr-menu-set-ps-title (value &optional item entry index) - (pr-menu-set-item-name (or item - (pr-menu-get-item "PostScript Printers")) - (format "PostScript Printer: %s" value)) - (pr-ps-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; GNU Emacs - (defun pr-menu-set-txt-title (value &optional item entry index) - (pr-menu-set-item-name (or item - (pr-menu-get-item "Text Printers")) - (format "Text Printer: %s" value)) - (pr-txt-set-printer value) - (and index - (pr-menu-lock entry index 12 'toggle nil))) - - ;; GNU Emacs - (defun pr-menu-set-utility-title (value &optional item entry index) - (let ((name (symbol-name value))) - (if item - (pr-menu-set-item-name item name) - (pr-menu-set-item-name - (pr-menu-get-item - '("PostScript Print" "File" "PostScript Utility")) - name) - (pr-menu-set-item-name - (pr-menu-get-item - '("PostScript Preview" "File" "PostScript Utility")) - name))) - (pr-ps-set-utility value) - (and index - (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) - - ;; GNU Emacs - (defun pr-even-or-odd-pages (value &optional no-lock) - (pr-menu-set-item-name (pr-menu-get-item "Print All Pages") - (cdr (assq value pr-even-or-odd-alist))) - (setq ps-even-or-odd-pages value) - (or no-lock - (pr-menu-lock 'postscript-options 8 12 'toggle nil))) - - )) ; end cond featurep + (setq deactivate-mark nil)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2003,7 +1592,7 @@ DEFAULT It's a way to set default values when this entry is selected. (VARIABLE . VALUE) - Which associates VARIABLE with VALUE. When this entry is + That associates VARIABLE with VALUE. when this entry is selected, it's executed the following command: (set VARIABLE (eval VALUE)) @@ -2558,7 +2147,7 @@ DEFAULT It's a way to set default values when this entry is selected. (VARIABLE-SYM . VALUE) - Which associates VARIABLE-SYM with VALUE. When this entry is + That associates VARIABLE-SYM with VALUE. when this entry is selected, it's executed the following command: (set (make-local-variable VARIABLE-SYM) (eval VALUE)) @@ -2738,7 +2327,7 @@ DEFAULT It's a way to set default values when this entry is selected. (VARIABLE . VALUE) - Which associates VARIABLE with VALUE. When this entry is + That associates VARIABLE with VALUE. when this entry is selected, it's executed the following command: (set VARIABLE (eval VALUE)) @@ -2863,7 +2452,11 @@ See also `pr-menu-char-height' and `pr-menu-char-width'." :group 'printing) -(defcustom pr-menu-char-height (pr-menu-char-height) +(defcustom pr-menu-char-height + (cond ((featurep 'xemacs) ; XEmacs + (pr-x-font-height (face-font 'default))) + (t ; GNU Emacs + (pr-e-frame-char-height))) "*Specify menu char height in pixels. This variable is used to guess which vertical position should be locked the @@ -2875,7 +2468,11 @@ See also `pr-menu-lock' and `pr-menu-char-width'." :group 'printing) -(defcustom pr-menu-char-width (pr-menu-char-width) +(defcustom pr-menu-char-width + (cond ((featurep 'xemacs) ; XEmacs + (pr-x-font-width (face-font 'default))) + (t ; GNU Emacs + (pr-e-frame-char-width))) "*Specify menu char width in pixels. This variable is used to guess which horizontal position should be locked the @@ -2947,7 +2544,7 @@ SETTING It's a cons like: (VARIABLE . VALUE) - Which associates VARIABLE with VALUE. When this entry is + That associates VARIABLE with VALUE. when this entry is selected, it's executed the following command: * If LOCAL is non-nil: @@ -3175,6 +2772,15 @@ See `pr-ps-printer-alist'.") ;; Keys & Menus +(defmacro pr-xemacs-global-menubar (&rest body) + `(save-excursion + (let ((temp (get-buffer-create (make-temp-name " *Temp")))) + ;; be sure to access global menubar + (set-buffer temp) + ,@body + (kill-buffer temp)))) + + (defsubst pr-visible-p (key) (memq key pr-visible-entry-list)) @@ -3196,6 +2802,16 @@ See `pr-ps-printer-alist'.") 'easy-menu-intern (lambda (s) (if (stringp s) (intern s) s)))) +(cond + ((featurep 'xemacs) ; XEmacs + (defvar zmacs-region-stays nil) ; to avoid compilation gripes + (defun pr-region-active-p () + (and pr-auto-region (not zmacs-region-stays) (ps-mark-active-p)))) + + (t ; GNU Emacs + (defun pr-region-active-p () + (and pr-auto-region transient-mark-mode mark-active)))) + (defconst pr-menu-spec ;; Menu mapping: @@ -3454,7 +3070,51 @@ menu. Calls `pr-update-menus' to adjust menus." (interactive) - (pr-global-menubar pr-menu-spec) + (cond + ((featurep 'xemacs) ; XEmacs + ;; Menu binding + (pr-xemacs-global-menubar + (pr-x-add-submenu nil (cons "Printing" pr-menu-spec) "Apps")) + (setq pr-menu-print-item nil)) + + + (t ; GNU Emacs + ;; Menu binding + (require 'easymenu) + ;; Replace existing "print" item by "Printing" item. + ;; If you're changing this file, you'll load it a second, + ;; third... time, but "print" item exists only in the first load. + (cond + ;; Emacs 20 + ((< emacs-major-version 21) + (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) + (when pr-menu-print-item + (easy-menu-remove-item nil '("tools") pr-menu-print-item) + (setq pr-menu-print-item nil + pr-menu-bar (vector 'menu-bar 'tools + (pr-get-symbol "Printing"))))) + ;; Emacs 21 & 22 + (t + (let ((menu-file (if (= emacs-major-version 21) + '("menu-bar" "files") ; Emacs 21 + '("menu-bar" "file")))) ; Emacs 22 or higher + (cond + (pr-menu-print-item + (easy-menu-add-item global-map menu-file + (easy-menu-create-menu "Print" pr-menu-spec) + "print-buffer") + (dolist (item '("print-buffer" "print-region" + "ps-print-buffer-faces" "ps-print-region-faces" + "ps-print-buffer" "ps-print-region")) + (easy-menu-remove-item global-map menu-file item)) + (setq pr-menu-print-item nil + pr-menu-bar (vector 'menu-bar + (pr-get-symbol (nth 1 menu-file)) + (pr-get-symbol "Print")))) + (t + (easy-menu-add-item global-map menu-file + (easy-menu-create-menu "Print" pr-menu-spec))) + )))))) (pr-update-menus t)) @@ -5181,6 +4841,94 @@ See `pr-visible-entry-alist'.") (+ index 2)) +(defvar pr-menu-position nil) +(defvar pr-menu-state nil) + + +(cond + ((featurep 'xemacs) + ;; XEmacs + (defvar current-mouse-event nil) ; to avoid compilation gripes + (defun pr-menu-position (entry index horizontal) + (pr-x-make-event + 'button-release + (list 'button 1 + 'x (- (pr-x-event-x-pixel current-mouse-event) ; X + (* horizontal pr-menu-char-width)) + 'y (- (pr-x-event-y-pixel current-mouse-event) ; Y + (* (pr-menu-index entry index) pr-menu-char-height))))) + ) + (ps-windows-system + ;; GNU Emacs for Windows 9x/NT + (defun pr-menu-position (entry index horizontal) + (let ((pos (cdr (pr-e-mouse-pixel-position)))) + (list + (list (or (car pos) 0) ; X + (- (or (cdr pos) 0) ; Y + (* (pr-menu-index entry index) pr-menu-char-height))) + (selected-frame)))) ; frame + ) + (t + ;; GNU Emacs + (defun pr-menu-position (entry index horizontal) + (let ((pos (cdr (pr-e-mouse-pixel-position)))) + (list + (list (- (or (car pos) 0) ; X + (* horizontal pr-menu-char-width)) + (- (or (cdr pos) 0) ; Y + (* (pr-menu-index entry index) pr-menu-char-height))) + (selected-frame)))) ; frame + )) + +(cond + ((featurep 'xemacs) + ;; XEmacs + (defvar current-menubar nil) ; to avoid compilation gripes + (defun pr-menu-lookup (path) + (car (pr-x-find-menu-item current-menubar (cons "Printing" path)))) + + ;; XEmacs + (defun pr-menu-lock (entry index horizontal state path) + (when pr-menu-lock + (or (and pr-menu-position (eq state pr-menu-state)) + (setq pr-menu-position (pr-menu-position entry index horizontal) + pr-menu-state state)) + (let* ((menu (pr-menu-lookup path)) + (result (pr-x-get-popup-menu-response menu pr-menu-position))) + (and (pr-x-misc-user-event-p result) + (funcall (pr-x-event-function result) + (pr-x-event-object result)))) + (setq pr-menu-position nil)))) + + + (t + ;; GNU Emacs + (defun pr-menu-lookup (path) + (lookup-key global-map + (if path + (vconcat pr-menu-bar + (mapcar 'pr-get-symbol + (if (listp path) + path + (list path)))) + pr-menu-bar))) + + ;; GNU Emacs + (defun pr-menu-lock (entry index horizontal state path) + (when pr-menu-lock + (or (and pr-menu-position (eq state pr-menu-state)) + (setq pr-menu-position (pr-menu-position entry index horizontal) + pr-menu-state state)) + (let* ((menu (pr-menu-lookup path)) + (result (x-popup-menu pr-menu-position menu))) + (and result + (let ((command (lookup-key menu (vconcat result)))) + (if (fboundp command) + (funcall command) + (eval command))))) + (setq pr-menu-position nil))))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Printer & Utility Selection @@ -5243,6 +4991,237 @@ If menu binding was not done, calls `pr-menu-bind'." alist))) +(cond + ((featurep 'xemacs) + ;; XEmacs + (defalias 'pr-update-mode-line 'set-menubar-dirty-flag) + + ;; XEmacs + (defvar pr-ps-name-old "PostScript Printers") + (defvar pr-txt-name-old "Text Printers") + (defvar pr-ps-utility-old "PostScript Utility") + (defvar pr-even-or-odd-old "Print All Pages") + + ;; XEmacs + (defun pr-do-update-menus (&optional force) + (pr-menu-alist pr-ps-printer-alist + 'pr-ps-name + 'pr-menu-set-ps-title + '("Printing") + 'pr-ps-printer-menu-modified + force + pr-ps-name-old + 'postscript 2) + (pr-menu-alist pr-txt-printer-alist + 'pr-txt-name + 'pr-menu-set-txt-title + '("Printing") + 'pr-txt-printer-menu-modified + force + pr-txt-name-old + 'text 2) + (let ((save-var pr-ps-utility-menu-modified)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("Printing" "PostScript Print" "File") + 'save-var + force + pr-ps-utility-old + nil 1)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("Printing" "PostScript Preview" "File") + 'pr-ps-utility-menu-modified + force + pr-ps-utility-old + nil 1) + (pr-even-or-odd-pages ps-even-or-odd-pages force)) + + ;; XEmacs + (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name + entry index) + (when (and alist (or force (symbol-value modified-sym))) + (pr-xemacs-global-menubar + (pr-x-add-submenu menu-path + (pr-menu-create name alist var-sym + fun entry index))) + (funcall fun (symbol-value var-sym)) + (set modified-sym nil))) + + ;; XEmacs + (defun pr-relabel-menu-item (newname var-sym) + (pr-xemacs-global-menubar + (pr-x-relabel-menu-item + (list "Printing" (symbol-value var-sym)) + newname) + (set var-sym newname))) + + ;; XEmacs + (defun pr-menu-set-ps-title (value &optional item entry index) + (pr-relabel-menu-item (format "PostScript Printer: %s" value) + 'pr-ps-name-old) + (pr-ps-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; XEmacs + (defun pr-menu-set-txt-title (value &optional item entry index) + (pr-relabel-menu-item (format "Text Printer: %s" value) + 'pr-txt-name-old) + (pr-txt-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; XEmacs + (defun pr-menu-set-utility-title (value &optional item entry index) + (pr-xemacs-global-menubar + (let ((newname (format "%s" value))) + (pr-x-relabel-menu-item + (list "Printing" "PostScript Print" "File" pr-ps-utility-old) + newname) + (pr-x-relabel-menu-item + (list "Printing" "PostScript Preview" "File" pr-ps-utility-old) + newname) + (setq pr-ps-utility-old newname))) + (pr-ps-set-utility value) + (and index + (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) + + ;; XEmacs + (defun pr-even-or-odd-pages (value &optional no-lock) + (pr-relabel-menu-item (cdr (assq value pr-even-or-odd-alist)) + 'pr-even-or-odd-old) + (setq ps-even-or-odd-pages value) + (or no-lock + (pr-menu-lock 'postscript-options 8 12 'toggle nil)))) + + + (t + ;; GNU Emacs + (defalias 'pr-update-mode-line 'force-mode-line-update) + + ;; GNU Emacs + (defun pr-do-update-menus (&optional force) + (pr-menu-alist pr-ps-printer-alist + 'pr-ps-name + 'pr-menu-set-ps-title + "PostScript Printers" + 'pr-ps-printer-menu-modified + force + "PostScript Printers" + 'postscript 2) + (pr-menu-alist pr-txt-printer-alist + 'pr-txt-name + 'pr-menu-set-txt-title + "Text Printers" + 'pr-txt-printer-menu-modified + force + "Text Printers" + 'text 2) + (let ((save-var pr-ps-utility-menu-modified)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("PostScript Print" "File" "PostScript Utility") + 'save-var + force + "PostScript Utility" + nil 1)) + (pr-menu-alist pr-ps-utility-alist + 'pr-ps-utility + 'pr-menu-set-utility-title + '("PostScript Preview" "File" "PostScript Utility") + 'pr-ps-utility-menu-modified + force + "PostScript Utility" + nil 1) + (pr-even-or-odd-pages ps-even-or-odd-pages force)) + + ;; GNU Emacs + (defun pr-menu-get-item (name-list) + ;; NAME-LIST is a string or a list of strings. + (or (listp name-list) + (setq name-list (list name-list))) + (and name-list + (let* ((reversed (reverse name-list)) + (name (pr-get-symbol (car reversed))) + (path (nreverse (cdr reversed))) + (menu (lookup-key + global-map + (vconcat pr-menu-bar + (mapcar 'pr-get-symbol path))))) + (assq name (nthcdr 2 menu))))) + + ;; GNU Emacs + (defvar pr-temp-menu nil) + + ;; GNU Emacs + (defun pr-menu-alist (alist var-sym fun menu-path modified-sym force name + entry index) + (when (and alist (or force (symbol-value modified-sym))) + (easy-menu-define pr-temp-menu nil "" + (pr-menu-create name alist var-sym fun entry index)) + (let ((item (pr-menu-get-item menu-path))) + (and item + (let* ((binding (nthcdr 3 item)) + (key-binding (cdr binding))) + (setcar binding pr-temp-menu) + (and key-binding (listp (car key-binding)) + (setcdr binding (cdr key-binding))) ; skip KEY-BINDING + (funcall fun (symbol-value var-sym) item)))) + (set modified-sym nil))) + + ;; GNU Emacs + (defun pr-menu-set-item-name (item name) + (and item + (setcar (nthcdr 2 item) name))) ; ITEM-NAME + + ;; GNU Emacs + (defun pr-menu-set-ps-title (value &optional item entry index) + (pr-menu-set-item-name (or item + (pr-menu-get-item "PostScript Printers")) + (format "PostScript Printer: %s" value)) + (pr-ps-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; GNU Emacs + (defun pr-menu-set-txt-title (value &optional item entry index) + (pr-menu-set-item-name (or item + (pr-menu-get-item "Text Printers")) + (format "Text Printer: %s" value)) + (pr-txt-set-printer value) + (and index + (pr-menu-lock entry index 12 'toggle nil))) + + ;; GNU Emacs + (defun pr-menu-set-utility-title (value &optional item entry index) + (let ((name (symbol-name value))) + (if item + (pr-menu-set-item-name item name) + (pr-menu-set-item-name + (pr-menu-get-item + '("PostScript Print" "File" "PostScript Utility")) + name) + (pr-menu-set-item-name + (pr-menu-get-item + '("PostScript Preview" "File" "PostScript Utility")) + name))) + (pr-ps-set-utility value) + (and index + (pr-menu-lock entry index 5 nil '("PostScript Print" "File")))) + + ;; GNU Emacs + (defun pr-even-or-odd-pages (value &optional no-lock) + (pr-menu-set-item-name (pr-menu-get-item "Print All Pages") + (cdr (assq value pr-even-or-odd-alist))) + (setq ps-even-or-odd-pages value) + (or no-lock + (pr-menu-lock 'postscript-options 8 12 'toggle nil))))) + + (defun pr-ps-set-utility (value) (let ((item (cdr (assq value pr-ps-utility-alist)))) (or item @@ -6018,10 +5997,9 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." ;; Printing Interface (inspired on ps-print-interface.el) -(eval-when-compile - (require 'cus-edit) - (require 'wid-edit) - (require 'widget)) +(require 'widget) +(require 'wid-edit) +(require 'cus-edit) (defvar pr-i-window-configuration nil) From fcf65e71d5a8664686c4919b9543351501ad488e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 7 Aug 2007 02:19:41 +0000 Subject: [PATCH 025/105] *** empty log message *** --- etc/NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index eff08166324..04b0a4bfc09 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -69,6 +69,11 @@ in to make it use the scrollbars from the system theme. *** VC has some support for Git. +* Lisp Changes in Emacs 22.2. + +** New function `window-full-width-p' returns t if a window is as wide +as its frame. + * Installation Changes in Emacs 22.1 From a460c94c17df42cdb7116453f070ed2093b75c4d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 7 Aug 2007 04:23:50 +0000 Subject: [PATCH 026/105] Remove comments about vc-bzr.el being a modified unofficial version. (vc-bzr-command): Remove redundant setting of process-connection-type. (vc-bzr-admin-checkout-format-file): Add autoload. (vc-bzr-root-dir): Remove in favor of vc-bzr-root. (vc-bzr-root): Switch to implementation of vc-bzr-root-dir. (vc-bzr-registered): Compare dirstate format tag with known good value, abort parsing if match fails. Warn user in docstring. (vc-bzr-workfile-version): Case for different Bzr branch formats. See bzrlib/branch.py in Bzr sources. (vc-bzr-diff): First argument FILES may be a string rather than a list. (vc-bzr-shell-command): Remove in favor of vc-bzr-command-discarding-stderr. (vc-bzr-command-discarding-stderr): New function. --- lisp/ChangeLog | 21 +++++++++++++++++++-- lisp/vc-bzr.el | Bin 23605 -> 23462 bytes 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 323ec1b69c9..ffd803fd1c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2007-08-07 Riccardo Murri + + * vc-bzr.el: Remove comments about vc-bzr.el being a modified + unofficial version. + (vc-bzr-command): Remove redundant setting of process-connection-type. + (vc-bzr-admin-checkout-format-file): Add autoload. + (vc-bzr-root-dir): Remove in favor of vc-bzr-root. + (vc-bzr-root): Switch to implementation of vc-bzr-root-dir. + (vc-bzr-registered): Compare dirstate format tag with known good + value, abort parsing if match fails. Warn user in docstring. + (vc-bzr-workfile-version): Case for different Bzr branch formats. + See bzrlib/branch.py in Bzr sources. + (vc-bzr-diff): First argument FILES may be a string rather than a list. + (vc-bzr-shell-command): Remove in favor of + vc-bzr-command-discarding-stderr. + (vc-bzr-command-discarding-stderr): New function. + 2007-08-06 Riccardo Murri * vc-bzr.el (vc-bzr-registered): Gracefully handle missing "bzr" @@ -20,8 +37,8 @@ `vc-bzr-admin-revhistory' file, but fallback to spawning "bzr revno" if that file doesn't exist. (vc-bzr-responsible-p): Use `vc-bzr-root' instead of - `vc-bzr-root-dir' for speed. - add `vc-bzr-admin-dirname' (not ".bzr"!) to `vc-directory-exclusion-list' + `vc-bzr-root-dir' for speed. Add `vc-bzr-admin-dirname' + (not ".bzr"!) to `vc-directory-exclusion-list' (vc-bzr-shell-command): New function. 2007-08-06 Tom Tromey diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 907bcc5200ce0f434240bac99f03f67bde9e79a1..cfb417519d3d8e966a11ede6c2133e17e4225151 100644 GIT binary patch delta 1440 zcmZ`(OK%%h6xL8$nNcBjo-I_#$s|r@l8kMjFJvK+AR0;lRkRT+q+E~h*h9wmntQJk zl1&ghc7d~CfrJnXHXt4v@er#@Ecyr7vFef)ELn2qj*~W!&cd3xK9BGF&UfyQzc^q0 z>>PfW?K&Ty$qvtcP|Ebk1qc5bS-^W^&oHArCddw_zC3qc z@eY5#AHFw`hGS!THoG;W;YJ0Pg5Wqy@g1^?k!tVM6udq^{nBx8%4i0B=hVo&ICuq!dL9^3WTMG_9^RS% z?a34HaJJfH>nqjuTD^75td zzcEK4SG)&QtxC-%M7TA-gw5)UxKs7YxjjNI+F@Vngq8)rs9wNVX2#wvO2V2|6>bzQ zuYyn0heqw$D}i?`;!$NHEF>BEA@_+vuf_8{gBm5)3kE0Uaq;^J!ts!_Bm?06i77nX zgfo5;WBKCbQ;qP2cb2`OJzTuDIeQCyvJZ{C#XCu1&qi=`MwFlt*k?FCqMloN=xB)O zJ$JO16SBxX{Gr;o7|C9bksj?tN3^xMgSBaMrO=t0m>$}{uVhED9(YBf-C$B0(~TN_ zwlPBk9LaE@RK}mKeshUdIo}c8w_%zfQsLoy#;<)k5}G1bvHx;}T_ z-%U&xR^M8`9W=A+>x<4C1xugx`*evc=Ila38F5WF(y&IpT7F7yr?La3xG-UB5XW2v Yxvcibb|50FZ%^W1ug+$pug{hL1r_DoR{#J2 delta 1765 zcmc&!-D_h-6eqMUyJ5+u-_-8PX?M4|k=$EFeApDxN?VM(ZKN&Y;>%9vPI8CbJ9C|x z+ZYidiXez6&VwI+fFR<62EQJC62UiLd=o(hANF4m&)g*4R(v;H5^iSBZ|3|y&L`g# zzWTQC-s^+?=Fv_aj-F{80zO-?*W7OGHg>k*`JIEqMspvUyRc1;8QhY`tfJwV`mI+~ zz~WkQa}#l+)rUN4BTOh<%vgRI-uB9N-H!4g9CMvgRa zP!6d9RAzAqLK^5W16+WS8G`q?iSFM3T7AHB9@jw2Q5{J@v6vCfMF)~T(1?f*)1X;O z6frFB2jKf~z$qmvltovym6=GYI&6RO_FGf`HwV*>gJEg<&GUmIj6Zlsq!|*@M?wut zQiJ^_47!eD*@jFrg&Y~C2sK;^;BDXrn>HaA8~80Va~h0m-l&s{zqn80^9^+mA|X_Qlc#TP{@# zVDIH`?-yWruM`v(ypXjsF;0W8q%?lW?P_h#K2@F@IP*pfB98JX8li?Qi~;O6ZtVoc z17@9KM2TYlBqP#-XExMo3{SWj9NaZk@$O z2W!}yXQyW#w?8~FYxichzMT8DF!UB)E!ew@=k3q)v%?=3-#KS5EhNo?Q(neY z?DCgcQlISZ5gqxl?AVnXcc(Dk!#{3(aB1<(dG6-9|asOA%9xADRr4%Ry^ z#m*iTOiLVNQ@Qxg9q9WQQi9VB^EUb;m6|*5^NM`Hnuy>m9Qoai*pRo|nEbYqNnX>+ z+&j)?nkmIFZQ-L_VagqdYrze>6PFQ%p%#76{iG#hP9f%^s{^}I{tI Date: Tue, 7 Aug 2007 08:57:06 +0000 Subject: [PATCH 027/105] (main) [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]: Call malloc_enable_thread on interactive startup. --- src/emacs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/emacs.c b/src/emacs.c index f70588634d9..b356faa68ae 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1157,6 +1157,13 @@ main (argc, argv #if defined (USG5) && defined (INTERRUPT_INPUT) setpgrp (); #endif +#endif +#if defined (HAVE_GTK_AND_PTHREAD) && !defined (SYSTEM_MALLOC) && !defined (DOUG_LEA_MALLOC) + { + extern void malloc_enable_thread P_ ((void)); + + malloc_enable_thread (); + } #endif } From 22ffeb19aefac57c089d3d2fa981e5b1fca37790 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Tue, 7 Aug 2007 08:58:22 +0000 Subject: [PATCH 028/105] (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable. [USE_PTHREAD] (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS) (UNLOCK_ALIGNED_BLOCKS): Conditionalize with it. (malloc_atfork_handler_prepare, malloc_atfork_handler_parent) (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]: New functions. --- src/ChangeLog | 13 ++++++++ src/gmalloc.c | 83 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 79 insertions(+), 17 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 71cc5248ebd..ef9dcec6aae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2007-08-07 YAMAMOTO Mitsuharu + + * emacs.c (main) + [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]: + Call malloc_enable_thread on interactive startup. + + * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable. + [USE_PTHREAD] (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS) + (UNLOCK_ALIGNED_BLOCKS): Conditionalize with it. + (malloc_atfork_handler_prepare, malloc_atfork_handler_parent) + (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]: + New functions. + 2007-08-06 Chong Yidong * xdisp.c (redisplay_window): When restoring original buffer diff --git a/src/gmalloc.c b/src/gmalloc.c index 1e8b12c5c7f..7e317eb4cc3 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -136,6 +136,10 @@ extern __ptr_t memalign PP ((__malloc_size_t __alignment, extern __ptr_t valloc PP ((__malloc_size_t __size)); #endif +#ifdef USE_PTHREAD +/* Set up mutexes and make malloc etc. thread-safe. */ +extern void malloc_enable_thread PP ((void)); +#endif #ifdef _MALLOC_INTERNAL @@ -242,10 +246,27 @@ extern void _free_internal_nolock PP ((__ptr_t __ptr)); #ifdef USE_PTHREAD extern pthread_mutex_t _malloc_mutex, _aligned_blocks_mutex; -#define LOCK() pthread_mutex_lock (&_malloc_mutex) -#define UNLOCK() pthread_mutex_unlock (&_malloc_mutex) -#define LOCK_ALIGNED_BLOCKS() pthread_mutex_lock (&_aligned_blocks_mutex) -#define UNLOCK_ALIGNED_BLOCKS() pthread_mutex_unlock (&_aligned_blocks_mutex) +extern int _malloc_thread_enabled_p; +#define LOCK() \ + do { \ + if (_malloc_thread_enabled_p) \ + pthread_mutex_lock (&_malloc_mutex); \ + } while (0) +#define UNLOCK() \ + do { \ + if (_malloc_thread_enabled_p) \ + pthread_mutex_unlock (&_malloc_mutex); \ + } while (0) +#define LOCK_ALIGNED_BLOCKS() \ + do { \ + if (_malloc_thread_enabled_p) \ + pthread_mutex_lock (&_aligned_blocks_mutex); \ + } while (0) +#define UNLOCK_ALIGNED_BLOCKS() \ + do { \ + if (_malloc_thread_enabled_p) \ + pthread_mutex_unlock (&_aligned_blocks_mutex); \ + } while (0) #else #define LOCK() #define UNLOCK() @@ -564,6 +585,47 @@ register_heapinfo () static pthread_once_t malloc_init_once_control = PTHREAD_ONCE_INIT; pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; +int _malloc_thread_enabled_p; + +static void +malloc_atfork_handler_prepare () +{ + LOCK (); + LOCK_ALIGNED_BLOCKS (); +} + +static void +malloc_atfork_handler_parent () +{ + UNLOCK_ALIGNED_BLOCKS (); + UNLOCK (); +} + +static void +malloc_atfork_handler_child () +{ + UNLOCK_ALIGNED_BLOCKS (); + UNLOCK (); +} + +/* Set up mutexes and make malloc etc. thread-safe. */ +void +malloc_enable_thread () +{ + if (_malloc_thread_enabled_p) + return; + + /* Some pthread implementations call malloc for statically + initialized mutexes when they are used first. To avoid such a + situation, we initialize mutexes here while their use is + disabled in malloc etc. */ + pthread_mutex_init (&_malloc_mutex, NULL); + pthread_mutex_init (&_aligned_blocks_mutex, NULL); + pthread_atfork (malloc_atfork_handler_prepare, + malloc_atfork_handler_parent, + malloc_atfork_handler_child); + _malloc_thread_enabled_p = 1; +} #endif static void @@ -576,19 +638,6 @@ malloc_initialize_1 () if (__malloc_initialize_hook) (*__malloc_initialize_hook) (); - /* We don't use recursive mutex because pthread_mutexattr_init may - call malloc internally. */ -#if 0 /* defined (USE_PTHREAD) */ - { - pthread_mutexattr_t attr; - - pthread_mutexattr_init (&attr); - pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init (&_malloc_mutex, &attr); - pthread_mutexattr_destroy (&attr); - } -#endif - heapsize = HEAP / BLOCKSIZE; _heapinfo = (malloc_info *) align (heapsize * sizeof (malloc_info)); if (_heapinfo == NULL) From e490694a089a5afd1002a283c27d53a32d684171 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Tue, 7 Aug 2007 09:02:32 +0000 Subject: [PATCH 029/105] (__morecore): Fix the declaration to comply with the definition. --- src/ChangeLog | 5 +++++ src/gmalloc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ef9dcec6aae..cebb164ecf0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-07 Sam Steingold + + * gmalloc.c (__morecore): Fix the declaration to comply with the + definition. + 2007-08-07 YAMAMOTO Mitsuharu * emacs.c (main) diff --git a/src/gmalloc.c b/src/gmalloc.c index 7e317eb4cc3..b1f8513c5fb 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -402,7 +402,7 @@ Fifth Floor, Boston, MA 02110-1301, USA. extern __ptr_t bss_sbrk PP ((ptrdiff_t __size)); extern int bss_sbrk_did_unexec; #endif -__ptr_t (*__morecore) PP ((ptrdiff_t __size)) = __default_morecore; +__ptr_t (*__morecore) PP ((__malloc_ptrdiff_t __size)) = __default_morecore; /* Debugging hook for `malloc'. */ __ptr_t (*__malloc_hook) PP ((__malloc_size_t __size)); From 31521cb0ffcd54a9de93b0b98469618ca5749c81 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Tue, 7 Aug 2007 09:04:55 +0000 Subject: [PATCH 030/105] (__malloc_initialize): Remove pthread_once. Not needed. --- src/ChangeLog | 4 ++++ src/gmalloc.c | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cebb164ecf0..189585d241a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-08-07 Jan Dj,Ad(Brv + + * gmalloc.c (__malloc_initialize): Remove pthread_once. Not needed. + 2007-08-07 Sam Steingold * gmalloc.c (__morecore): Fix the declaration to comply with the diff --git a/src/gmalloc.c b/src/gmalloc.c index b1f8513c5fb..ea6ccc4bf1f 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -582,7 +582,6 @@ register_heapinfo () } #ifdef USE_PTHREAD -static pthread_once_t malloc_init_once_control = PTHREAD_ONCE_INIT; pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; int _malloc_thread_enabled_p; @@ -656,18 +655,16 @@ malloc_initialize_1 () return; } -/* Set everything up and remember that we have. */ +/* Set everything up and remember that we have. + main will call malloc which calls this function. That is before any threads + or signal handlers has been set up, so we don't need thread protection. */ int __malloc_initialize () { -#ifdef USE_PTHREAD - pthread_once (&malloc_init_once_control, malloc_initialize_1); -#else if (__malloc_initialized) return 0; malloc_initialize_1 (); -#endif return __malloc_initialized; } From 1cc8a86183de289eb920b8eb6274a00b81d17291 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 15:54:16 +0000 Subject: [PATCH 031/105] * xdisp.c (move_it_by_lines): Remove incorrect optimization. --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 189585d241a..89723991c2f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-08-07 Chong Yidong + + * xdisp.c (move_it_by_lines): Remove incorrect optimization. + 2007-08-07 Jan Dj,Ad(Brv * gmalloc.c (__malloc_initialize): Remove pthread_once. Not needed. From a19a62aecb21887cbd910cd10662ad017cd84eb8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 15:54:27 +0000 Subject: [PATCH 032/105] (move_it_by_lines): Remove incorrect optimization. --- src/xdisp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 1dd69e34590..a1c027b895e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7087,18 +7087,22 @@ move_it_by_lines (it, dvpos, need_y_p) { struct position pos; - if (!FRAME_WINDOW_P (it->f)) + /* The commented-out optimization uses vmotion on terminals. This + gives bad results, because elements like it->what, on which + callers such as pos_visible_p rely, aren't updated. */ + /* if (!FRAME_WINDOW_P (it->f)) { struct text_pos textpos; - /* We can use vmotion on frames without proportional fonts. */ pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w); SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos); reseat (it, textpos, 1); it->vpos += pos.vpos; it->current_y += pos.vpos; } - else if (dvpos == 0) + else */ + + if (dvpos == 0) { /* DVPOS == 0 means move to the start of the screen line. */ move_it_vertically_backward (it, 0); From a12eea51fe59dc58eea28c58886dd40881bff853 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 15:56:21 +0000 Subject: [PATCH 033/105] ** davby@ida.liu.se, 6 July: Bug in pos-visible-in-window-p Fixed. --- admin/FOR-RELEASE | 2 -- 1 file changed, 2 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 3a4d64d80a5..bdf940fc9db 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -36,8 +36,6 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. * BUGS -** davby@ida.liu.se, 6 July: Bug in pos-visible-in-window-p - ** dak@gnu.org, 30 May: Redraw problem with overlapping frames ** dksw@eircom.net, 3 Jul: Telnet mode (rsh/ssh) From 559818abde3dbfcb40eb9b45dfe269cc0cd37c6e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:08:26 +0000 Subject: [PATCH 034/105] * longlines.el (longlines-decoded): New variable. (longlines-mode): Avoid encoding or decoding the buffer twice. --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ffd803fd1c6..6bc8c549159 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-07 Chong Yidong + + * longlines.el (longlines-decoded): New variable. + (longlines-mode): Avoid encoding or decoding the buffer twice. + 2007-08-07 Riccardo Murri * vc-bzr.el: Remove comments about vc-bzr.el being a modified From 275e235e8d5f9c0cb54ff716c0b382c5d5adc5e3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:08:39 +0000 Subject: [PATCH 035/105] (longlines-decoded): New variable. (longlines-mode): Avoid encoding or decoding the buffer twice. --- lisp/longlines.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/longlines.el b/lisp/longlines.el index fa73ef7057d..07977910a22 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el @@ -79,11 +79,13 @@ This is used when `longlines-show-hard-newlines' is on." (defvar longlines-wrap-end nil) (defvar longlines-wrap-point nil) (defvar longlines-showing nil) +(defvar longlines-decoded nil) (make-variable-buffer-local 'longlines-wrap-beg) (make-variable-buffer-local 'longlines-wrap-end) (make-variable-buffer-local 'longlines-wrap-point) (make-variable-buffer-local 'longlines-showing) +(make-variable-buffer-local 'longlines-decoded) ;; Mode @@ -128,7 +130,9 @@ are indicated with a symbol." ;; longlines-wrap-lines that we'll never encounter from here (save-restriction (widen) - (longlines-decode-buffer) + (unless longlines-decoded + (longlines-decode-buffer) + (setq longlines-decoded t)) (longlines-wrap-region (point-min) (point-max))) (set-buffer-modified-p mod)) (when (and longlines-show-hard-newlines @@ -161,9 +165,11 @@ are indicated with a symbol." (let ((buffer-undo-list t) (after-change-functions nil) (inhibit-read-only t)) - (save-restriction - (widen) - (longlines-encode-region (point-min) (point-max)))) + (if longlines-decoded + (save-restriction + (widen) + (longlines-encode-region (point-min) (point-max)) + (setq longlines-decoded nil)))) (remove-hook 'change-major-mode-hook 'longlines-mode-off t) (remove-hook 'after-change-functions 'longlines-after-change-function t) (remove-hook 'post-command-hook 'longlines-post-command-function t) From 3d91c31d454894c172c42bf0f8726c85c5f299fd Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:32:21 +0000 Subject: [PATCH 036/105] * dispextern.h (struct image): New members. * image.c: Sync to trunk version. (search_image_cache, uncache_image, image-refresh): New functions. Check for fg and bg colors. (lookup_image): Use search_image_cache. Cache fg and bg colors. (pbm_load): Another check for invalid image data. (png_load): Ignore default background field. --- src/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 89723991c2f..06bcbaf3a05 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2007-08-07 Chong Yidong + * dispextern.h (struct image): New members. + + * image.c: Sync to trunk version. + (search_image_cache, uncache_image, image-refresh): New functions. + Check for fg and bg colors. + (lookup_image): Use search_image_cache. Cache fg and bg colors. + (pbm_load): Another check for invalid image data. + (png_load): Ignore default background field. + * xdisp.c (move_it_by_lines): Remove incorrect optimization. 2007-08-07 Jan Dj,Ad(Brv From 6facdb9be286bdedf62adcbb03e07829909420d1 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:32:33 +0000 Subject: [PATCH 037/105] (struct image): New members. --- src/dispextern.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dispextern.h b/src/dispextern.h index 4a7a790ad7e..4cd9c42cc0f 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2431,6 +2431,10 @@ struct image if necessary. */ unsigned long background; + /* Foreground and background colors of the frame on which the image + is created. */ + unsigned long frame_foreground, frame_background; + /* True if this image has a `transparent' background -- that is, is uses an image mask. The accessor macro for this is `IMAGE_BACKGROUND_TRANSPARENT'. */ From d725448fabf0a6936b918a390c7b539bd1d93523 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:32:49 +0000 Subject: [PATCH 038/105] Sync to trunk version. (search_image_cache, uncache_image, image-refresh): New functions. Check for fg and bg colors. (lookup_image): Use search_image_cache. Cache fg and bg colors. (pbm_load): Another check for invalid image data. (png_load): Ignore default background field. --- src/image.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 100 insertions(+), 11 deletions(-) diff --git a/src/image.c b/src/image.c index 69e1a7d33bd..a3cd3195217 100644 --- a/src/image.c +++ b/src/image.c @@ -1609,6 +1609,7 @@ x_alloc_image_color (f, img, color_name, dflt) Image Cache ***********************************************************************/ +static struct image *search_image_cache P_ ((struct frame *, Lisp_Object, unsigned)); static void cache_image P_ ((struct frame *f, struct image *img)); static void postprocess_image P_ ((struct frame *, struct image *)); @@ -1631,6 +1632,55 @@ make_image_cache () } +/* Find an image matching SPEC in the cache, and return it. If no + image is found, return NULL. */ +static struct image * +search_image_cache (f, spec, hash) + struct frame *f; + Lisp_Object spec; + unsigned hash; +{ + struct image *img; + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + int i = hash % IMAGE_CACHE_BUCKETS_SIZE; + + if (!c) return NULL; + + /* If the image spec does not specify a background color, the cached + image must have the same background color as the current frame. + The foreground color must also match, for the sake of monochrome + images. + + In fact, we could ignore the foreground color matching condition + for color images, or if the image spec specifies :foreground; + similarly we could ignore the background color matching condition + for formats that don't use transparency (such as jpeg), or if the + image spec specifies :background. However, the extra memory + usage is probably negligible in practice, so we don't bother. */ + + for (img = c->buckets[i]; img; img = img->next) + if (img->hash == hash + && !NILP (Fequal (img->spec, spec)) + && img->frame_foreground == FRAME_FOREGROUND_PIXEL (f) + && img->frame_background == FRAME_BACKGROUND_PIXEL (f)) + break; + return img; +} + + +/* Search frame F for an image with spec SPEC, and free it. */ + +static void +uncache_image (f, spec) + struct frame *f; + Lisp_Object spec; +{ + struct image *img = search_image_cache (f, spec, sxhash (spec, 0)); + if (img) + free_image (f, img); +} + + /* Free image cache of frame F. Be aware that X frames share images caches. */ @@ -1741,6 +1791,36 @@ FRAME t means clear the image caches of all frames. */) } +DEFUN ("image-refresh", Fimage_refresh, Simage_refresh, + 1, 2, 0, + doc: /* Refresh the image with specification SPEC on frame FRAME. +If SPEC specifies an image file, the displayed image is updated with +the current contents of that file. +FRAME nil or omitted means use the selected frame. +FRAME t means refresh the image on all frames. */) + (spec, frame) + Lisp_Object spec, frame; +{ + if (!valid_image_p (spec)) + error ("Invalid image specification"); + + if (EQ (frame, Qt)) + { + Lisp_Object tail; + FOR_EACH_FRAME (tail, frame) + { + struct frame *f = XFRAME (frame); + if (FRAME_WINDOW_P (f)) + uncache_image (f, spec); + } + } + else + uncache_image (check_x_frame (frame), spec); + + return Qnil; +} + + /* Compute masks and transform image IMG on frame F, as specified by the image's specification, */ @@ -1824,9 +1904,7 @@ lookup_image (f, spec) struct frame *f; Lisp_Object spec; { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); struct image *img; - int i; unsigned hash; struct gcpro gcpro1; EMACS_TIME now; @@ -1840,12 +1918,7 @@ lookup_image (f, spec) /* Look up SPEC in the hash table of the image cache. */ hash = sxhash (spec, 0); - i = hash % IMAGE_CACHE_BUCKETS_SIZE; - - for (img = c->buckets[i]; img; img = img->next) - if (img->hash == hash && !NILP (Fequal (img->spec, spec))) - break; - + img = search_image_cache (f, spec, hash); if (img && img->load_failed_p) { free_image (f, img); @@ -1861,6 +1934,8 @@ lookup_image (f, spec) img = make_image (spec, hash); cache_image (f, img); img->load_failed_p = img->type->load (f, img) == 0; + img->frame_foreground = FRAME_FOREGROUND_PIXEL (f); + img->frame_background = FRAME_BACKGROUND_PIXEL (f); /* If we can't load the image, and we don't have a width and height, use some arbitrary width and height so that we can @@ -5727,7 +5802,17 @@ pbm_load (f, img) if (raw_p) { if ((x & 7) == 0) - c = *p++; + { + if (p >= end) + { + x_destroy_x_image (ximg); + x_clear_image (f, img); + image_error ("Invalid image size in image `%s'", + img->spec, Qnil); + goto error; + } + c = *p++; + } g = c & 0x80; c <<= 1; } @@ -6273,11 +6358,14 @@ png_load (f, img) PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); } } + /* The commented-out code checked if the png specifies a default + background color, and uses that. Since we use the current + frame background, it is OK for us to ignore this. + else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) - /* Image contains a background color with which to - combine the image. */ fn_png_set_background (png_ptr, image_bg, PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + */ else { /* Image does not contain a background color with which @@ -8647,6 +8735,7 @@ non-numeric, there is no explicit limit on the size of images. */); defsubr (&Sinit_image_library); defsubr (&Sclear_image_cache); + defsubr (&Simage_refresh); defsubr (&Simage_size); defsubr (&Simage_mask_p); defsubr (&Simage_extension_data); From b13e2d29e935a182b84c0975125c13ff0a820018 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:40:18 +0000 Subject: [PATCH 039/105] * image-mode.el (image-toggle-display): Use image-refresh. --- lisp/ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6bc8c549159..147d95e2c54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2007-08-07 Chong Yidong + * image-mode.el (image-toggle-display): Use image-refresh. + * longlines.el (longlines-decoded): New variable. (longlines-mode): Avoid encoding or decoding the buffer twice. From 403ac098e10513ff73d56c89b694c969ca75742d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:40:29 +0000 Subject: [PATCH 040/105] (image-toggle-display): Use image-refresh. --- lisp/image-mode.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index deacf38c48d..7604d2911e2 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -295,16 +295,17 @@ and showing the image as an image." (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 ;; was inserted - (let* ((image - (if (and (buffer-file-name) - (not (file-remote-p (buffer-file-name))) + (let* ((filename (buffer-file-name)) + (image + (if (and filename + (file-readable-p filename) + (not (file-remote-p filename)) (not (buffer-modified-p)) (not (and (boundp 'archive-superior-buffer) archive-superior-buffer)) (not (and (boundp 'tar-superior-buffer) tar-superior-buffer))) - (progn (clear-image-cache) - (create-image (buffer-file-name))) + (create-image filename) (create-image (string-make-unibyte (buffer-substring-no-properties (point-min) (point-max))) @@ -313,13 +314,11 @@ and showing the image as an image." `(display ,image intangible ,image rear-nonsticky (display intangible) - ;; This a cheap attempt to make the whole buffer - ;; read-only when we're visiting the file (as - ;; opposed to just inserting it). read-only t front-sticky (read-only))) (inhibit-read-only t) (buffer-undo-list t) (modified (buffer-modified-p))) + (image-refresh image) (add-text-properties (point-min) (point-max) props) (set-buffer-modified-p modified) ;; Inhibit the cursor when the buffer contains only an image, From bbf4f0cd010ea9821232b8181f6c99bd38a9b98b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:41:36 +0000 Subject: [PATCH 041/105] New function image-refresh. --- etc/NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 04b0a4bfc09..f1a2ad28ca8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -74,6 +74,9 @@ in to make it use the scrollbars from the system theme. ** New function `window-full-width-p' returns t if a window is as wide as its frame. +** The new function `image-refresh' refreshes all images associated +with a given image specification. + * Installation Changes in Emacs 22.1 From a607dc929835238c661b7f644e5fc168697fec9b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:43:06 +0000 Subject: [PATCH 042/105] * display.texi (Image Cache): Document image-refresh. --- lispref/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 2e5949a42f0..fb17345e273 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2007-08-07 Chong Yidong + + * display.texi (Image Cache): Document image-refresh. + 2007-08-06 Martin Rudalics * windows.texi (Size of Window): Document window-full-width-p. From 108af9594b066dac13b7d449e4597d8f529e110e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:43:16 +0000 Subject: [PATCH 043/105] (Image Cache): Document image-refresh. --- lispref/display.texi | 48 +++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/lispref/display.texi b/lispref/display.texi index cd46a0e72ba..9c3d9d35be7 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -4281,13 +4281,43 @@ cache, it can always be displayed, even if the value of @subsection Image Cache @cindex image cache - Emacs stores images in an image cache when it displays them, so it can -display them again more efficiently. It removes an image from the cache -when it hasn't been displayed for a specified period of time. + Emacs stores images in an image cache so that it can display them +again more efficiently. When Emacs displays an image, it searches the +image cache for an existing image specification @code{equal} to the +desired specification. If a match is found, the image is displayed +from the cache; otherwise, Emacs loads the image normally. -When an image is looked up in the cache, its specification is compared -with cached image specifications using @code{equal}. This means that -all images with equal specifications share the same image in the cache. + Occasionally, you may need to tell Emacs to refresh the images +associated with a given image specification. For example, suppose you +display an image using a specification that contains a @code{:file} +property. The image is loaded from the given file and stored in the +image cache. If you later display the image again, using the same +image specification, the image is displayed from the image cache. +Normally, this is not a problem. However, if the image file has +changed in the meantime, Emacs would be displaying the old version of +the image. In such a situation, it is necessary to ``refresh'' the +image using @code{image-refresh}. + +@defun image-refresh spec &optional frame +This function refreshes any images having image specifications +@code{equal} to @var{spec} on frame @var{frame}. If @var{frame} is +@code{nil}, the selected frame is used. If @var{frame} is @code{t}, +the refresh is applied to all existing frames. + +This works by removing all image with image specifications matching +@var{spec} from the image cache. Thus, the next time the image is +displayed, Emacs will load the image again. +@end defun + +@defun clear-image-cache &optional frame +This function clears the entire image cache. If @var{frame} is +non-@code{nil}, only the cache for that frame is cleared. Otherwise, +all frames' caches are cleared. +@end defun + +If an image in the image cache has not been displayed for a specified +period of time, Emacs removes it from the cache and frees the +associated memory. @defvar image-cache-eviction-delay This variable specifies the number of seconds an image can remain in the @@ -4299,12 +4329,6 @@ except when you explicitly clear it. This mode can be useful for debugging. @end defvar -@defun clear-image-cache &optional frame -This function clears the image cache. If @var{frame} is non-@code{nil}, -only the cache for that frame is cleared. Otherwise all frames' caches -are cleared. -@end defun - @node Buttons @section Buttons @cindex buttons in buffers From 30668bae4817c3649e0466266fc9647d9db2db9d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:47:20 +0000 Subject: [PATCH 044/105] * files.texi (File Conveniences): Document point motion keys in Image mode. --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 7e673a8c184..6bd23a3694e 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2007-08-07 Chong Yidong + + * files.texi (File Conveniences): Document point motion keys in Image + mode. + 2007-08-01 Alan Mackenzie * cc-mode.texi (Mailing Lists and Bug Reports): Correct "-no-site-file" From 2438b9e44fd33eb915fcef0a1da1aa6777c3a3b4 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 16:47:29 +0000 Subject: [PATCH 045/105] (File Conveniences): Document point motion keys in Image mode. --- man/files.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man/files.texi b/man/files.texi index 588fe4cae0b..dd2b445b054 100644 --- a/man/files.texi +++ b/man/files.texi @@ -2814,7 +2814,10 @@ point. Partial Completion mode offers other features extending mode allows you to toggle between displaying the file as an image in the Emacs buffer, and displaying its underlying text representation, using the command @kbd{C-c C-c} (@code{image-toggle-display}). This -works only when Emacs can display the specific image type. +works only when Emacs can display the specific image type. If the +displayed image is wider or taller than the frame, the usual point +motion keys (@kbd{C-f}, @kbd{C-p}, and so forth) cause different parts +of the image to be displayed. @findex thumbs-mode @findex mode, thumbs From b14d552b33dcf0a2b85d91e7b385a07585a141b4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 7 Aug 2007 17:00:44 +0000 Subject: [PATCH 046/105] (tcl-indent-level, tcl-continued-indent-level): Add safe-local-variable prop. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/tcl.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 147d95e2c54..8d25f687b2b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-07 Tom Tromey + + * progmodes/tcl.el (tcl-indent-level, tcl-continued-indent-level): + Add safe-local-variable property. + 2007-08-07 Chong Yidong * image-mode.el (image-toggle-display): Use image-refresh. diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index c7576a27114..f9fd7beffd2 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -126,11 +126,13 @@ "*Indentation of Tcl statements with respect to containing block." :type 'integer :group 'tcl) +(put 'tcl-indent-level 'safe-local-variable 'integerp) (defcustom tcl-continued-indent-level 4 "*Indentation of continuation line relative to first line of command." :type 'integer :group 'tcl) +(put 'tcl-continued-indent-level 'safe-local-variable 'integerp) (defcustom tcl-auto-newline nil "*Non-nil means automatically newline before and after braces you insert." From cbaa22f40ac9b66b7ebf4b288751738228f468de Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2007 17:21:00 +0000 Subject: [PATCH 047/105] ** sdl.web@gmail.com: problem with transparent PNG image display Fixed. --- admin/FOR-RELEASE | 2 -- 1 file changed, 2 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index bdf940fc9db..e88d89f5dbe 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -42,8 +42,6 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. ** bojohan+news@dd.chalmers.se, 1 Aug: n_schumacher@web.de: modification hooks called only once in -** sdl.web@gmail.com: problem with transparent PNG image display - ** id.brep@gmail.com, 12 Jul: customize-group "erc-server" save buffer error ** ams@gnu.org, 9 July: eshell and external commands From d62c9a33c4504b7d9dca54e387c48d41ce8b4e52 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 7 Aug 2007 20:04:27 +0000 Subject: [PATCH 048/105] * net/tramp.el (tramp-handle-file-remote-p): Handle optional parameters IDENTIFICATION and CONNECTED. (tramp-handle-insert-file-contents): VISIT must be handled after insertion of the local copy. Reported by Peter Gordon . (tramp-file-name-handler): No special handling for `expand-file-name'. But for `file-name-as-directory'. (tramp-find-shell, tramp-open-connection-telnet) (tramp-open-connection-rsh, tramp-open-connection-su) (tramp-open-connection-multi) (tramp-open-connection-setup-interactive-shell): Guard against $PROMPT_COMMAND shell var. Reported by Steve Youngs . (tramp-append-tramp-buffers): Replace "sensible" by "sensitive" in the hint. * net/trampver.el: Update release number. --- lisp/ChangeLog | 20 ++++++++++++++++ lisp/net/tramp.el | 54 ++++++++++++++++++++++++++++---------------- lisp/net/trampver.el | 2 +- 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d25f687b2b..381092c8e60 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2007-08-07 Michael Albinus + + * net/tramp.el (tramp-handle-file-remote-p): Handle optional + parameters IDENTIFICATION and CONNECTED. + (tramp-handle-insert-file-contents): VISIT must be handled after + insertion of the local copy. Reported by Peter Gordon + . + (tramp-file-name-handler): No special handling for + `expand-file-name'. But for `file-name-as-directory'. + (tramp-find-shell, tramp-open-connection-telnet) + (tramp-open-connection-rsh, tramp-open-connection-su) + (tramp-open-connection-multi) + (tramp-open-connection-setup-interactive-shell): Guard against + $PROMPT_COMMAND shell var. Reported by Steve Youngs + . + (tramp-append-tramp-buffers): Replace "sensible" by "sensitive" in + the hint. + + * net/trampver.el: Update release number. + 2007-08-07 Tom Tromey * progmodes/tcl.el (tcl-indent-level, tcl-continued-indent-level): diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 9f665ca4707..09167d674eb 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3868,11 +3868,20 @@ This will break if COMMAND prints a newline, followed by the value of (t (error "Wrong method specification for `%s'" method))) tmpfil))) -(defun tramp-handle-file-remote-p (filename) - "Like `file-remote-p' for tramp files." +(defun tramp-handle-file-remote-p (filename &optional identification connected) + "Like `file-remote-p' for Tramp files." (when (tramp-tramp-file-p filename) (with-parsed-tramp-file-name filename nil - (tramp-make-tramp-file-name multi-method method user host "")))) + (and (or (not connected) + (let ((p (get-buffer-process + (tramp-get-buffer multi-method method user host)))) + (and p (processp p) (memq (process-status p) '(run open))))) + (cond + ((eq identification 'method) method) + ((eq identification 'user) user) + ((eq identification 'host) host) + (t (tramp-make-tramp-file-name + multi-method method user host ""))))))) (defun tramp-handle-insert-file-contents (filename &optional visit beg end replace) @@ -3899,14 +3908,14 @@ This will break if COMMAND prints a newline, followed by the value of 'file-local-copy))) (file-local-copy filename))) coding-system-used result) - (when visit - (setq buffer-file-name filename) - (set-visited-file-modtime) - (set-buffer-modified-p nil)) (tramp-message-for-buffer multi-method method user host 9 "Inserting local temp file `%s'..." local-copy) (setq result (insert-file-contents local-copy nil beg end replace)) + (when visit + (setq buffer-file-name filename) + (set-visited-file-modtime) + (set-buffer-modified-p nil)) ;; Now `last-coding-system-used' has right value. Remember it. (when (boundp 'last-coding-system-used) (setq coding-system-used (symbol-value 'last-coding-system-used))) @@ -4354,11 +4363,12 @@ Falls back to normal file name handler if no tramp file name handler exists." (cond ;; When we are in completion mode, some operations shouldn' be ;; handled by backend. - ((and completion (memq operation '(expand-file-name))) - (tramp-run-real-handler operation args)) ((and completion (zerop (length localname)) (memq operation '(file-exists-p file-directory-p))) t) + ((and completion (zerop (length localname)) + (memq operation '(file-name-as-directory))) + filename) ;; Call the backend function. (foreign (apply foreign operation args)) ;; Nothing to do for us. @@ -5351,7 +5361,7 @@ file exists and nonzero exit status otherwise." 5 "Starting remote shell `%s' for tilde expansion..." shell) (tramp-send-command multi-method method user host - (concat "PS1='$ ' exec " shell)) ; + (concat "PROMPT_COMMAND='' PS1='$ ' exec " shell)) ; (tramp-barf-if-no-shell-prompt (get-buffer-process (current-buffer)) 60 "Couldn't find remote `%s' prompt" shell) @@ -5361,11 +5371,12 @@ file exists and nonzero exit status otherwise." ;; must use "\n" here, not tramp-rsh-end-of-line. Kai left the ;; last tramp-rsh-end-of-line, Douglas wanted to replace that, ;; as well. - (process-send-string nil (format "PS1='%s%s%s'; PS2=''; PS3=''%s" - tramp-rsh-end-of-line - tramp-end-of-output - tramp-rsh-end-of-line - tramp-rsh-end-of-line)) + (process-send-string + nil (format "PROMPT_COMMAND=''; PS1='%s%s%s'; PS2=''; PS3=''%s" + tramp-rsh-end-of-line + tramp-end-of-output + tramp-rsh-end-of-line + tramp-rsh-end-of-line)) (tramp-wait-for-output) (tramp-message 9 "Setting remote shell prompt...done") @@ -5690,6 +5701,7 @@ Maybe the different regular expressions need to be tuned. (or user (user-login-name)) host method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) + (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) ;; If we omit the conditional here, then we would use @@ -5771,6 +5783,7 @@ arguments, and xx will be used as the host name to connect to. (setq login-args (cons "-p" (cons (match-string 2 host) login-args))) (setq real-host (match-string 1 host))) (setenv "TERM" tramp-terminal-type) + (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) ;; If we omit the conditional, we would use @@ -5823,6 +5836,7 @@ prompt than you do, so it is not at all unlikely that the variable (or user "") method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) + (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) ;; If we omit the conditional, we use `undecided-dos' in @@ -5888,6 +5902,7 @@ log in as u2 to h2." (tramp-message 7 "Opening `%s' connection..." multi-method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) + (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) ;; If we omit the conditional, we use `undecided-dos' in @@ -6127,10 +6142,11 @@ to set up. METHOD, USER and HOST specify the connection." ;; makes it work under `rc', too. We also unset the variable $ENV ;; because that is read by some sh implementations (eg, bash when ;; called as sh) on startup; this way, we avoid the startup file - ;; clobbering $PS1. + ;; clobbering $PS1. $PROMP_COMMAND is another way to set the prompt + ;; in /bin/bash, it must be discarded as well. (tramp-send-command-internal multi-method method user host - (format "exec env 'ENV=' 'PS1=$ ' %s" + (format "exec env 'ENV=' 'PROMPT_COMMAND=' 'PS1=$ ' %s" (tramp-get-method-parameter multi-method method user host 'tramp-remote-sh)) (format "remote `%s' to come up" @@ -6227,7 +6243,7 @@ to set up. METHOD, USER and HOST specify the connection." (setq tramp-last-cmd-time (current-time)) (tramp-send-command multi-method method user host - (format "PS1='%s%s%s'; PS2=''; PS3=''" + (format "PROMPT_COMMAND=''; PS1='%s%s%s'; PS2=''; PS3=''" tramp-rsh-end-of-line tramp-end-of-output tramp-rsh-end-of-line)) @@ -7713,7 +7729,7 @@ Used for non-7bit chars in strings." (kill-region start (point))))) (insert " The buffer(s) above will be appended to this message. If you don't want -to append a buffer because it contains sensible data, or because the buffer +to append a buffer because it contains sensitive data, or because the buffer is too large, you should delete the respective buffer. The buffer(s) will contain user and host names. Passwords will never be included there.") diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index d265fa5393b..5734b5c9138 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -30,7 +30,7 @@ ;; are auto-frobbed from configure.ac, so you should edit that file and run ;; "autoconf && ./configure" to change them. -(defconst tramp-version "2.0.56" +(defconst tramp-version "2.0.57-pre" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@gnu.org" From 1be8283dbad6cb41670cb45a2e74008ed409240b Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 7 Aug 2007 20:21:42 +0000 Subject: [PATCH 049/105] Update for Emacs 22.2, including libxpm. --- admin/nt/README-ftp-server | 40 ++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/admin/nt/README-ftp-server b/admin/nt/README-ftp-server index 6b437eb2f1e..0d3d550f563 100644 --- a/admin/nt/README-ftp-server +++ b/admin/nt/README-ftp-server @@ -1,7 +1,7 @@ Precompiled Distributions of Emacs for Windows - Version 22.1 + Version 22.2 May 22, 2007 @@ -26,9 +26,9 @@ If you want to redistribute any of the precompiled distributions of Emacs, be careful to check the implications of the GPL. For instance, - if you put the emacs-22.1-bin-i386.tar.gz file from this directory on + if you put the emacs-22.2-bin-i386.tar.gz file from this directory on an Internet site, you must arrange to distribute the source files of - the SAME version (i.e. ../emacs-22.1.tar.gz). + the SAME version (i.e. ../emacs-22.2.tar.gz). Making a link to our copy of the source is NOT sufficient, since we might upgrade to a new version while you are still distributing the @@ -37,8 +37,8 @@ * Files in this directory - + emacs-22.1-bin-i386.zip - Windows binaries of Emacs-22.1, with all lisp code and documentation + + emacs-22.2-bin-i386.zip + Windows binaries of Emacs-22.2, with all lisp code and documentation included. Download this file if you want a single installation package, and @@ -49,8 +49,8 @@ If you need the C source code at a later date, it will be safe to unpack the source distribution on top of this installation. - + emacs-22.1-barebin-i386.zip - Windows binaries of Emacs-22.1, without lisp code or documentation. + + emacs-22.2-barebin-i386.zip + Windows binaries of Emacs-22.2, without lisp code or documentation. Download this file if you already have the source distribution, or if you need to redump the emacs.exe executable. @@ -60,12 +60,22 @@ file, plus temacs.exe and dump.bat, which are required if you want to redump emacs without recompiling it. + + libxpm-src.zip + Source code for libXpm-X11R7.2-3.5.6 modified to compile on Windows. + This corresponds to the libXpm.dll in emacs-22.2-bin-i386.zip + and emacs-22.2-barebin-i386.zip. + + + The following are provided for users who require older versions. + + + emacs-22.1-bin-i386.zip + + emacs-22-1-barebin-i386.zip + Windows binaries of Emacs 22.1, contents as above. + + emacs-21.3-bin-i386.tar.gz Windows binaries of Emacs 21.3, with compiled lisp code and some documentation included. - This is provided for users who require the older version. - + emacs-21.3-leim.tar.gz Compiled lisp input methods. This optional addition to Emacs-21.3 is required if you want to enter languages that are not directly @@ -73,7 +83,7 @@ * Image support - Emacs 22.1 contains support for images, however for most image formats + Emacs 22.2 contains support for images, however for most image formats supporting libraries are required. This distribution has been tested with the libraries that are distributed with GTK for Windows, and the libraries found at http://gnuwin32.sourceforge.net/. The following image @@ -82,10 +92,10 @@ PBM/PGM/PPM: Supported natively by Emacs. This format is used for the black and white versions of the toolbar icons. - XPM: requires a Windows port of the XPM library 3.4 or later, - which will be named xpm4.dll, libxpm-nox4.dll or - libxpm.dll. This format is used for the color versions of the - toolbar icons, and other images in Emacs. + XPM: a Windows port of the XPM library corresponding to the x.org + release of X11R7.2 is included with the binary distribution, but + can be replaced by other versions with the name xpm4.dll, + libxpm-nox4.dll or libxpm.dll. PNG: requires the PNG reference library 1.2 or later, which will be named libpng13d.dll, libpng13.dll, libpng12d.dll, libpng12.dll @@ -217,7 +227,7 @@ about the Windows port and related software packages. Note that as of writing, most of the information in that FAQ was for Emacs-21.3 and earlier versions, so some information may not be relevant to - Emacs-22.1. + Emacs-22.2. In addition to the FAQ, there is a mailing list for discussing issues related to the Windows port of Emacs. For information about the From 70ad3da9ecdb3f7b149f78d436913f7352101093 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 8 Aug 2007 05:51:36 +0000 Subject: [PATCH 050/105] Use window-full-width-p instead of comparing frame-width and window-width. --- lisp/calendar/calendar.el | 2 +- lisp/dired.el | 4 ++-- lisp/mouse-drag.el | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 719f32be3c1..330cf8521f3 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -2078,7 +2078,7 @@ Or, for optional MON, YR." ;; Don't do any window-related stuff if we weren't called from a ;; window displaying the calendar (when in-calendar-window - (if (or (one-window-p t) (/= (frame-width) (window-width))) + (if (or (one-window-p t) (not (window-full-width-p))) ;; Don't mess with the window size, but ensure that the first ;; line is fully visible (set-window-vscroll nil 0) diff --git a/lisp/dired.el b/lisp/dired.el index 3639f44b553..bd160df7bda 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2547,12 +2547,12 @@ deletion of non-empty directories is allowed." (cond ;; if split-height-threshold is enabled, use the largest window ((and (> (window-height (setq w2 (get-largest-window))) split-height-threshold) - (= (frame-width) (window-width w2))) + (window-full-width-p w2)) (setq window w2)) ;; if the least-recently-used window is big enough, use it ((and (> (window-height (setq w2 (get-lru-window))) (* 2 window-min-height)) - (= (frame-width) (window-width w2))) + (window-full-width-p w2)) (setq window w2))) (save-excursion (set-buffer buf) diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index f1d56eccc66..bfb199ab897 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el @@ -158,7 +158,7 @@ Keep the cursor on the screen as needed." Basically, we check for existing horizontal scrolling." (or truncate-lines (> (window-hscroll (selected-window)) 0) - (< (window-width) (frame-width)) + (not (window-full-width-p)) (and mouse-drag-electric-col-scrolling (save-excursion ;; on a long line? From 0dad3dfecc893cb8807154f8d6e5559e922ddc72 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 8 Aug 2007 05:57:54 +0000 Subject: [PATCH 051/105] (compilation-set-window-height): Use window-full-width-p instead of comparing frame-width and window-width. (compilation-find-buffer): Remove extra argument in call to compilation-buffer-internal-p. --- lisp/progmodes/compile.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 529194ffa7e..fcb20ede56d 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1153,7 +1153,7 @@ exited abnormally with code %d\n" "Set the height of WINDOW according to `compilation-window-height'." (let ((height (buffer-local-value 'compilation-window-height (window-buffer window)))) (and height - (= (window-width window) (frame-width (window-frame window))) + (window-full-width-p window) ;; If window is alone in its frame, aside from a minibuffer, ;; don't change its height. (not (eq window (frame-root-window (window-frame window)))) @@ -1611,12 +1611,10 @@ Use this command in a compilation log buffer. Sets the mark at point there." (defun compilation-find-buffer (&optional avoid-current) "Return a compilation buffer. -If AVOID-CURRENT is nil, and -the current buffer is a compilation buffer, return it. -If AVOID-CURRENT is non-nil, return the current buffer -only as a last resort." - (if (and (compilation-buffer-internal-p (current-buffer)) - (not avoid-current)) +If AVOID-CURRENT is nil, and the current buffer is a compilation buffer, +return it. If AVOID-CURRENT is non-nil, return the current buffer only +as a last resort." + (if (and (compilation-buffer-internal-p) (not avoid-current)) (current-buffer) (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))) From eaccbbd3c4e79e6618deda679dbb7a710ce2c9c6 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 8 Aug 2007 06:04:51 +0000 Subject: [PATCH 052/105] (2C-two-columns, 2C-merge): Use window-full-width-p instead of comparing frame-width and window-width. --- lisp/ChangeLog | 13 +++++++++++++ lisp/textmodes/two-column.el | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 381092c8e60..9a40681aba8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2007-08-08 Martin Rudalics + + * dired.el (dired-pop-to-buffer): + * mouse-drag.el (mouse-drag-should-do-col-scrolling): + * calendar/calendar.el (generate-calendar-window): + * progmodes/compile.el (compilation-set-window-height): + * textmodes/two-column.el (2C-two-columns, 2C-merge): + Use window-full-width-p instead of comparing frame-width and + window-width. + + * progmodes/compile.el (compilation-find-buffer): Remove extra + argument in call to compilation-buffer-internal-p. + 2007-08-07 Michael Albinus * net/tramp.el (tramp-handle-file-remote-p): Handle optional diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 2568b53fe36..eebd1923b63 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el @@ -347,8 +347,8 @@ When called again, restores the screen layout with the current buffer first and the associated buffer to its right." (interactive "P") ;; first go to full width, so that we can certainly split into two windows - (if (< (window-width) (frame-width)) - (enlarge-window 99999 t)) + (unless (window-full-width-p) + (enlarge-window 99999 t)) (split-window-horizontally (max window-min-width (min 2C-window-width (- (frame-width) window-min-width)))) @@ -533,8 +533,8 @@ off trailing spaces with \\[delete-trailing-whitespace]." (insert 2C-separator string)) (next-line 1) ; add one if necessary (set-buffer b2)))) - (if (< (window-width) (frame-width)) - (enlarge-window 99999 t))) + (unless (window-full-width-p) + (enlarge-window 99999 t))) ;;;;; utility functions ;;;;; From cfbe273188a61e4f59969d6d99e92affbe4e7a10 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:11:08 +0000 Subject: [PATCH 053/105] telnet, erc-server issues fixed. --- admin/FOR-RELEASE | 10 +++------- etc/ChangeLog | 5 +++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index e88d89f5dbe..1f82c03dfda 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -38,20 +38,16 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. ** dak@gnu.org, 30 May: Redraw problem with overlapping frames -** dksw@eircom.net, 3 Jul: Telnet mode (rsh/ssh) - ** bojohan+news@dd.chalmers.se, 1 Aug: n_schumacher@web.de: modification hooks called only once in -** id.brep@gmail.com, 12 Jul: customize-group "erc-server" save buffer error - ** ams@gnu.org, 9 July: eshell and external commands ** timh@insightful.com, 25 June: undigestify-rmail-message in emacs 22.1 doesn't split a digest -* FIXES FOR EMACS 22.2 +* FIXES FOR EMACS 22.3 -Here we list small fixes that arrived too late for Emacs 22.1, but -that should be installed on the release branch after 22.1 is released. +Here we list small fixes that arrived too late for Emacs 22.2, but +that should be installed on the release branch after 22.2 is released. * DOCUMENTATION diff --git a/etc/ChangeLog b/etc/ChangeLog index 02cbc402954..26ead74bdbd 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2007-08-08 Glenn Morris + + * TODO: `iff' item is dealt with. + * GNUS-NEWS, NEWS, NEWS.1-17, NEWS.19, NEWS.21: Replace `iff'. + 2007-07-25 Glenn Morris * Relicense all FSF files to GPLv3 or later. From e317f3b4230d8d5239e3077059ecd4ac2c04e7b2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:11:41 +0000 Subject: [PATCH 054/105] `iff' item is dealt with. --- etc/TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/TODO b/etc/TODO index c81b82dd54a..90a3d32fa51 100644 --- a/etc/TODO +++ b/etc/TODO @@ -22,8 +22,6 @@ using Xaw3d. ** Compute the list of active keymaps *after* reading the first event. -** Avoid using "iff" in doc strings. - ** mouse-autoselect-window should wait to select the window until the mouse is put to rest or after a delay or both, so that moving over a window doesn't select it. From d95b32a480d8ae18265c2d00e3f2a1ac3822d1d9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:12:04 +0000 Subject: [PATCH 055/105] Replace `iff'. --- etc/GNUS-NEWS | 4 ++-- etc/NEWS | 4 ++-- etc/NEWS.1-17 | 2 +- etc/NEWS.19 | 4 ++-- etc/NEWS.21 | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS index fce326fc0d0..f09451af805 100644 --- a/etc/GNUS-NEWS +++ b/etc/GNUS-NEWS @@ -30,7 +30,7 @@ or remove them using `make remove-installed-shadows'. Use `make.bat' if you want to install Gnus under MS Windows, the first argument to the batch-program should be the directory where `xemacs.exe' -respectively `emacs.exe' is located, iff you want to install Gnus after +respectively `emacs.exe' is located, if you want to install Gnus after compiling it, give `make.bat' `/copy' as the second parameter. `make.bat' has been rewritten from scratch, it now features automatic @@ -308,7 +308,7 @@ as external parts. ** Gnus no longer generate the Sender: header automatically. -Earlier it was generated iff the user configurable email address was +Earlier it was generated when the user configurable email address was different from the Gnus guessed default user address. As the guessing algorithm is rarely correct these days, and (more controversially) the only use of the Sender: header was to check if you are entitled to diff --git a/etc/NEWS b/etc/NEWS index f1a2ad28ca8..7c0712ca724 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3558,8 +3558,8 @@ that is, floats are compared by value and other elements with `eq'. *** New functions `string-or-null-p' and `booleanp'. -`string-or-null-p' returns non-nil iff OBJECT is a string or nil. -`booleanp' returns non-nil iff OBJECT is t or nil. +`string-or-null-p' returns non-nil if OBJECT is a string or nil. +`booleanp' returns non-nil if OBJECT is t or nil. *** `makehash' is now obsolete. Use `make-hash-table' instead. diff --git a/etc/NEWS.1-17 b/etc/NEWS.1-17 index 4e5243ea0c4..7bc30e5d228 100644 --- a/etc/NEWS.1-17 +++ b/etc/NEWS.1-17 @@ -1208,7 +1208,7 @@ whether and where a line has a comment. * New function `auto-save-file-name-p' -Should return non-`nil' iff given a string which is the name of an +Should return non-`nil' if given a string which is the name of an auto-save file (sans directory name). If you redefine `make-auto-save-file-name', you should redefine this accordingly. By default, this function returns `t' for filenames beginning with diff --git a/etc/NEWS.19 b/etc/NEWS.19 index 2f3e83fb946..08573703c04 100644 --- a/etc/NEWS.19 +++ b/etc/NEWS.19 @@ -5133,8 +5133,8 @@ using X). ** It is now simpler to tell Emacs to display accented characters under X windows. M-x standard-display-european toggles the display of buffer text according to the ISO Latin-1 standard. With a prefix -argument, this command enables European character display iff the -argument is positive. +argument, this command enables European character display if and only +if the argument is positive. ** The `-i' command-line argument tells Emacs to use a picture of the GNU gnu as its icon, instead of letting the window manager choose an diff --git a/etc/NEWS.21 b/etc/NEWS.21 index 91a37be8276..a4c42a6479a 100644 --- a/etc/NEWS.21 +++ b/etc/NEWS.21 @@ -2502,7 +2502,7 @@ value is returned. If no window satisfies PREDICATE, DEFAULT is returned. Optional second arg MINIBUF t means count the minibuffer window even -if not active. MINIBUF nil or omitted means count the minibuffer iff +if not active. MINIBUF nil or omitted means count the minibuffer if it is active. MINIBUF neither t nor nil means not to count the minibuffer even if it is active. From 79f94cd0ab36cf99f3c84dd5def1275476c3b25d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:12:39 +0000 Subject: [PATCH 056/105] Replace `iff' in comments. --- lib-src/etags.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index 6c61847546a..5da144c46b0 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -2853,7 +2853,7 @@ static void make_C_tag __P((bool)); * function or variable, or corresponds to a typedef, or * is a struct/union/enum tag, or #define, or an enum constant. * - * *IS_FUNC gets TRUE iff the token is a function or #define macro + * *IS_FUNC gets TRUE if the token is a function or #define macro * with args. C_EXTP points to which language we are looking at. * * Globals @@ -4769,7 +4769,7 @@ Pascal_functions (inf) int save_lineno, namelen, taglen; char c, *name; - bool /* each of these flags is TRUE iff: */ + bool /* each of these flags is TRUE if: */ incomment, /* point is inside a comment */ inquote, /* point is inside '..' string */ get_tagname, /* point is after PROCEDURE/FUNCTION From 314125ec3721de7081213968761f3bb60636bd04 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:15:01 +0000 Subject: [PATCH 057/105] (checkdoc-ispell-lisp-words): Remove `iff'. Replace `iff' in doc-strings and comments. --- lisp/emacs-lisp/checkdoc.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 0374ad7b34c..e1835d75fcb 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -263,7 +263,7 @@ system. Possible values are: (const t))) (defvar checkdoc-ispell-lisp-words - '("alist" "emacs" "etags" "iff" "keymap" "paren" "regexp" "sexp" "xemacs") + '("alist" "emacs" "etags" "keymap" "paren" "regexp" "sexp" "xemacs") "List of words that are correct when spell-checking Lisp documentation.") (defcustom checkdoc-max-keyref-before-warn 10 @@ -1243,7 +1243,8 @@ generating a buffered list of errors." ;;;###autoload (define-minor-mode checkdoc-minor-mode "Toggle Checkdoc minor mode, a mode for checking Lisp doc strings. -With prefix ARG, turn Checkdoc minor mode on iff ARG is positive. +With prefix ARG, turn Checkdoc minor mode on if ARG is positive, otherwise +turn it off. In Checkdoc minor mode, the usual bindings for `eval-defun' which is bound to \\\\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include From ab2d877d4515f7bb1de1a5b59d24c3d76903a802 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:17:12 +0000 Subject: [PATCH 058/105] Replace `iff' in doc-strings and comments. --- lisp/emacs-lisp/byte-opt.el | 2 +- lisp/emacs-lisp/easymenu.el | 2 +- lisp/emacs-lisp/rx.el | 2 +- lisp/emacs-lisp/unsafep.el | 2 +- lisp/erc/ChangeLog | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 811dc699bd0..82a5cf0a75a 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -564,7 +564,7 @@ (cons fn args))))))) (defun byte-optimize-all-constp (list) - "Non-nil iff all elements of LIST satisfy `byte-compile-constp'." + "Non-nil if all elements of LIST satisfy `byte-compile-constp'." (let ((constant t)) (while (and list constant) (unless (byte-compile-constp (car list)) diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 5d53a70531c..030e1bccbd4 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -539,7 +539,7 @@ earlier by `easy-menu-define' or `easy-menu-create-menu'." (easy-menu-do-add-item map item before))) (defun easy-menu-item-present-p (map path name) - "In submenu of MAP with path PATH, return non-nil iff item NAME is present. + "In submenu of MAP with path PATH, return non-nil if item NAME is present. MAP and PATH are defined as in `easy-menu-add-item'. NAME should be a string, the name of the element to be looked for." (easy-menu-return-item (easy-menu-get-map map path) name)) diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index cf915c1b15d..45a1e9c8d10 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -554,7 +554,7 @@ appended to R will apply to all of R. For example, \"a\" This function may return false negatives, but it will not return false positives. It is nevertheless useful in -situations where an efficiency shortcut can be taken iff a +situations where an efficiency shortcut can be taken only if a regexp is atomic. The function can be improved to detect more cases of atomic regexps. Presently, this function detects the following categories of atomic regexp; diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index bf52acef382..d7dd1f19300 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -212,7 +212,7 @@ of symbols with local bindings." (defun unsafep-function (fun) - "Return nil iff FUN is a safe function. + "Return nil if FUN is a safe function. \(either a safe lambda or a symbol that names a safe function). Otherwise result is a reason code." (cond diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 9baafe61257..d72d472d69f 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,7 @@ +2007-08-08 Glenn Morris + + * erc-log.el, erc.el: Replace `iff' in doc-strings and comments. + 2007-07-30 Michael Olson * erc-nicklist.el: Remove from the Emacs source tree. This file From 81bb49ce4624bd4e162f87a26de0576e72ccd88d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:18:57 +0000 Subject: [PATCH 059/105] Replace `iff' in doc-strings and comments. --- lisp/erc/erc-log.el | 2 +- lisp/erc/erc.el | 12 ++++++------ lisp/mail/mspools.el | 2 +- lisp/mail/rmail.el | 4 ++-- lisp/mh-e/ChangeLog | 5 +++++ 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 194f8ae6bf1..88132afae0c 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -261,7 +261,7 @@ The current buffer is given by BUFFER." (defun erc-log-all-but-server-buffers (buffer) "Returns t if logging should be enabled in BUFFER. -Returns nil iff `erc-server-buffer-p' returns t." +Returns nil if `erc-server-buffer-p' returns t." (save-excursion (save-window-excursion (set-buffer buffer) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index d5a823ac825..c26bdf2a19f 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -3958,7 +3958,7 @@ and always returns t." (defun erc-echo-notice-in-target-buffer (s parsed buffer sender) "Echos a private notice in BUFFER, if BUFFER is non-nil. This function is designed to be added to either `erc-echo-notice-hook' -or `erc-echo-notice-always-hook', and returns non-nil iff BUFFER +or `erc-echo-notice-always-hook', and returns non-nil if BUFFER is non-nil." (if buffer (progn (erc-display-message parsed nil buffer s) t) @@ -3982,7 +3982,7 @@ designed to be added to either `erc-echo-notice-hook' or "Echos a private notice in the active buffer if the active buffer is not the server buffer. This function is designed to be added to either `erc-echo-notice-hook' or -`erc-echo-notice-always-hook', and returns non-nil iff the active +`erc-echo-notice-always-hook', and returns non-nil if the active buffer is not the server buffer." (if (not (eq (erc-server-buffer) (erc-active-buffer))) (progn (erc-display-message parsed nil 'active s) t) @@ -3999,7 +3999,7 @@ designed to be added to either `erc-echo-notice-hook' or "Echos a private notice in all of the buffers for which SENDER is a member. This function is designed to be added to either `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and -returns non-nil iff there is at least one buffer for which the +returns non-nil if there is at least one buffer for which the sender is a member. See also: `erc-echo-notice-in-first-user-buffer', @@ -4013,7 +4013,7 @@ See also: `erc-echo-notice-in-first-user-buffer', "Echos a private notice in BUFFER and in all of the buffers for which SENDER is a member. This function is designed to be added to either `erc-echo-notice-hook' or -`erc-echo-notice-always-hook', and returns non-nil iff there is +`erc-echo-notice-always-hook', and returns non-nil if there is at least one buffer for which the sender is a member or the default target. @@ -4029,7 +4029,7 @@ See also: `erc-echo-notice-in-user-buffers', "Echos a private notice in one of the buffers for which SENDER is a member. This function is designed to be added to either `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and -returns non-nil iff there is at least one buffer for which the +returns non-nil if there is at least one buffer for which the sender is a member. See also: `erc-echo-notice-in-user-buffers', @@ -4938,7 +4938,7 @@ Specifically, return the position of `erc-insert-marker'." (defun erc-send-input (input) "Treat INPUT as typed in by the user. It is assumed that the input and the prompt is already deleted. -This returns non-nil only iff we actually send anything." +This returns non-nil only if we actually send anything." ;; Handle different kinds of inputs (cond ;; Ignore empty input diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index d14be55735f..988ce2f8e02 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -398,7 +398,7 @@ nil." )) (defun mspools-size-folder (spool) - "Return (SPOOL . SIZE ) iff SIZE of spool file is non-zero." + "Return (SPOOL . SIZE ), if SIZE of spool file is non-zero." ;; 7th file attribute is the size of the file in bytes. (let ((file (concat mspools-folder-directory spool)) size) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 37a0533acc9..ee990f2fdd3 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -3992,13 +3992,13 @@ specifying headers which should not be copied into the new message." (mail-position-on-field (if resending "Resent-To" "To") t)))))) (defun rmail-summary-exists () - "Non-nil iff in an RMAIL buffer and an associated summary buffer exists. + "Non-nil if in an RMAIL buffer and an associated summary buffer exists. In fact, the non-nil value returned is the summary buffer itself." (and rmail-summary-buffer (buffer-name rmail-summary-buffer) rmail-summary-buffer)) (defun rmail-summary-displayed () - "t iff in RMAIL buffer and an associated summary buffer is displayed." + "t if in RMAIL buffer and an associated summary buffer is displayed." (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) (defcustom rmail-redisplay-summary nil diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 51b3c80f4d5..f8134b0911e 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2007-08-08 Glenn Morris + + * mh-folder.el, mh-letter.el, mh-show.el: Replace `iff' in + doc-strings and comments. + 2007-07-25 Glenn Morris * Relicense all FSF files to GPLv3 or later. From df26688bd008d27830c166dbc3caccad7e83da0f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:21:11 +0000 Subject: [PATCH 060/105] Replace `iff' in doc-strings and comments. --- lisp/mh-e/mh-folder.el | 2 +- lisp/mh-e/mh-letter.el | 2 +- lisp/mh-e/mh-show.el | 2 +- lisp/url/ChangeLog | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 63d55459cf4..42abad4536a 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -1495,7 +1495,7 @@ function doesn't recenter the folder buffer." (defun mh-update-unseen () "Synchronize the unseen sequence with MH. -Return non-nil iff the MH folder was set. +Return non-nil if the MH folder was set. The hook `mh-unseen-updated-hook' is called after the unseen sequence is updated." (if mh-seen-list diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index c70c9d8c7e4..7b2cab77d04 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -844,7 +844,7 @@ body." (defun mh-position-on-field (field &optional ignored) "Move to the end of the FIELD in the header. Move to end of entire header if FIELD not found. -Returns non-nil iff FIELD was found. +Returns non-nil if FIELD was found. The optional second arg is for pre-version 4 compatibility and is IGNORED." (cond ((mh-goto-header-field field) diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index d3b93ca65ab..4e1a19c3a06 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el @@ -161,7 +161,7 @@ displayed." (defun mh-showing-mode (&optional arg) "Change whether messages should be displayed. -With ARG, display messages iff ARG is positive." +With ARG, display messages if ARG is positive, otherwise don't display them." (setq mh-showing-mode (if (null arg) (not mh-showing-mode) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index ef18be7403d..da5410fe600 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2007-08-08 Glenn Morris + + * url-auth.el, url-cache.el, url-dav.el, url-file.el, vc-dav.el: + Replace `iff' in doc-strings and comments. + 2007-07-25 Glenn Morris * Relicense all FSF files to GPLv3 or later. From 3ecd3a56c0b0d9453272308be2aae4fca444e9f3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:27:21 +0000 Subject: [PATCH 061/105] Replace `iff' in doc-strings and comments. --- lisp/gnus/ChangeLog | 6 ++++++ lisp/international/ja-dic-cnv.el | 4 ++-- lisp/international/latin1-disp.el | 4 ++-- lisp/international/mule-cmds.el | 10 +++++----- lisp/international/quail.el | 2 +- lisp/term/sun-mouse.el | 2 +- lisp/term/tvi970.el | 4 ++-- lisp/textmodes/artist.el | 2 +- lisp/textmodes/flyspell.el | 5 +++-- lisp/textmodes/ispell.el | 3 ++- lisp/textmodes/nroff-mode.el | 2 +- lisp/textmodes/refill.el | 2 +- lisp/textmodes/reftex-global.el | 2 +- lisp/textmodes/sgml-mode.el | 2 +- lisp/textmodes/two-column.el | 6 ++++-- lisp/url/url-auth.el | 2 +- lisp/url/url-cache.el | 2 +- lisp/url/url-dav.el | 6 +++--- lisp/url/url-file.el | 2 +- lisp/url/vc-dav.el | 2 +- 20 files changed, 40 insertions(+), 30 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 83ca62ca0de..807a853ba56 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2007-08-08 Glenn Morris + + * gmm-utils.el, gnus-async.el, gnus-msg.el, gnus-score.el + * gnus-util.el, imap.el, mailcap.el, nnimap.el: Replace `iff' in + doc-strings and comments. + 2007-07-25 Glenn Morris * Relicense all FSF files to GPLv3 or later. diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index 5fa18221327..e7c9b633b3b 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el @@ -215,8 +215,8 @@ ;; Return t if substring of STR (between FROM and TO) can be broken up ;; to chunks all of which can be derived from another entry in SKK ;; dictionary. SKKBUF is the buffer where the original SKK dictionary -;; is visited, KANA is the current entry for STR. FIRST is t iff this -;; is called at top level. +;; is visited, KANA is the current entry for STR. FIRST is t only if +;; this is called at top level. (defun skkdic-breakup-string (skkbuf kana str from to &optional first) (let ((len (- to from))) diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 515695bf503..ebeef71b0b7 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -777,9 +777,9 @@ use either \\[customize] or the function `latin1-display'." "Set up Latin-1/ASCII display for Unicode characters. This uses the transliterations of the Lynx browser. -With argument ARG, turn such display on iff ARG is positive, otherwise +With argument ARG, turn such display on if ARG is positive, otherwise turn it off and display Unicode characters literally. The display -is't changed if the display can render Unicode characters." +isn't changed if the display can render Unicode characters." (interactive "p") (if (> arg 0) (unless (char-displayable-p diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 9501d5f7cc0..a858066f47c 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -445,11 +445,11 @@ non-nil, it is used to sort CODINGS instead." (let ((base (coding-system-base x))) ;; We calculate the priority number 0..255 by ;; using the 8 bits PMMLCEII as this: - ;; P: 1 iff most preferred. - ;; MM: greater than 0 iff mime-charset. - ;; L: 1 iff one of the current lang. env.'s codings. - ;; C: 1 iff one of codings listed in the category list. - ;; E: 1 iff not XXX-with-esc + ;; P: 1 if most preferred. + ;; MM: greater than 0 if mime-charset. + ;; L: 1 if one of the current lang. env.'s codings. + ;; C: 1 if one of codings listed in the category list. + ;; E: 1 if not XXX-with-esc ;; II: if iso-2022 based, 0..3, else 1. (logior (lsh (if (eq base most-preferred) 1 0) 7) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 774e3c14269..f9f497699a0 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1942,7 +1942,7 @@ Remaining args are for FUNC." (overlay-put quail-overlay 'face 'highlight)))) (defun quail-require-guidance-buf () - "Return t iff the current Quail package requires showing guidance buffer." + "Return t if the current Quail package requires showing guidance buffer." (and input-method-verbose-flag (if (eq input-method-verbose-flag 'default) (not (and (eq (selected-window) (minibuffer-window)) diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el index 280bfb67081..65ebe193c71 100644 --- a/lisp/term/sun-mouse.el +++ b/lisp/term/sun-mouse.el @@ -230,7 +230,7 @@ Handles wrapped and horizontally scrolled lines correctly." (defun minibuffer-window-p (window) - "True iff this WINDOW is minibuffer." + "True if this WINDOW is minibuffer." (= (frame-height) (nth 3 (window-edges window)) ; The bottom edge. )) diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index 4af21f08522..1c0bda519ac 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el @@ -106,8 +106,8 @@ ;;; Should keypad numbers send ordinary digits or distinct escape sequences? (defvar tvi970-keypad-numeric nil - "The terminal should be in numeric keypad mode iff this variable is non-nil. -Do not set this variable! Call the function ``tvi970-set-keypad-mode''.") + "Non-nil means the terminal should be in numeric keypad mode. +Do not set this variable! Call the function `tvi970-set-keypad-mode'.") (defun tvi970-set-keypad-mode (&optional arg) "Set the current mode of the TVI 970 numeric keypad. diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index dbb41f13ec0..274de28e6a0 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -1768,7 +1768,7 @@ info-variant-part." ;; Macro that won't funcall the function if it is nil. ;; (defmacro artist-funcall (fn &rest args) - "Call function FN with ARGS iff FN is not nil." + "Call function FN with ARGS, if FN is not nil." (list 'if fn (cons 'funcall (cons fn args)))) (defun artist-uniq (l) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 8b95a159477..0b5dfa4cc54 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -457,7 +457,8 @@ See also `flyspell-duplicate-distance'." This spawns a single Ispell process and checks each word. The default flyspell behavior is to highlight incorrect words. With no argument, this command toggles Flyspell mode. -With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive. +With a prefix argument ARG, turn Flyspell minor mode on if ARG is positive, +otherwise turn it off. Bindings: \\[ispell-word]: correct words (using Ispell). @@ -1621,7 +1622,7 @@ FLYSPELL-BUFFER." ;;* flyspell-overlay-p ... */ ;;*---------------------------------------------------------------------*/ (defun flyspell-overlay-p (o) - "A predicate that return true iff O is an overlay used by flyspell." + "Return true if O is an overlay used by flyspell." (and (overlayp o) (overlay-get o 'flyspell-overlay))) ;;*---------------------------------------------------------------------*/ diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 047fb141331..3d6a17c5d93 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -3324,7 +3324,8 @@ available on the net." ;;;###autoload (defun ispell-minor-mode (&optional arg) "Toggle Ispell minor mode. -With prefix arg, turn Ispell minor mode on iff arg is positive. +With prefix argument ARG, turn Ispell minor mode on if ARG is positive, +otherwise turn it off. In Ispell minor mode, pressing SPC or RET warns you if the previous word is incorrectly spelled. diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index a96d4845857..18156071e1c 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el @@ -261,7 +261,7 @@ automatically inserts the matching closing request after point." `nroff-electric-newline' forces Emacs to check for an nroff request at the beginning of the line, and insert the matching closing request if necessary. This command toggles that mode (off->on, on->off), with an argument, -turns it on iff arg is positive, otherwise off." +turns it on if arg is positive, otherwise off." :lighter " Electric" (or (derived-mode-p 'nroff-mode) (error "Must be in nroff mode"))) diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index a20a482a1c9..3717faa8ad2 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el @@ -217,7 +217,7 @@ complex processing.") ;;;###autoload (define-minor-mode refill-mode "Toggle Refill minor mode. -With prefix arg, turn Refill mode on iff arg is positive. +With prefix arg, turn Refill mode on if arg is positive, otherwise turn it off. When Refill mode is on, the current paragraph will be formatted when changes are made within it. Self-inserting characters only cause diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index c551083240c..2a39949431c 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -431,7 +431,7 @@ the current TeX document. With no argument, this command toggles `reftex-isearch-minor-mode'. With a prefix argument ARG, turn -`reftex-isearch-minor-mode' on iff ARG is positive." +`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off." (interactive "P") (let ((old-reftex-isearch-minor-mode reftex-isearch-minor-mode)) (setq reftex-isearch-minor-mode diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 1c81a1e7028..9da49fcc599 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -757,7 +757,7 @@ With prefix argument ARG, repeat this ARG times." (defun sgml-skip-tag-forward (arg) "Skip to end of tag or matching closing tag if present. With prefix argument ARG, repeat this ARG times. -Return t iff after a closing tag." +Return t if after a closing tag." (interactive "p") ;; FIXME: Use sgml-get-context or something similar. ;; It currently might jump to an unrelated

if the

diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index eebd1923b63..e1f55c0dece 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el @@ -561,8 +561,10 @@ off trailing spaces with \\[delete-trailing-whitespace]." (newline arg)) (defun 2C-toggle-autoscroll (arg) - "Toggle autoscrolling, or set it iff prefix ARG is non-nil and positive. -When autoscrolling is turned on, this also realigns the two buffers." + "Toggle autoscrolling. +With prefix argument ARG, turn on autoscrolling if ARG is +positive, otherwise turn it off. When autoscrolling is turned +on, this also realigns the two buffers." (interactive "P") ;(sit-for 0) (setq 2C-autoscroll-start (window-start)) diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index c57a96cc81b..030409c3391 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -310,7 +310,7 @@ RATING a rating between 1 and 10 of the strength of the authentication. url-registered-auth-schemes))))) (defun url-auth-registered (scheme) - ;; Return non-nil iff SCHEME is registered as an auth type + "Return non-nil if SCHEME is registered as an auth type." (assoc scheme url-registered-auth-schemes)) (provide 'url-auth) diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el index 8fbe01d472a..6db30eacda9 100644 --- a/lisp/url/url-cache.el +++ b/lisp/url/url-cache.el @@ -186,7 +186,7 @@ Very fast if you have an `md5' primitive function, suitably fast otherwise." ;;;###autoload (defun url-cache-expired (url mod) - "Return t iff a cached file has expired." + "Return t if a cached file has expired." (let* ((urlobj (if (vectorp url) url (url-generic-parse-url url))) (type (url-type urlobj))) (cond diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index afae0041b68..b58c1672865 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -562,7 +562,7 @@ FAILURE-RESULTS is a list of (URL STATUS)." (defun url-dav-unlock-resource (url lock-token) "Release the lock on URL represented by LOCK-TOKEN. -Returns t iff the lock was successfully released." +Returns t if the lock was successfully released." (declare (special url-http-response-status)) (let* ((url-request-extra-headers (list (cons "Lock-Token" (concat "<" lock-token ">")))) @@ -654,13 +654,13 @@ Returns t iff the lock was successfully released." (or (plist-get properties 'DAV:getcontentlength) 0) ;; file modes as a string like `ls -l' - ;; + ;; ;; Should be able to build this up from the ;; DAV:supportedlock attribute pretty easily. Getting ;; the group info could be impossible though. (url-dav-file-attributes-mode-string properties) - ;; t iff file's gid would change if it were deleted & + ;; t if file's gid would change if it were deleted & ;; recreated. No way for us to know that thru DAV. nil diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index e899493f1ce..6e771c9cd69 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el @@ -52,7 +52,7 @@ to them." found)) (defun url-file-host-is-local-p (host) - "Return t iff HOST references our local machine." + "Return t if HOST references our local machine." (let ((case-fold-search t)) (or (null host) diff --git a/lisp/url/vc-dav.el b/lisp/url/vc-dav.el index ce0d3275a5f..7e9b6606ca4 100644 --- a/lisp/url/vc-dav.el +++ b/lisp/url/vc-dav.el @@ -31,7 +31,7 @@ ;;; Required functions for a vc backend (defun vc-dav-registered (url) - "Return t iff URL is registered with a DAV aware server." + "Return t if URL is registered with a DAV aware server." (url-dav-vc-registered url)) (defun vc-dav-state (url) From e7f767c25e3d7abd0a456c838d8c1747649aebff Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:34:30 +0000 Subject: [PATCH 062/105] Replace `iff' in doc-strings and comments. --- lisp/ChangeLog | 6 ++++++ lisp/gnus/gmm-utils.el | 2 +- lisp/gnus/gnus-async.el | 2 +- lisp/gnus/gnus-msg.el | 8 ++++---- lisp/gnus/gnus-score.el | 2 +- lisp/gnus/gnus-util.el | 2 +- lisp/gnus/imap.el | 2 +- lisp/gnus/mailcap.el | 6 +++--- lisp/gnus/nnimap.el | 2 +- lisp/net/tramp.el | 4 ++-- lisp/obsolete/fast-lock.el | 2 +- lisp/progmodes/antlr-mode.el | 6 +++--- lisp/progmodes/cc-awk.el | 2 +- lisp/progmodes/cc-engine.el | 2 +- lisp/progmodes/cc-vars.el | 2 +- lisp/progmodes/cperl-mode.el | 4 ++-- lisp/progmodes/cpp.el | 6 ++++-- lisp/progmodes/etags.el | 8 ++++---- lisp/progmodes/fortran.el | 2 +- lisp/progmodes/gdb-ui.el | 12 ++++++++---- lisp/progmodes/gud.el | 2 +- lisp/progmodes/hideshow.el | 6 +++--- lisp/progmodes/octave-mod.el | 10 +++++----- lisp/progmodes/python.el | 8 ++++---- lisp/progmodes/which-func.el | 2 +- lisp/progmodes/xscheme.el | 4 ++-- 26 files changed, 63 insertions(+), 51 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a40681aba8..65df7d26b15 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-08 Glenn Morris + + * emacs-lisp/checkdoc.el (checkdoc-ispell-lisp-words): Remove `iff'. + + * Replace `iff' in doc-strings and comments. + 2007-08-08 Martin Rudalics * dired.el (dired-pop-to-buffer): diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index d7e3c344b0e..71a0662f35a 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el @@ -79,7 +79,7 @@ ARGS are passed to `message'." ;;;###autoload (defun gmm-widget-p (symbol) - "Non-nil iff SYMBOL is a widget." + "Non-nil if SYMBOL is a widget." (get symbol 'widget-type)) ;; Copy of the `nnmail-lazy' code from `nnmail.el': diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 3493d51950d..a06724855c5 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el @@ -320,7 +320,7 @@ It should return non-nil if the article is to be prefetched." (pop alist)))))) (defun gnus-async-prefetched-article-entry (group article) - "Return the entry for ARTICLE in GROUP iff it has been prefetched." + "Return the entry for ARTICLE in GROUP if it has been prefetched." (let ((entry (save-excursion (gnus-async-set-buffer) (assq (intern (format "%s-%d" group article) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index c9aedab7019..f8e4a7a67d0 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -260,15 +260,15 @@ See also the `mml-default-encrypt-method' variable." This is done because new users often reply by mistake when reading news. This can also be a function receiving the group name as the only -parameter which should return non-nil iff a confirmation is needed, or -a regexp, in which case a confirmation is asked for iff the group name +parameter, which should return non-nil if a confirmation is needed; or +a regexp, in which case a confirmation is asked for if the group name matches the regexp." :version "22.1" :group 'gnus-message :type '(choice (const :tag "No" nil) (const :tag "Yes" t) - (regexp :tag "Iff group matches regexp") - (function :tag "Iff function evaluates to non-nil"))) + (regexp :tag "If group matches regexp") + (function :tag "If function evaluates to non-nil"))) (defcustom gnus-confirm-treat-mail-like-news nil diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index e833c8ccc6a..f7ba9222937 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -381,7 +381,7 @@ If nil, the user will be asked for a match type." (const :tag "ask" nil))) (defcustom gnus-score-default-fold nil - "Use case folding for new score file entries iff not nil." + "Non-nil means use case folding for new score file entries." :group 'gnus-score-default :type 'boolean) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index d065acd75ea..74aacdd2860 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1108,7 +1108,7 @@ Return the modified alist." `(setq ,alist (delq (,fun ,key ,alist) ,alist)))) (defun gnus-globalify-regexp (re) - "Return a regexp that matches a whole line, iff RE matches a part of it." + "Return a regexp that matches a whole line, if RE matches a part of it." (concat (unless (string-match "^\\^" re) "^.*") re (unless (string-match "\\$$" re) ".*$"))) diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index abe1c7e1c9e..f60801e9ba8 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -1581,7 +1581,7 @@ is non-nil return these properties." (imap-mailbox-get-1 'search imap-current-mailbox))))) (defun imap-message-flag-permanent-p (flag &optional mailbox buffer) - "Return t iff FLAG can be permanently (between IMAP sessions) saved on articles, in MAILBOX on server in BUFFER." + "Return t if FLAG can be permanently (between IMAP sessions) saved on articles, in MAILBOX on server in BUFFER." (with-current-buffer (or buffer (current-buffer)) (or (member "\\*" (imap-mailbox-get 'permanentflags mailbox)) (member flag (imap-mailbox-get 'permanentflags mailbox))))) diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 422b99d0e0f..e8b624aa546 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -538,7 +538,7 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus results))) (defun mailcap-mailcap-entry-passes-test (info) - "Return non-nil iff mailcap entry INFO passes its test clause. + "Return non-nil if mailcap entry INFO passes its test clause. Also return non-nil if no test clause is present." (let ((test (assq 'test info)) ; The test clause status) @@ -631,7 +631,7 @@ Also return non-nil if no test clause is present." (defvar mailcap-viewer-test-cache nil) (defun mailcap-viewer-passes-test (viewer-info type-info) - "Return non-nil iff viewer specified by VIEWER-INFO passes its test clause. + "Return non-nil if viewer specified by VIEWER-INFO passes its test clause. Also return non-nil if it has no test clause. TYPE-INFO is an argument to supply to the test." (let* ((test-info (assq 'test viewer-info)) @@ -704,7 +704,7 @@ If TEST is not given, it defaults to t." ;;; (defun mailcap-viewer-lessp (x y) - "Return t iff viewer X is more desirable than viewer Y." + "Return t if viewer X is more desirable than viewer Y." (let ((x-wild (string-match "[*?]" (or (cdr-safe (assq 'type x)) ""))) (y-wild (string-match "[*?]" (or (cdr-safe (assq 'type y)) ""))) (x-lisp (not (stringp (or (cdr-safe (assq 'viewer x)) "")))) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 235039c3ee9..ba23280658a 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1645,7 +1645,7 @@ be used in a STORE FLAGS command." result))) (defun nnimap-mark-permanent-p (mark &optional group) - "Return t iff MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." + "Return t if MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) (when nnimap-debug diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 09167d674eb..33026451722 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2436,7 +2436,7 @@ target of the symlink differ." res-size ;; 8. File modes, as a string of ten letters or dashes as in ls -l. res-filemodes - ;; 9. t iff file's gid would change if file were deleted and + ;; 9. t if file's gid would change if file were deleted and ;; recreated. Will be set in `tramp-convert-file-attributes' t ;; 10. inode number. @@ -7028,7 +7028,7 @@ Not actually used. Use `(format \"%o\" i)' instead?" (and (tramp-file-name-p obj) (aref obj 4))) (defun tramp-tramp-file-p (name) - "Return t iff NAME is a tramp file." + "Return t if NAME is a tramp file." (save-match-data (string-match tramp-file-name-regexp name))) diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index a2405b0edb2..569771143e3 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -523,7 +523,7 @@ See `fast-lock-cache-directories'." ;; Just a directory. directory) (t - ;; A directory iff the file name matches the regexp. + ;; A directory if the file name matches the regexp. (let ((bufile (expand-file-name buffer-file-truename)) (case-fold-search nil)) (when (save-match-data (string-match (car directory) bufile)) diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 7fbeeab6eea..594b628ad44 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -568,7 +568,7 @@ The standard value contains the following functions as READ-FN: general value, or `antlr-read-boolean' with ARGs = \(PROMPT TABLE) which reads a boolean value or a member of TABLE. PROMPT is the prompt when asking for a new value. If non-nil, TABLE is a table for completion or -a function evaluating to such a table. The return value is quoted iff +a function evaluating to such a table. The return value is quoted if AS-STRING is non-nil and is either t or a symbol which is a member of `antlr-options-style'.") @@ -2203,8 +2203,8 @@ part SUPER in the result of `antlr-file-dependencies'. CLASSES is the part \(CLASS-SPEC ...) in the result of `antlr-directory-dependencies'. The result looks like \(OPTION WITH-UNKNOWN GLIB ...). OPTION is the -complete \"-glib\" option. WITH-UNKNOWN has value t iff there is none -or more than one grammar file for at least one super grammar. +complete \"-glib\" option. WITH-UNKNOWN is t if there is none or more +than one grammar file for at least one super grammar. Each GLIB looks like \(GRAMMAR-FILE \. EVOCAB). GRAMMAR-FILE is a file in which a super-grammar is defined. EVOCAB is the value of the export diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 997e6c44f1a..33467671170 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -478,7 +478,7 @@ (defun c-awk-get-NL-prop-prev-line (&optional do-lim) ;; Get the c-awk-NL-prop text-property from the previous line, calculating - ;; it if necessary. Return nil iff we're already at BOB. + ;; it if necessary. Return nil if we're at BOB. ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM. ;; ;; This function might do hidden buffer changes. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 44463a07f15..97dcc61460f 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -5116,7 +5116,7 @@ comment at the start of cc-engine.el for more info." ;; Foo::Foo (int b) : Base (b) {} ;; car ^ ^ point ;; - ;; The cdr of the return value is non-nil iff a + ;; The cdr of the return value is non-nil if a ;; `c-typedef-decl-kwds' specifier is found in the declaration, ;; i.e. the declared identifier(s) are types. ;; diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index a80833c0043..76b0e5a898c 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -186,7 +186,7 @@ the value set here overrides the style system (there is a variable (bq-process type))))))))) (defun c-valid-offset (offset) - "Return non-nil iff OFFSET is a valid offset for a syntactic symbol. + "Return non-nil if OFFSET is a valid offset for a syntactic symbol. See `c-offsets-alist'." (or (eq offset '+) (eq offset '-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 3badfed5d4f..cd7dabb8825 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3558,7 +3558,7 @@ modify syntax-type text property if the situation is too hard." (modify-syntax-entry starter (if (eq starter ?\\) "\\" ".") st) (if ender (modify-syntax-entry ender "." st)))) ;; i: have 2 args, after end of the first arg - ;; i2: start of the second arg, if any (before delim iff `ender'). + ;; i2: start of the second arg, if any (before delim if `ender'). ;; ender: the last arg bounded by parens-like chars, the second one of them ;; starter: the starting delimiter of the first arg ;; go-forward: has 2 args, and the second part is empty @@ -8090,7 +8090,7 @@ prototype \\&SUB Returns prototype of the function given a reference. (defun cperl-beautify-regexp-piece (b e embed level) ;; b is before the starting delimiter, e before the ending ;; e should be a marker, may be changed, but remains "correct". - ;; EMBED is nil iff we process the whole REx. + ;; EMBED is nil if we process the whole REx. ;; The REx is guaranteed to have //x ;; LEVEL shows how many levels deep to go ;; position at enter and at leave is not defined diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index e85c4752412..05b8b59c00f 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -623,7 +623,8 @@ You can also use the keyboard accelerators indicated like this: [K]ey." (defun cpp-edit-toggle-known (arg) "Toggle writable status for known conditionals. -With optional argument ARG, make them writable iff ARG is positive." +With optional argument ARG, make them writable if ARG is positive, +otherwise make them unwritable." (interactive "@P") (if (or (and (null arg) cpp-known-writable) (<= (prefix-numeric-value arg) 0)) @@ -633,7 +634,8 @@ With optional argument ARG, make them writable iff ARG is positive." (defun cpp-edit-toggle-unknown (arg) "Toggle writable status for unknown conditionals. -With optional argument ARG, make them writable iff ARG is positive." +With optional argument ARG, make them writable if ARG is positive, +otherwise make them unwritable." (interactive "@P") (if (or (and (null arg) cpp-unknown-writable) (<= (prefix-numeric-value arg) 0)) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 196c22b4a08..96af63849a4 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -256,10 +256,10 @@ One argument, the tag info returned by `snarf-tag-function'.") (defvar tags-included-tables-function nil "Function to do the work of `tags-included-tables' (which see).") (defvar verify-tags-table-function nil - "Function to return t iff current buffer contains valid tags file.") + "Function to return t if current buffer contains valid tags file.") ;; Initialize the tags table in the current buffer. -;; Returns non-nil iff it is a valid tags table. On +;; Returns non-nil if it is a valid tags table. On ;; non-nil return, the tags table state variable are ;; made buffer-local and initialized to nil. (defun initialize-new-tags-table () @@ -417,7 +417,7 @@ file the tag was in." (defun tags-verify-table (file) "Read FILE into a buffer and verify that it is a valid tags table. Sets the current buffer to one visiting FILE (if it exists). -Returns non-nil iff it is a valid table." +Returns non-nil if it is a valid table." (if (get-file-buffer file) ;; The file is already in a buffer. Check for the visited file ;; having changed since we last used it. @@ -1219,8 +1219,8 @@ where they were found." (verify-tags-table-function . etags-verify-tags-table) )))) -;; Return non-nil iff the current buffer is a valid etags TAGS file. (defun etags-verify-tags-table () + "Return non-nil if the current buffer is a valid etags TAGS file." ;; Use eq instead of = in case char-after returns nil. (eq (char-after (point-min)) ?\f)) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index b9865613765..16992c54523 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1763,7 +1763,7 @@ If ALL is nil, only match comments that start in column > 0." ;; From: ralf@up3aud1.gwdg.de (Ralf Fassel) ;; Test if TAB format continuation lines work. (defun fortran-is-in-string-p (where) - "Return non-nil iff WHERE (a buffer position) is inside a Fortran string." + "Return non-nil if WHERE (a buffer position) is inside a Fortran string." (save-excursion (goto-char where) (cond diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 8f6be334465..c4d14462245 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -347,7 +347,8 @@ for `gdba'." (defun gdb-many-windows (arg) "Toggle the number of windows in the basic arrangement. -With arg, display additional buffers iff arg is positive." +With prefix argument ARG, display additional buffers if ARG is positive, +otherwise use a single window." (interactive "P") (setq gdb-many-windows (if (null arg) @@ -363,7 +364,8 @@ With arg, display additional buffers iff arg is positive." (defun gdb-use-separate-io-buffer (arg) "Toggle separate IO for debugged program. -With arg, use separate IO iff arg is positive." +With prefix argument ARG, use separate IO if ARG is positive, +otherwise do not." (interactive "P") (setq gdb-use-separate-io-buffer (if (null arg) @@ -664,7 +666,8 @@ line, and no execution takes place." (defun gdb-speedbar-auto-raise (arg) "Toggle automatic raising of the speedbar for watch expressions. -With arg, automatically raise speedbar iff arg is positive." +With prefix argument ARG, automatically raise speedbar if ARG is +positive, otherwise don't automatically raise it." (interactive "P") (setq gdb-speedbar-auto-raise (if (null arg) @@ -1381,7 +1384,8 @@ directives." (defun gdb-find-source-frame (arg) "Toggle trying to find a source frame further up stack. -With arg, look for a source frame further up stack iff arg is positive." +With prefix argument ARG, look for a source frame further up +stack if ARG is positive, otherwise don't look further up." (interactive "P") (setq gdb-find-source-frame (if (null arg) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ec5b901f691..06bdd6a0b5f 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3353,7 +3353,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") (defun gud-tooltip-dereference (&optional arg) "Toggle whether tooltips should show `* expr' or `expr'. -With arg, dereference expr iff arg is positive." +With arg, dereference expr if ARG is positive, otherwise do not derereference." (interactive "P") (setq gud-tooltip-dereference (if (null arg) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 3f2580a5d4b..fb990d6bf3a 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -262,7 +262,7 @@ One of the following symbols: t -- open both code and comment blocks nil -- open neither code nor comment blocks -This has effect iff `search-invisible' is set to `open'." +This has effect only if `search-invisible' is set to `open'." :type '(choice (const :tag "open only code blocks" code) (const :tag "open only comment blocks" comment) (const :tag "open both code and comment blocks" t) @@ -515,7 +515,7 @@ Optional arg REPOS-END means reposition at end." (goto-char (if repos-end end beg))) (defun hs-hide-block-at-point (&optional end comment-reg) - "Hide block iff on block beginning. + "Hide block if on block beginning. Optional arg END means reposition at end. Optional arg COMMENT-REG is a list of the form (BEGIN END) and specifies the limits of the comment, or nil if the block is not @@ -679,7 +679,7 @@ Return point, or nil if original point was not in a block." (goto-char maxp)) (defmacro hs-life-goes-on (&rest body) - "Evaluate BODY forms iff variable `hs-minor-mode' is non-nil. + "Evaluate BODY forms if variable `hs-minor-mode' is non-nil. In the dynamic context of this macro, `inhibit-point-motion-hooks' and `case-fold-search' are both t." `(when hs-minor-mode diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index adc1b44edaa..3da3434cda2 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -567,24 +567,24 @@ including a reproducible test case and send the message." (describe-function major-mode)) (defsubst octave-in-comment-p () - "Returns t if point is inside an Octave comment, nil otherwise." + "Return t if point is inside an Octave comment." (interactive) (save-excursion (nth 4 (parse-partial-sexp (line-beginning-position) (point))))) (defsubst octave-in-string-p () - "Returns t if point is inside an Octave string, nil otherwise." + "Return t if point is inside an Octave string." (interactive) (save-excursion (nth 3 (parse-partial-sexp (line-beginning-position) (point))))) (defsubst octave-not-in-string-or-comment-p () - "Returns t iff point is not inside an Octave string or comment." + "Return t if point is not inside an Octave string or comment." (let ((pps (parse-partial-sexp (line-beginning-position) (point)))) (not (or (nth 3 pps) (nth 4 pps))))) (defun octave-in-block-p () - "Returns t if point is inside an Octave block, nil otherwise. + "Return t if point is inside an Octave block. The block is taken to start at the first letter of the begin keyword and to end after the end keyword." (let ((pos (point))) @@ -599,7 +599,7 @@ to end after the end keyword." (< pos (point))))) (defun octave-in-defun-p () - "Returns t iff point is inside an Octave function declaration. + "Return t if point is inside an Octave function declaration. The function is taken to start at the `f' of `function' and to end after the end keyword." (let ((pos (point))) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ca18f772970..7c1abaf223d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -348,7 +348,7 @@ comments and strings, or that point is within brackets/parens." (error nil)))))))) (defun python-comment-line-p () - "Return non-nil iff current line has only a comment." + "Return non-nil if current line has only a comment." (save-excursion (end-of-line) (when (eq 'comment (syntax-ppss-context (syntax-ppss))) @@ -356,7 +356,7 @@ comments and strings, or that point is within brackets/parens." (looking-at (rx (or (syntax comment-start) line-end)))))) (defun python-blank-line-p () - "Return non-nil iff current line is blank." + "Return non-nil if current line is blank." (save-excursion (beginning-of-line) (looking-at "\\s-*$"))) @@ -850,7 +850,7 @@ multi-line bracketed expressions." "Skip out of any nested brackets. Skip forward if FORWARD is non-nil, else backward. If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. -Return non-nil iff skipping was done." +Return non-nil if skipping was done." (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) (forward (if forward -1 1))) (unless (zerop depth) @@ -1191,7 +1191,7 @@ local value.") (define-key map "\C-c\C-l" 'python-load-file) (define-key map "\C-c\C-v" 'python-check) ;; Note that we _can_ still use these commands which send to the - ;; Python process even at the prompt iff we have a normal prompt, + ;; Python process even at the prompt provided we have a normal prompt, ;; i.e. '>>> ' and not '... '. See the comment before ;; python-send-region. Fixme: uncomment these if we address that. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 922de2d54c6..7d953be1d5c 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -232,7 +232,7 @@ It creates the Imenu index for the buffer, if necessary." When Which Function mode is enabled, the current function name is continuously displayed in the mode line, in certain major modes. -With prefix ARG, turn Which Function mode on iff arg is positive, +With prefix ARG, turn Which Function mode on if arg is positive, and off otherwise." :global t :group 'which-func (if which-function-mode diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 0beca9e985e..a820ca4cede 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -868,7 +868,7 @@ Control returns to the top level rep loop." (sleep-for 1))) (defun xscheme-process-running-p () - "True iff there is a Scheme process whose status is `run'." + "True if there is a Scheme process whose status is `run'." (let ((process (get-process xscheme-process-name))) (and process (eq (process-status process) 'run)))) @@ -882,7 +882,7 @@ Control returns to the top level rep loop." (and buffer (get-buffer-window buffer)))) (defun xscheme-process-buffer-current-p () - "True iff the current buffer is the Scheme process buffer." + "True if the current buffer is the Scheme process buffer." (eq (xscheme-process-buffer) (current-buffer))) ;;;; Process Filter Operations From 5453fa41122e3278a442f4fab855561e41f4034f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:37:59 +0000 Subject: [PATCH 063/105] Remove time-stamp. Replace `iff' in doc-strings and comments. --- lisp/winner.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/winner.el b/lisp/winner.el index bc7503b963c..ed840d37622 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -5,7 +5,6 @@ ;; Author: Ivar Rummelhoff ;; Created: 27 Feb 1997 -;; Time-stamp: <2006-02-06 15:13:57 ttn> ;; Keywords: convenience frames ;; This file is part of GNU Emacs. @@ -286,7 +285,7 @@ You may want to include buffer names such as *Help*, *Apropos*, (defun winner-get-point (buf win) ;; Consult (and possibly extend) `winner-point-alist'. - ;; Returns nil iff buf no longer exists. + ;; Returns nil if buf no longer exists. (when (buffer-name buf) (let ((entry (assq buf winner-point-alist))) (cond @@ -306,7 +305,7 @@ You may want to include buffer names such as *Help*, *Apropos*, ;; Make sure point does not end up in the minibuffer and delete ;; windows displaying dead or boring buffers -;; (c.f. `winner-boring-buffers'). Return nil iff all the windows +;; (c.f. `winner-boring-buffers'). Return nil if all the windows ;; should be deleted. Preserve correct points and marks. (defun winner-set (conf) ;; For the format of `conf', see `winner-conf'. From 4837b516ea56c6cc2b3ce823b04078b10b2defc6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:40:09 +0000 Subject: [PATCH 064/105] Replace `iff' in doc-strings and comments. --- lisp/abbrev.el | 6 +++--- lisp/allout.el | 5 +++-- lisp/autorevert.el | 2 +- lisp/bindings.el | 2 +- lisp/custom.el | 10 ++++----- lisp/diff.el | 3 ++- lisp/dired-aux.el | 4 ++-- lisp/double.el | 3 ++- lisp/ediff-diff.el | 4 ++-- lisp/files.el | 7 +++--- lisp/font-lock.el | 6 +++--- lisp/frame.el | 6 +++--- lisp/hilit-chg.el | 2 +- lisp/ibuf-ext.el | 2 +- lisp/ibuffer.el | 4 ++-- lisp/icomplete.el | 5 +++-- lisp/ido.el | 2 +- lisp/image.el | 2 +- lisp/imenu.el | 2 +- lisp/info-look.el | 2 +- lisp/isearch.el | 4 ++-- lisp/iswitchb.el | 6 +++--- lisp/log-edit.el | 2 +- lisp/printing.el | 6 +++--- lisp/select.el | 2 +- lisp/shadowfile.el | 2 +- lisp/simple.el | 53 +++++++++++++++++++++++----------------------- lisp/skeleton.el | 4 ++-- lisp/strokes.el | 4 ++-- lisp/t-mouse.el | 3 ++- lisp/term.el | 2 +- lisp/userlock.el | 2 +- lisp/vc.el | 2 +- lisp/view.el | 3 ++- lisp/whitespace.el | 2 +- lisp/wid-edit.el | 6 +++--- lisp/window.el | 10 ++++----- lisp/xt-mouse.el | 3 ++- mac/inc/m-mac.h | 2 +- man/ChangeLog | 5 +++++ 40 files changed, 108 insertions(+), 94 deletions(-) diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 1471ca7bebd..b2b03fe63bb 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -39,9 +39,9 @@ define global abbrevs instead." (defun abbrev-mode (&optional arg) "Toggle Abbrev mode in the current buffer. -With argument ARG, turn abbrev mode on iff ARG is positive. -In Abbrev mode, inserting an abbreviation causes it to expand -and be replaced by its expansion." +With optional argument ARG, turn abbrev mode on if ARG is +positive, otherwise turn it off. In Abbrev mode, inserting an +abbreviation causes it to expand and be replaced by its expansion." (interactive "P") (setq abbrev-mode (if (null arg) (not abbrev-mode) diff --git a/lisp/allout.el b/lisp/allout.el index f6598063e97..d243a188812 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -1658,8 +1658,9 @@ the following two lines in your Emacs init file: "Toggle minor mode for controlling exposure and editing of text outlines. \\ -Optional arg forces mode to re-initialize iff arg is positive num or -symbol. Allout outline mode always runs as a minor mode. +Optional prefix argument TOGGLE forces the mode to re-initialize +if it is positive, otherwise it turns the mode off. Allout +outline mode always runs as a minor mode. Allout outline mode provides extensive outline oriented formatting and manipulation. It enables structural editing of outlines, as well as diff --git a/lisp/autorevert.el b/lisp/autorevert.el index cad94e789d6..5220f3f6dea 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -315,7 +315,7 @@ This function is designed to be added to hooks, for example: ;;;###autoload (define-minor-mode auto-revert-tail-mode "Toggle reverting tail of buffer when file on disk grows. -With arg, turn Tail mode on iff arg is positive. +With arg, turn Tail mode on if arg is positive, otherwise turn it off. When Tail mode is enabled, the tail of the file is constantly followed, as with the shell command `tail -f'. This means that diff --git a/lisp/bindings.el b/lisp/bindings.el index 4ce58c204eb..3c7237a52fa 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -476,7 +476,7 @@ Menu of mode operations in the mode line.") (defvar minor-mode-alist nil "\ Alist saying how to show minor modes in the mode line. Each element looks like (VARIABLE STRING); -STRING is included in the mode line iff VARIABLE's value is non-nil. +STRING is included in the mode line if VARIABLE's value is non-nil. Actually, STRING need not be a string; any possible mode-line element is okay. See `mode-line-format'.") diff --git a/lisp/custom.el b/lisp/custom.el index c50fcb05f42..e5925dd18d0 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -642,7 +642,7 @@ this sets the local binding in that buffer instead." (funcall variable (if value 1 0)))) (defun custom-quote (sexp) - "Quote SEXP iff it is not self quoting." + "Quote SEXP if it is not self quoting." (if (or (memq sexp '(t nil)) (keywordp sexp) (and (listp sexp) @@ -665,14 +665,14 @@ default value. Otherwise, set it to nil. To actually save the value, call `custom-save-all'. -Return non-nil iff the `saved-value' property actually changed." +Return non-nil if the `saved-value' property actually changed." (custom-load-symbol symbol) (let* ((get (or (get symbol 'custom-get) 'default-value)) (value (funcall get symbol)) (saved (get symbol 'saved-value)) (standard (get symbol 'standard-value)) (comment (get symbol 'customized-variable-comment))) - ;; Save default value iff different from standard value. + ;; Save default value if different from standard value. (if (or (null standard) (not (equal value (condition-case nil (eval (car standard)) @@ -694,13 +694,13 @@ or else if it is different from the standard value, set the `customized-value' property to a list whose car evaluates to the default value. Otherwise, set it to nil. -Return non-nil iff the `customized-value' property actually changed." +Return non-nil if the `customized-value' property actually changed." (custom-load-symbol symbol) (let* ((get (or (get symbol 'custom-get) 'default-value)) (value (funcall get symbol)) (customized (get symbol 'customized-value)) (old (or (get symbol 'saved-value) (get symbol 'standard-value)))) - ;; Mark default value as set iff different from old value. + ;; Mark default value as set if different from old value. (if (not (and old (equal value (condition-case nil (eval (car old)) diff --git a/lisp/diff.el b/lisp/diff.el index c612b2fb77c..75ae34d5f2a 100644 --- a/lisp/diff.el +++ b/lisp/diff.el @@ -62,7 +62,8 @@ (defun diff-sentinel (code) "Code run when the diff process exits. -CODE is the exit code of the process. It should be 0 iff no diffs were found." +CODE is the exit code of the process. It should be 0 only if no diffs +were found." (if diff-old-temp-file (delete-file diff-old-temp-file)) (if diff-new-temp-file (delete-file diff-new-temp-file)) (save-excursion diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index fd57c4b8885..4d9849cd534 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2006,8 +2006,8 @@ of marked files. If KILL-ROOT is non-nil, kill DIRNAME as well." (defun dired-tree-lessp (dir1 dir2) ;; Lexicographic order on file name components, like `ls -lR': - ;; DIR1 < DIR2 iff DIR1 comes *before* DIR2 in an `ls -lR' listing, - ;; i.e., iff DIR1 is a (grand)parent dir of DIR2, + ;; DIR1 < DIR2 if DIR1 comes *before* DIR2 in an `ls -lR' listing, + ;; i.e., if DIR1 is a (grand)parent dir of DIR2, ;; or DIR1 and DIR2 are in the same parentdir and their last ;; components are string-lessp. ;; Thus ("/usr/" "/usr/bin") and ("/usr/a/" "/usr/b/") are tree-lessp. diff --git a/lisp/double.el b/lisp/double.el index 4b1d59ff1ec..0b5cf110fbd 100644 --- a/lisp/double.el +++ b/lisp/double.el @@ -186,7 +186,8 @@ use either \\[customize] or the function `double-mode'." ;;;###autoload (defun double-mode (arg) "Toggle Double mode. -With prefix arg, turn Double mode on iff arg is positive. +With prefix argument ARG, turn Double mode on if ARG is positive, otherwise +turn it off. When Double mode is on, some keys will insert different strings when pressed twice. See variable `double-map' for details." diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 48cd7c79d4e..ec153fde625 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el @@ -867,7 +867,7 @@ one optional arguments, diff-number to refine.") (ediff-make-fine-diffs n 'noforce) (ediff-make-fine-diffs n 'skip))) - ;; highlight iff fine diffs already exist + ;; highlight if fine diffs already exist ((eq ediff-auto-refine 'off) (ediff-make-fine-diffs n 'skip)))) @@ -1459,7 +1459,7 @@ arguments to `skip-chars-forward'." (defun ediff-same-contents (d1 d2 &optional filter-re) - "Returns t iff D1 and D2 have the same content. + "Return t if D1 and D2 have the same content. D1 and D2 can either be both directories or both regular files. Symlinks and the likes are not handled. If FILTER-RE is non-nil, recursive checking in directories diff --git a/lisp/files.el b/lisp/files.el index dfa3cef384d..4d952f3f935 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3941,8 +3941,9 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'." (defun toggle-read-only (&optional arg) "Change whether this buffer is visiting its file read-only. -With arg, set read-only iff arg is positive. -If visiting file read-only and `view-read-only' is non-nil, enter view mode." +With prefix argument ARG, make the buffer read-only if ARG is +positive, otherwise make it writable. If visiting file read-only +and `view-read-only' is non-nil, enter view mode." (interactive "P") (if (and arg (if (> (prefix-numeric-value arg) 0) buffer-read-only @@ -4568,7 +4569,7 @@ FILENAME should lack slashes. You can redefine this for customization." (defun wildcard-to-regexp (wildcard) "Given a shell file name pattern WILDCARD, return an equivalent regexp. -The generated regexp will match a filename iff the filename +The generated regexp will match a filename only if the filename matches that wildcard according to shell rules. Only wildcards known by `sh' are supported." (let* ((i (string-match "[[.*+\\^$?]" wildcard)) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 9eb4fdde2df..6bc5fd8716f 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -355,7 +355,7 @@ Each element in a user-level keywords list should have one of these forms: where MATCHER can be either the regexp to search for, or the function name to call to make the search (called with one argument, the limit of the search; -it should return non-nil, move point, and set `match-data' appropriately iff +it should return non-nil, move point, and set `match-data' appropriately if it succeeds; like `re-search-forward' would). MATCHER regexps can be generated via the function `regexp-opt'. @@ -1068,7 +1068,7 @@ that tries to find such elements and move the boundaries such that they do not fall in the middle of one. Each function is called with no argument; it is expected to adjust the dynamically bound variables `font-lock-beg' and `font-lock-end'; and return -non-nil iff it did make such an adjustment. +non-nil if it did make such an adjustment. These functions are run in turn repeatedly until they all return nil. Put first the functions more likely to cause a change and cheaper to compute.") ;; Mark it as a special hook which doesn't use any global setting @@ -1746,7 +1746,7 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to "Set fontification defaults appropriately for this mode. Sets various variables using `font-lock-defaults' (or, if nil, using `font-lock-defaults-alist') and `font-lock-maximum-decoration'." - ;; Set fontification defaults iff not previously set for correct major mode. + ;; Set fontification defaults if not previously set for correct major mode. (unless (and font-lock-set-defaults (eq font-lock-mode-major-mode major-mode)) (setq font-lock-mode-major-mode major-mode) diff --git a/lisp/frame.el b/lisp/frame.el index 13c42ed5ad1..97133dee87c 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1310,9 +1310,9 @@ itself as a pre-command hook." (define-minor-mode blink-cursor-mode "Toggle blinking cursor mode. -With a numeric argument, turn blinking cursor mode on iff ARG is positive. -When blinking cursor mode is enabled, the cursor of the selected -window blinks. +With a numeric argument, turn blinking cursor mode on if ARG is positive, +otherwise turn it off. When blinking cursor mode is enabled, the +cursor of the selected window blinks. Note that this command is effective only when Emacs displays through a window system, because then Emacs does its own diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index b1238b66419..a167b2bc1e7 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -131,7 +131,7 @@ ;; an example, if the value is `buffer-file-name' then all buffers ;; who are visiting files are suitable, but others (like dired ;; buffers) are not; -;; * a list -- then the buffer is suitable iff its mode is in the +;; * a list -- then the buffer is suitable if its mode is in the ;; list, except if the first element is `not', in which case the test ;; is reversed (i.e. it is a list of unsuitable modes). ;; * Otherwise, the buffer is suitable if its name does not begin with diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index b077342e5f5..7847bed6f2d 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1331,7 +1331,7 @@ If a buffer has no filename, it is ignored. With no prefix arg, use the filename sans its directory of each marked file. With a zero prefix arg, use the complete filename of each marked file. With \\[universal-argument], use the filename of each marked file relative -to `ibuffer-default-directory' iff non-nil, otherwise `default-directory'. +to `ibuffer-default-directory' if non-nil, otherwise `default-directory'. You can then feed the file name(s) to other commands with \\[yank]." (interactive "p") diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index c4842b9d982..80133d227ab 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1835,7 +1835,7 @@ If point is on a group name, this function operates on that group." (defun ibuffer-map-lines (function &optional nomodify group) "Call FUNCTION for each buffer. -Don't set the ibuffer modification flag iff NOMODIFY is non-nil. +Set the ibuffer modification flag unless NOMODIFY is non-nil. If optional argument GROUP is non-nil, then only call FUNCTION on buffers in filtering group GROUP. @@ -2267,7 +2267,7 @@ If optional arg SILENT is non-nil, do not display progress messages." (defun ibuffer-quit () "Quit this `ibuffer' session. -Try to restore the previous window configuration iff +Try to restore the previous window configuration if `ibuffer-restore-window-config-on-quit' is non-nil." (interactive) (if ibuffer-restore-window-config-on-quit diff --git a/lisp/icomplete.el b/lisp/icomplete.el index d1e8f9cc3f8..44c854f2f46 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -99,7 +99,7 @@ completions - see `icomplete-delay-completions-threshold'." (defcustom icomplete-minibuffer-setup-hook nil "*Icomplete-specific customization of minibuffer setup. -This hook is run during minibuffer setup iff icomplete will be active. +This hook is run during minibuffer setup if icomplete is active. It is intended for use in customizing icomplete for interoperation with other features and packages. For instance: @@ -168,7 +168,8 @@ except those on this list.") ;;;###autoload (define-minor-mode icomplete-mode "Toggle incremental minibuffer completion for this Emacs session. -With a numeric argument, turn Icomplete mode on iff ARG is positive." +With a numeric argument, turn Icomplete mode on if ARG is positive, +otherwise turn it off." :global t :group 'icomplete (if icomplete-mode ;; The following is not really necessary after first time - diff --git a/lisp/ido.el b/lisp/ido.el index e5c4b644f95..ca44e99b594 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -898,7 +898,7 @@ See documentation of `walk-windows' for useful values.") (defcustom ido-minibuffer-setup-hook nil "*Ido-specific customization of minibuffer setup. -This hook is run during minibuffer setup iff `ido' will be active. +This hook is run during minibuffer setup if `ido' is active. It is intended for use in customizing ido for interoperation with other packages. For instance: diff --git a/lisp/image.el b/lisp/image.el index cf909da0e95..480b5610311 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -342,7 +342,7 @@ Image types are symbols like `xbm' or `jpeg'." ;;;###autoload (defun image-type-auto-detected-p () - "Return t iff the current buffer contains an auto-detectable image. + "Return t if the current buffer contains an auto-detectable image. This function is intended to be used from `magic-fallback-mode-alist'. The buffer is considered to contain an auto-detectable image if diff --git a/lisp/imenu.el b/lisp/imenu.el index 9aa1f5ea088..6c1de967e66 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -727,7 +727,7 @@ definitions, etc. It contains a substring which is the name to appear in the menu. See the info section on Regexps for more information. REGEXP may also be a function, called without arguments. It is expected to search backwards. It shall return -true and set `match-data' iff it finds another element. +true and set `match-data' if it finds another element. INDEX points to the substring in REGEXP that contains the name (of the function, variable or type) that is to appear in the diff --git a/lisp/info-look.el b/lisp/info-look.el index 8ace7730a12..4ed13ba08e0 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -144,7 +144,7 @@ to `symbol', and the help mode defaults to the current major mode." (apply 'info-lookup-add-help* nil arg)) (defun info-lookup-maybe-add-help (&rest arg) - "Add a help specification iff none is defined. + "Add a help specification if none is defined. See the documentation of the function `info-lookup-add-help' for more details." (apply 'info-lookup-add-help* t arg)) diff --git a/lisp/isearch.el b/lisp/isearch.el index 7b90e319766..cc68ee297bd 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -819,7 +819,7 @@ NOPUSH is t and EDIT is t." (run-hooks 'isearch-mode-end-hook)) ;; If there was movement, mark the starting position. - ;; Maybe should test difference between and set mark iff > threshold. + ;; Maybe should test difference between and set mark only if > threshold. (if (/= (point) isearch-opoint) (or (and transient-mark-mode mark-active) (progn @@ -2321,7 +2321,7 @@ since they have special meaning in a regexp." ;; - the direction of the current search is expected to be given by ;; `isearch-forward'; ;; - the variable `isearch-error' is expected to be true -;; iff `isearch-string' is an invalid regexp. +;; only if `isearch-string' is an invalid regexp. (defvar isearch-lazy-highlight-overlays nil) (defvar isearch-lazy-highlight-wrapped nil) diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 068f5fff2cd..233997285c9 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -396,7 +396,7 @@ See documentation of `walk-windows' for useful values.") (defcustom iswitchb-minibuffer-setup-hook nil "Iswitchb-specific customization of minibuffer setup. -This hook is run during minibuffer setup iff `iswitchb' will be active. +This hook is run during minibuffer setup if `iswitchb' is active. For instance: \(add-hook 'iswitchb-minibuffer-setup-hook '\(lambda () (set (make-local-variable 'max-mini-window-height) 3))) @@ -1440,7 +1440,7 @@ This is an example function which can be hooked on to (iswitchb-to-end summaries))) (defun iswitchb-case () - "Return non-nil iff we should ignore case when matching. + "Return non-nil if we should ignore case when matching. See the variable `iswitchb-case' for details." (if iswitchb-case (if (featurep 'xemacs) @@ -1450,7 +1450,7 @@ See the variable `iswitchb-case' for details." ;;;###autoload (define-minor-mode iswitchb-mode "Toggle Iswitchb global minor mode. -With arg, turn Iswitchb mode on if and only iff ARG is positive. +With arg, turn Iswitchb mode on if ARG is positive, otherwise turn it off. This mode enables switching between buffers using substrings. See `iswitchb' for details." nil nil iswitchb-global-map :global t :group 'iswitchb diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 94d97abc8a5..c8ee5db812b 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -568,7 +568,7 @@ for more details." (defvar user-mail-address) (defun log-edit-changelog-ours-p () "See if ChangeLog entry at point is for the current user, today. -Return non-nil iff it is." +Return non-nil if it is." ;; Code adapted from add-change-log-entry. (let ((name (or (and (boundp 'add-log-full-name) add-log-full-name) (and (fboundp 'user-full-name) (user-full-name)) diff --git a/lisp/printing.el b/lisp/printing.el index f84a2112661..412f0b342fc 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -4943,9 +4943,9 @@ See `pr-visible-entry-alist'.") If FORCE is non-nil, update menus doesn't matter if `pr-ps-printer-alist', `pr-txt-printer-alist' or `pr-ps-utility-alist' were modified or not; -otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is -non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is -non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is +otherwise, update PostScript printer menu if `pr-ps-printer-menu-modified' is +non-nil, update text printer menu if `pr-txt-printer-menu-modified' is +non-nil, and update PostScript File menus if `pr-ps-utility-menu-modified' is non-nil. If menu binding was not done, calls `pr-menu-bind'." diff --git a/lisp/select.el b/lisp/select.el index b1fa729a664..60259142522 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -178,7 +178,7 @@ Cut buffers are considered obsolete; you should use selections instead." If it is valid, set the register `r0' to 1, else set it to 0.") (defun string-utf-8-p (string) - "Return non-nil iff STRING is a unibyte string of valid UTF-8 sequence." + "Return non-nil if STRING is a unibyte string of valid UTF-8 sequence." (if (or (not (stringp string)) (multibyte-string-p string)) (error "Not a unibyte string: %s" string)) diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index ee6dcc15b7e..d1de8be3910 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el @@ -285,7 +285,7 @@ information defining the cluster. For interactive use, call ans))) (defun shadow-site-match (site1 site2) - "Non-nil iff SITE1 is or includes SITE2. + "Non-nil if SITE1 is or includes SITE2. Each may be a host or cluster name; if they are clusters, regexp of SITE1 will be matched against the primary of SITE2." (or (string-equal site1 site2) ; quick check diff --git a/lisp/simple.el b/lisp/simple.el index 6148a917f59..b71dffd3c35 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4343,8 +4343,9 @@ The variable `selective-display' has a separate value for each buffer." (defun toggle-truncate-lines (&optional arg) "Toggle whether to fold or truncate long lines for the current buffer. -With arg, truncate long lines iff arg is positive. -Note that in side-by-side windows, truncation is always enabled." +With prefix argument ARG, truncate long lines if ARG is positive, +otherwise don't truncate them. Note that in side-by-side +windows, truncation is always enabled." (interactive "P") (setq truncate-lines (if (null arg) @@ -4367,11 +4368,11 @@ Note that in side-by-side windows, truncation is always enabled." (defun overwrite-mode (arg) "Toggle overwrite mode. -With arg, turn overwrite mode on iff arg is positive. -In overwrite mode, printing characters typed in replace existing text -on a one-for-one basis, rather than pushing it to the right. At the -end of a line, such characters extend the line. Before a tab, -such characters insert until the tab is filled in. +With prefix argument ARG, turn overwrite mode on if ARG is positive, +otherwise turn it off. In overwrite mode, printing characters typed +in replace existing text on a one-for-one basis, rather than pushing +it to the right. At the end of a line, such characters extend the line. +Before a tab, such characters insert until the tab is filled in. \\[quoted-insert] still inserts characters in overwrite mode; this is supposed to make it easier to insert characters when necessary." (interactive "P") @@ -4383,14 +4384,13 @@ is supposed to make it easier to insert characters when necessary." (defun binary-overwrite-mode (arg) "Toggle binary overwrite mode. -With arg, turn binary overwrite mode on iff arg is positive. -In binary overwrite mode, printing characters typed in replace -existing text. Newlines are not treated specially, so typing at the -end of a line joins the line to the next, with the typed character -between them. Typing before a tab character simply replaces the tab -with the character typed. -\\[quoted-insert] replaces the text at the cursor, just as ordinary -typing characters do. +With prefix argument ARG, turn binary overwrite mode on if ARG is +positive, otherwise turn it off. In binary overwrite mode, printing +characters typed in replace existing text. Newlines are not treated +specially, so typing at the end of a line joins the line to the next, +with the typed character between them. Typing before a tab character +simply replaces the tab with the character typed. \\[quoted-insert] +replaces the text at the cursor, just as ordinary typing characters do. Note that binary overwrite mode is not its own minor mode; it is a specialization of overwrite mode, entered by setting the @@ -4405,9 +4405,9 @@ specialization of overwrite mode, entered by setting the (define-minor-mode line-number-mode "Toggle Line Number mode. -With arg, turn Line Number mode on iff arg is positive. -When Line Number mode is enabled, the line number appears -in the mode line. +With arg, turn Line Number mode on if arg is positive, otherwise +turn it off. When Line Number mode is enabled, the line number +appears in the mode line. Line numbers do not appear for very large buffers and buffers with very long lines; see variables `line-number-display-limit' @@ -4416,16 +4416,16 @@ and `line-number-display-limit-width'." (define-minor-mode column-number-mode "Toggle Column Number mode. -With arg, turn Column Number mode on iff arg is positive. -When Column Number mode is enabled, the column number appears -in the mode line." +With arg, turn Column Number mode on if arg is positive, +otherwise turn it off. When Column Number mode is enabled, the +column number appears in the mode line." :global t :group 'mode-line) (define-minor-mode size-indication-mode "Toggle Size Indication mode. -With arg, turn Size Indication mode on iff arg is positive. When -Size Indication mode is enabled, the size of the accessible part -of the buffer appears in the mode line." +With arg, turn Size Indication mode on if arg is positive, +otherwise turn it off. When Size Indication mode is enabled, the +size of the accessible part of the buffer appears in the mode line." :global t :group 'mode-line) (defgroup paren-blinking nil @@ -4960,7 +4960,7 @@ With prefix argument N, move N items (negative N means move backward)." These functions are called in order with four arguments: CHOICE - the string to insert in the buffer, BUFFER - the buffer in which the choice should be inserted, -MINI-P - non-nil iff BUFFER is a minibuffer, and +MINI-P - non-nil if BUFFER is a minibuffer, and BASE-SIZE - the number of characters in BUFFER before the string being completed. @@ -5568,7 +5568,8 @@ See also `normal-erase-is-backspace'." (define-minor-mode visible-mode "Toggle Visible mode. -With argument ARG turn Visible mode on iff ARG is positive. +With argument ARG turn Visible mode on if ARG is positive, otherwise +turn it off. Enabling Visible mode makes all invisible text temporarily visible. Disabling Visible mode turns off that effect. Visible mode diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 33e223e4b2b..4425bb0389a 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -209,8 +209,8 @@ If ELEMENT is a string or a character it gets inserted (see also interesting point set by _ > indent line (or interregion if > _) according to major mode @ add position to `skeleton-positions' - & do next ELEMENT iff previous moved point - | do next ELEMENT iff previous didn't move point + & do next ELEMENT if previous moved point + | do next ELEMENT if previous didn't move point -num delete num preceding characters (see `skeleton-untabify') resume: skipped, continue here if quit is signaled nil skipped diff --git a/lisp/strokes.el b/lisp/strokes.el index 528ea477363..de4123453f5 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1370,7 +1370,7 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead." (goto-char (point-min)))) (defun strokes-alphabetic-lessp (stroke1 stroke2) - "T iff command name for STROKE1 is less than STROKE2's in lexicographic order." + "T if command name for STROKE1 is less than STROKE2's in lexicographic order." (let ((command-name-1 (symbol-name (cdr stroke1))) (command-name-2 (symbol-name (cdr stroke2)))) (string-lessp command-name-1 command-name-2))) @@ -1520,7 +1520,7 @@ Encode/decode your strokes with \\[strokes-encode-buffer], (eq char ?*))) ;;(defsubst strokes-xor (a b) ### Should I make this an inline function? ### -;; "T iff one and only one of A and B is non-nil; otherwise, returns nil. +;; "T if one and only one of A and B is non-nil; otherwise, returns nil. ;;NOTE: Don't use this as a numeric xor since it treats all non-nil ;; values as t including `0' (zero)." ;; (eq (null a) (not (null b)))) diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index 12129d93602..99e42fe288b 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el @@ -271,7 +271,8 @@ The (secret) scrollbar interface is not implemented yet." ;;;###autoload (define-minor-mode t-mouse-mode "Toggle t-mouse mode to use the mouse in Linux consoles. -With prefix arg, turn t-mouse mode on iff arg is positive. +With prefix arg, turn t-mouse mode on if arg is positive, otherwise turn it +off. This allows the use of the mouse when operating on a Linux console, in the same way as you can use the mouse under X11. diff --git a/lisp/term.el b/lisp/term.el index 4d1c660543a..370f643225b 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -470,7 +470,7 @@ (defvar term-scroll-with-delete nil) ;; term-scroll-with-delete is t if ;; forward scrolling should be implemented by delete to ;; top-most line(s); and nil if scrolling should be implemented -;; by moving term-home-marker. It is set to t iff there is a +;; by moving term-home-marker. It is set to t if there is a ;; (non-default) scroll-region OR the alternate buffer is used. (defvar term-pending-delete-marker) ;; New user input in line mode needs to ;; be deleted, because it gets echoed by the inferior. diff --git a/lisp/userlock.el b/lisp/userlock.el index 17cbc0c3e55..8e4a6753a31 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -134,7 +134,7 @@ The buffer in question is current when this function is called." (setq answer nil)) ((eq answer 'revert) (revert-buffer nil (not (buffer-modified-p))) - ; ask confirmation iff buffer modified + ; ask confirmation if buffer modified (signal 'file-supersession (list "File reverted" fn))) ((eq answer 'yield) diff --git a/lisp/vc.el b/lisp/vc.el index 835d2c50685..9065b2d2bcd 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1103,7 +1103,7 @@ Used by `vc-restore-buffer-context' to later restore the context." ;; ;; We may want to reparse the compilation buffer after revert ;; (reparse (and (boundp 'compilation-error-list) ;compile loaded ;; ;; Construct a list; each elt is nil or a buffer - ;; ;; iff that buffer is a compilation output buffer + ;; ;; if that buffer is a compilation output buffer ;; ;; that contains markers into the current buffer. ;; (save-current-buffer ;; (mapcar (lambda (buffer) diff --git a/lisp/view.el b/lisp/view.el index 2f541fbf360..f6722f53756 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -375,7 +375,8 @@ Use this argument instead of explicitly setting `view-exit-action'." ;; bindings instead of using the \\[] construction. The reason for this ;; is that most commands have more than one key binding. "Toggle View mode, a minor mode for viewing text but not editing it. -With ARG, turn View mode on iff ARG is positive. +With prefix argument ARG, turn View mode on if ARG is positive, otherwise +turn it off. Emacs commands that do not change the buffer contents are available as usual. Kill commands insert text in kill buffers but do not delete. Other commands diff --git a/lisp/whitespace.el b/lisp/whitespace.el index c38b6563592..3ea8394b0b7 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -763,7 +763,7 @@ If timer is not set, then set it to scan the files in ;;;###autoload (define-minor-mode whitespace-global-mode "Toggle using Whitespace mode in new buffers. -With ARG, turn the mode on iff ARG is positive. +With ARG, turn the mode on if ARG is positive, otherwise turn it off. When this mode is active, `whitespace-buffer' is added to `find-file-hook' and `kill-buffer-hook'." diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 04d91998e2a..6725144e682 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -483,7 +483,7 @@ new value.") ;;;###autoload (defun widgetp (widget) - "Return non-nil iff WIDGET is a widget." + "Return non-nil if WIDGET is a widget." (if (symbolp widget) (get widget 'widget-type) (and (consp widget) @@ -500,7 +500,7 @@ Otherwise, just return the value." value))) (defun widget-member (widget property) - "Non-nil iff there is a definition in WIDGET for PROPERTY." + "Non-nil if there is a definition in WIDGET for PROPERTY." (cond ((plist-member (cdr widget) property) t) ((car widget) @@ -1641,7 +1641,7 @@ If that does not exists, call the value of `widget-complete-field'." (widget-princ-to-string (widget-get widget :value)))) (defun widget-default-active (widget) - "Return t iff this widget active (user modifiable)." + "Return t if this widget is active (user modifiable)." (or (widget-get widget :always-active) (and (not (widget-get widget :inactive)) (let ((parent (widget-get widget :parent))) diff --git a/lisp/window.el b/lisp/window.el index 508d78caeb4..7a64588c076 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -120,7 +120,7 @@ bars (top, bottom, or nil)." PROC is called with a window as argument. Optional second arg MINIBUF t means count the minibuffer window even -if not active. MINIBUF nil or omitted means count the minibuffer iff +if not active. MINIBUF nil or omitted means count the minibuffer only if it is active. MINIBUF neither t nor nil means not to count the minibuffer even if it is active. @@ -165,7 +165,7 @@ value is returned. If no window satisfies PREDICATE, DEFAULT is returned. Optional second arg MINIBUF t means count the minibuffer window even -if not active. MINIBUF nil or omitted means count the minibuffer iff +if not active. MINIBUF nil or omitted means count the minibuffer only if it is active. MINIBUF neither t nor nil means not to count the minibuffer even if it is active. @@ -833,7 +833,7 @@ means suspend autoselection." (defun mouse-autoselect-window-select () "Select window with delayed window autoselection. If the mouse position has stabilized in a non-selected window, select -that window. The minibuffer window is selected iff the minibuffer is +that window. The minibuffer window is selected only if the minibuffer is active. This function is run by `mouse-autoselect-window-timer'." (condition-case nil (let* ((mouse-position (mouse-position)) @@ -858,14 +858,14 @@ active. This function is run by `mouse-autoselect-window-timer'." ;; If `mouse-autoselect-window' is positive, select ;; window if the window is the same as before. (eq window mouse-autoselect-window-window)) - ;; Otherwise select window iff the mouse is at the same + ;; Otherwise select window if the mouse is at the same ;; position as before. Observe that the first test after ;; starting autoselection usually fails since the value of ;; `mouse-autoselect-window-position' recorded there is the ;; position where the mouse has entered the new window and ;; not necessarily where the mouse has stopped moving. (equal mouse-position mouse-autoselect-window-position)) - ;; The minibuffer is a candidate window iff it's active. + ;; The minibuffer is a candidate window if it's active. (or (not (window-minibuffer-p window)) (eq window (active-minibuffer-window)))) ;; Mouse position has stabilized in non-selected window: Cancel diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index b9d711a3e4b..d14c9c85cd3 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -187,7 +187,8 @@ ;;;###autoload (define-minor-mode xterm-mouse-mode "Toggle XTerm mouse mode. -With prefix arg, turn XTerm mouse mode on iff arg is positive. +With prefix arg, turn XTerm mouse mode on if arg is positive, otherwise turn +it off. Turn it on to use Emacs mouse commands, and off to use xterm mouse commands. This works in terminal emulators compatible with xterm. It only diff --git a/mac/inc/m-mac.h b/mac/inc/m-mac.h index a5a26cd000c..57bb0976b69 100644 --- a/mac/inc/m-mac.h +++ b/mac/inc/m-mac.h @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/man/ChangeLog b/man/ChangeLog index 6bd23a3694e..39895247477 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2007-08-08 Glenn Morris + + * glossary.texi (Glossary): Deprecate `iff'. + * gnus.texi, sieve.texi: Replace `iff'. + 2007-08-07 Chong Yidong * files.texi (File Conveniences): Document point motion keys in Image From 178c3d4db12b1ade329455087c41898a43908b12 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:40:33 +0000 Subject: [PATCH 065/105] (Glossary): Deprecate `iff'. --- man/glossary.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/glossary.texi b/man/glossary.texi index d082e6ec077..f289c2ca1cb 100644 --- a/man/glossary.texi +++ b/man/glossary.texi @@ -603,7 +603,8 @@ Hyper}. @item Iff ``Iff'' means ``if and only if.'' This terminology comes from -mathematics. +mathematics. Try to avoid using this term in documentation, since +many are unfamiliar with it and mistake it for a typo. @item Inbox An inbox is a file in which mail is delivered by the operating system. From c7dd5e286d34d02ba11a3921d4814d757afc76e0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:41:40 +0000 Subject: [PATCH 066/105] Replace `iff'. --- lispref/ChangeLog | 4 ++++ man/gnus.texi | 14 +++++++------- man/sieve.texi | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index fb17345e273..ef88b746185 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2007-08-08 Glenn Morris + + * intro.texi (nil and t): Do not use `iff' in documentation. + 2007-08-07 Chong Yidong * display.texi (Image Cache): Document image-refresh. diff --git a/man/gnus.texi b/man/gnus.texi index fe26aa5f662..ff8371df46c 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -18595,23 +18595,23 @@ predicate to individual groups. @table @code @item short -True iff the article is shorter than @code{gnus-agent-short-article} +True if the article is shorter than @code{gnus-agent-short-article} lines; default 100. @item long -True iff the article is longer than @code{gnus-agent-long-article} +True if the article is longer than @code{gnus-agent-long-article} lines; default 200. @item low -True iff the article has a download score less than +True if the article has a download score less than @code{gnus-agent-low-score}; default 0. @item high -True iff the article has a download score greater than +True if the article has a download score greater than @code{gnus-agent-high-score}; default 0. @item spam -True iff the Gnus Agent guesses that the article is spam. The +True if the Gnus Agent guesses that the article is spam. The heuristics may change over time, but at present it just computes a checksum and sees whether articles match. @@ -26651,7 +26651,7 @@ New @file{make.bat} for compiling and installing Gnus under MS Windows Use @file{make.bat} if you want to install Gnus under MS Windows, the first argument to the batch-program should be the directory where -@file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want +@file{xemacs.exe} respectively @file{emacs.exe} is located, if you want to install Gnus after compiling it, give @file{make.bat} @code{/copy} as the second parameter. @@ -27008,7 +27008,7 @@ The envelope sender address can be customized when using Sendmail. @item Gnus no longer generate the Sender: header automatically. -Earlier it was generated iff the user configurable email address was +Earlier it was generated when the user configurable email address was different from the Gnus guessed default user address. As the guessing algorithm is rarely correct these days, and (more controversially) the only use of the Sender: header was to check if you are entitled to diff --git a/man/sieve.texi b/man/sieve.texi index 1030babd593..4b7a95be952 100644 --- a/man/sieve.texi +++ b/man/sieve.texi @@ -307,7 +307,7 @@ Authenticate to the server. @item sieve-manage-capability @findex sieve-manage-capability -Return a list of capabilities the server support. +Return a list of capabilities the server supports. @item sieve-manage-listscripts @findex sieve-manage-listscripts @@ -315,7 +315,7 @@ List scripts on the server. @item sieve-manage-havespace @findex sieve-manage-havespace -Returns non-@code{nil} iff server have roam for a script of given +Return non-@code{nil} if the server has room for a script of given size. @item sieve-manage-getscript From e17ca187e2e5c598509c426426afbe977324dd4a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:41:51 +0000 Subject: [PATCH 067/105] (nil and t): Do not use `iff' in documentation. --- lispref/intro.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/intro.texi b/lispref/intro.texi index 35566603b7c..ed0fd1c0699 100644 --- a/lispref/intro.texi +++ b/lispref/intro.texi @@ -213,7 +213,7 @@ values results in a @code{setting-constant} error. @xref{Constant Variables}. @defun booleanp object -Return non-nil iff @var{object} is one of the two canonical boolean +Return non-nil if @var{object} is one of the two canonical boolean values: @code{t} or @code{nil}. @end defun From 22e9fe2445883d651799f027917cd50d065f200d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:48:26 +0000 Subject: [PATCH 068/105] Replace `iff' in comments. --- src/ChangeLog | 4 ++++ src/m/7300.h | 2 +- src/m/acorn.h | 2 +- src/m/alliant-2800.h | 2 +- src/m/alliant.h | 2 +- src/m/alpha.h | 2 +- src/m/altos.h | 2 +- src/m/amdahl.h | 2 +- src/m/amdx86-64.h | 2 +- src/m/apollo.h | 2 +- src/m/arm.h | 2 +- src/m/att3b.h | 2 +- src/m/aviion.h | 2 +- src/m/celerity.h | 2 +- src/m/clipper.h | 2 +- src/m/cnvrgnt.h | 2 +- src/m/convex.h | 2 +- src/m/cydra5.h | 2 +- src/m/delta88k.h | 2 +- src/m/dpx2.h | 2 +- src/m/dual.h | 2 +- src/m/elxsi.h | 2 +- src/m/gould.h | 2 +- src/m/hp800.h | 2 +- src/m/hp9000s300.h | 2 +- src/m/i860.h | 2 +- src/m/ia64.h | 2 +- src/m/ibm370aix.h | 2 +- src/m/ibmps2-aix.h | 2 +- src/m/ibmrs6000.h | 2 +- src/m/ibmrt-aix.h | 2 +- src/m/ibmrt.h | 2 +- src/m/ibms390.h | 2 +- src/m/ibms390x.h | 2 +- src/m/intel386.h | 2 +- src/m/iris4d.h | 2 +- src/m/irist.h | 2 +- src/m/isi-ov.h | 2 +- src/m/m68k.h | 2 +- src/m/macppc.h | 2 +- src/m/masscomp.h | 2 +- src/m/mega68.h | 2 +- src/m/mg1.h | 2 +- src/m/mips-siemens.h | 2 +- src/m/mips.h | 2 +- src/m/news.h | 2 +- src/m/next.h | 2 +- src/m/ns16000.h | 2 +- src/m/ns32000.h | 2 +- src/m/nu.h | 2 +- src/m/orion.h | 2 +- src/m/orion105.h | 2 +- src/m/pfa50.h | 2 +- src/m/plexus.h | 2 +- src/m/powermac.h | 2 +- src/m/powerpcle.h | 2 +- src/m/pyramid.h | 2 +- src/m/sequent.h | 2 +- src/m/sh3el.h | 2 +- src/m/sparc.h | 2 +- src/m/sps7.h | 2 +- src/m/sr2k.h | 2 +- src/m/stride.h | 2 +- src/m/sun1.h | 2 +- src/m/sun2.h | 2 +- src/m/tad68k.h | 2 +- src/m/tahoe.h | 2 +- src/m/targon31.h | 2 +- src/m/tek4300.h | 2 +- src/m/tekxd88.h | 2 +- src/m/template.h | 2 +- src/m/tower32.h | 2 +- src/m/tower32v3.h | 2 +- src/m/ustation.h | 2 +- src/m/vax.h | 2 +- src/m/wicat.h | 2 +- src/m/windowsnt.h | 2 +- src/m/xps100.h | 2 +- 78 files changed, 81 insertions(+), 77 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 06bcbaf3a05..adef925992c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-08-08 Glenn Morris + + * Replace `iff' in doc-strings and comments. + 2007-08-07 Chong Yidong * dispextern.h (struct image): New members. diff --git a/src/m/7300.h b/src/m/7300.h index b590593abc8..6e439a829cc 100644 --- a/src/m/7300.h +++ b/src/m/7300.h @@ -30,7 +30,7 @@ Boston, MA 02110-1301, USA. */ /* # define SHORTNAMES */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/acorn.h b/src/m/acorn.h index 7fa5991e28b..148d46454ab 100644 --- a/src/m/acorn.h +++ b/src/m/acorn.h @@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/alliant-2800.h b/src/m/alliant-2800.h index 3d65f9d1f12..405267afb2b 100644 --- a/src/m/alliant-2800.h +++ b/src/m/alliant-2800.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/alliant.h b/src/m/alliant.h index b871d4a2385..7cad4bfb0c1 100644 --- a/src/m/alliant.h +++ b/src/m/alliant.h @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/alpha.h b/src/m/alpha.h index d9fd342ef19..53fc1780df8 100644 --- a/src/m/alpha.h +++ b/src/m/alpha.h @@ -35,7 +35,7 @@ NOTE-END on OSF 4/5 -- fx. */ #endif -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/altos.h b/src/m/altos.h index 8a1cb138345..0f4bb9b810f 100644 --- a/src/m/altos.h +++ b/src/m/altos.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/amdahl.h b/src/m/amdahl.h index 3d9ee17e91f..486e2925a55 100644 --- a/src/m/amdahl.h +++ b/src/m/amdahl.h @@ -31,7 +31,7 @@ This file works with the Amdahl uts native C compiler. The 5.2u370 compiler is so brain damaged that it is not even worth trying to use it. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index fbd53a955a2..681be8b0647 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ #define BITS_PER_LONG 64 #define BITS_PER_EMACS_INT 64 -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/apollo.h b/src/m/apollo.h index b769c24c294..2eac3098db9 100644 --- a/src/m/apollo.h +++ b/src/m/apollo.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/arm.h b/src/m/arm.h index b1df83f9b70..697179723f7 100644 --- a/src/m/arm.h +++ b/src/m/arm.h @@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/att3b.h b/src/m/att3b.h index 3344aabc2a9..8e9a589bcd2 100644 --- a/src/m/att3b.h +++ b/src/m/att3b.h @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/aviion.h b/src/m/aviion.h index 7f3f7f253d5..832feb79a00 100644 --- a/src/m/aviion.h +++ b/src/m/aviion.h @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/celerity.h b/src/m/celerity.h index 76f1e1729b3..556c2765883 100644 --- a/src/m/celerity.h +++ b/src/m/celerity.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/clipper.h b/src/m/clipper.h index de99ba97eb5..c0006f48eab 100644 --- a/src/m/clipper.h +++ b/src/m/clipper.h @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/cnvrgnt.h b/src/m/cnvrgnt.h index f64fc86b08b..22478a273b6 100644 --- a/src/m/cnvrgnt.h +++ b/src/m/cnvrgnt.h @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/convex.h b/src/m/convex.h index 7f90d22117c..c8f447cf2fa 100644 --- a/src/m/convex.h +++ b/src/m/convex.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/cydra5.h b/src/m/cydra5.h index 2361fb4b589..4c95f226371 100644 --- a/src/m/cydra5.h +++ b/src/m/cydra5.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/delta88k.h b/src/m/delta88k.h index c767e1db1ca..b5d0c8f190b 100644 --- a/src/m/delta88k.h +++ b/src/m/delta88k.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/dpx2.h b/src/m/dpx2.h index 1c1d146a08a..b39ef93ee34 100644 --- a/src/m/dpx2.h +++ b/src/m/dpx2.h @@ -32,7 +32,7 @@ Boston, MA 02110-1301, USA. */ /* #define ncl_el /* DPX/2 210,220 etc */ /* #define ncl_mr 1 /* DPX/2 320,340 (and 360,380 ?) */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/dual.h b/src/m/dual.h index 4fda7a8a96c..d287f9502d2 100644 --- a/src/m/dual.h +++ b/src/m/dual.h @@ -35,7 +35,7 @@ Dual running Uniplus (-machine=dual -opsystem=unipl5-2) NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/elxsi.h b/src/m/elxsi.h index 81689e66e52..07a00bbf714 100644 --- a/src/m/elxsi.h +++ b/src/m/elxsi.h @@ -27,7 +27,7 @@ Boston, MA 02110-1301, USA. */ /* This file was modified by Matt Crawford to work under Elxsi's 12.0 release of BSD unix. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/gould.h b/src/m/gould.h index c31f50249e7..cd16e09b785 100644 --- a/src/m/gould.h +++ b/src/m/gould.h @@ -49,7 +49,7 @@ Gould Power Node (-machine=gould -opsystem=bsd4-2 or bsd4-3) A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/hp800.h b/src/m/hp800.h index d54690104b5..83465052478 100644 --- a/src/m/hp800.h +++ b/src/m/hp800.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="hpux" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/hp9000s300.h b/src/m/hp9000s300.h index 3718bb3f3ae..9a27065f866 100644 --- a/src/m/hp9000s300.h +++ b/src/m/hp9000s300.h @@ -59,7 +59,7 @@ NOTE-END */ /* #define HPUX_5 */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/i860.h b/src/m/i860.h index 1255f2f1576..6d79c5c8d38 100644 --- a/src/m/i860.h +++ b/src/m/i860.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/ia64.h b/src/m/ia64.h index b6fea6b8fd7..8f7fed8d69e 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h @@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA. */ #define BITS_PER_LONG 64 #define BITS_PER_EMACS_INT 64 -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/ibm370aix.h b/src/m/ibm370aix.h index f632a30780b..0195ec141ab 100644 --- a/src/m/ibm370aix.h +++ b/src/m/ibm370aix.h @@ -30,7 +30,7 @@ Boston, MA 02110-1301, USA. */ #undef INTEL386 #undef aix386 -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/ibmps2-aix.h b/src/m/ibmps2-aix.h index 8882052b006..8c975b81bb9 100644 --- a/src/m/ibmps2-aix.h +++ b/src/m/ibmps2-aix.h @@ -30,7 +30,7 @@ NOTE-START work with certain new X window managers, and may be suboptimal. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h index 2a298e7f760..d542c07ad0a 100644 --- a/src/m/ibmrs6000.h +++ b/src/m/ibmrs6000.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="aix3-1" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #ifdef USG5_4 diff --git a/src/m/ibmrt-aix.h b/src/m/ibmrt-aix.h index d24e99fe6d6..57a9dbc4df1 100644 --- a/src/m/ibmrt-aix.h +++ b/src/m/ibmrt-aix.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/ibmrt.h b/src/m/ibmrt.h index 55cbfd88371..ca32db94518 100644 --- a/src/m/ibmrt.h +++ b/src/m/ibmrt.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/ibms390.h b/src/m/ibms390.h index aece0f7599e..1c7165e04c0 100644 --- a/src/m/ibms390.h +++ b/src/m/ibms390.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index fb1f210c634..64ede365d0c 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h @@ -36,7 +36,7 @@ NOTE-END */ #define BITS_PER_LONG 64 #define BITS_PER_EMACS_INT 64 -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/intel386.h b/src/m/intel386.h index 7c6c2106d17..22205ed762c 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h @@ -50,7 +50,7 @@ Prime EXL (-machine=intel386 -opsystem=usg5-3) Minor changes merged in 19.1. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/iris4d.h b/src/m/iris4d.h index d918c25aede..4c15131e595 100644 --- a/src/m/iris4d.h +++ b/src/m/iris4d.h @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/irist.h b/src/m/irist.h index 0b33bd964aa..c0d55f96d0f 100644 --- a/src/m/irist.h +++ b/src/m/irist.h @@ -58,7 +58,7 @@ NOTE-END */ (copy-file), it would say that it is non-critical... #endif /* 0 */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/isi-ov.h b/src/m/isi-ov.h index 7e25ed9d277..6706ee9981b 100644 --- a/src/m/isi-ov.h +++ b/src/m/isi-ov.h @@ -30,7 +30,7 @@ NOTE-END */ #define ISI68K -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/m68k.h b/src/m/m68k.h index c771e863711..4c600a44d8c 100644 --- a/src/m/m68k.h +++ b/src/m/m68k.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ the size of various data types. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/macppc.h b/src/m/macppc.h index cc4afe31519..d4561c0289f 100644 --- a/src/m/macppc.h +++ b/src/m/macppc.h @@ -19,7 +19,7 @@ along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/masscomp.h b/src/m/masscomp.h index ac753de1537..4e95c268860 100644 --- a/src/m/masscomp.h +++ b/src/m/masscomp.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="rtu" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/mega68.h b/src/m/mega68.h index 6d991ba06a2..0d22b572fc5 100644 --- a/src/m/mega68.h +++ b/src/m/mega68.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/mg1.h b/src/m/mg1.h index 647544e21e4..515e9e23a96 100644 --- a/src/m/mg1.h +++ b/src/m/mg1.h @@ -34,7 +34,7 @@ own configuration files, please let the Free Software Foundation in on your work; we'd like to distribute this information. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/mips-siemens.h b/src/m/mips-siemens.h index d90a651d361..53366a1332e 100644 --- a/src/m/mips-siemens.h +++ b/src/m/mips-siemens.h @@ -36,7 +36,7 @@ This is the m- file for SNI RM*00 machines. Use s- sinix5-4.h file! With this the file mips-siemens.h is obsolete. NOTE-END */ -/* Define BIG_ENDIAN iff lowest-numbered byte in a word +/* Define BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define BIG_ENDIAN diff --git a/src/m/mips.h b/src/m/mips.h index b18324fb8b7..6c039c5e14c 100644 --- a/src/m/mips.h +++ b/src/m/mips.h @@ -29,7 +29,7 @@ Use mips4.h for RISCOS version 4; use s-bsd4-3.h with the BSD world. Note that the proper m file for the Decstation is pmax.h. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #if ! (defined (__MIPSEL__) || defined (MIPSEL) || defined (_MIPSEL)) diff --git a/src/m/news.h b/src/m/news.h index 419015dd150..084c5abb92c 100644 --- a/src/m/news.h +++ b/src/m/news.h @@ -34,7 +34,7 @@ NOTE-END */ #define m68000 #endif -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/next.h b/src/m/next.h index ef92607d957..bca8ac39d47 100644 --- a/src/m/next.h +++ b/src/m/next.h @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ #define NeXT #endif -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ /* Let the compiler tell us. */ diff --git a/src/m/ns16000.h b/src/m/ns16000.h index c64bfa32482..6feddd97610 100644 --- a/src/m/ns16000.h +++ b/src/m/ns16000.h @@ -30,7 +30,7 @@ For a Tektronix 16000 box (a 6130, perhaps?), use `-opsystem=bsd4-2'. Use `-machine=ns16000' for both. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/ns32000.h b/src/m/ns32000.h index 0b776115ca8..b6484b4b219 100644 --- a/src/m/ns32000.h +++ b/src/m/ns32000.h @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/nu.h b/src/m/nu.h index 347606a6c01..279d14ff915 100644 --- a/src/m/nu.h +++ b/src/m/nu.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/orion.h b/src/m/orion.h index 36a74b3cc3b..cc3a7e395fc 100644 --- a/src/m/orion.h +++ b/src/m/orion.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/orion105.h b/src/m/orion105.h index 73408ed1b2f..fabcf67e2a9 100644 --- a/src/m/orion105.h +++ b/src/m/orion105.h @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/pfa50.h b/src/m/pfa50.h index 8f1f146000e..5f98dc993c7 100644 --- a/src/m/pfa50.h +++ b/src/m/pfa50.h @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/plexus.h b/src/m/plexus.h index 4a4e6a32f7f..51961977904 100644 --- a/src/m/plexus.h +++ b/src/m/plexus.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/powermac.h b/src/m/powermac.h index 729bbb0358b..2dde47bd6cf 100644 --- a/src/m/powermac.h +++ b/src/m/powermac.h @@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="darwin" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/powerpcle.h b/src/m/powerpcle.h index 403d6986bf8..5be26e93b17 100644 --- a/src/m/powerpcle.h +++ b/src/m/powerpcle.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ USUAL-OPSYS="Solaris2.5.1 Windows/NT AIX 4.1.2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/pyramid.h b/src/m/pyramid.h index 9ee3fefe387..1b834c60ba0 100644 --- a/src/m/pyramid.h +++ b/src/m/pyramid.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/sequent.h b/src/m/sequent.h index be5d3f19bd1..3c06d854b41 100644 --- a/src/m/sequent.h +++ b/src/m/sequent.h @@ -31,7 +31,7 @@ NOTE-END */ /* NOTE: this file works for DYNIX release 2.0 (not tested on 1.3) on NS32000's */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/sh3el.h b/src/m/sh3el.h index 5851ade1523..eefcccea6de 100644 --- a/src/m/sh3el.h +++ b/src/m/sh3el.h @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */ operating system this machine is likely to run. USUAL-OPSYS="" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/sparc.h b/src/m/sparc.h index f59c2c2b969..8df81ee91aa 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h @@ -28,7 +28,7 @@ Use -opsystem=sunos4 for operating system version 4, and -opsystem=bsd4-2 for earlier versions. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/sps7.h b/src/m/sps7.h index 68acf2c6c52..67fc60c1b6a 100644 --- a/src/m/sps7.h +++ b/src/m/sps7.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/sr2k.h b/src/m/sr2k.h index ba4a9a905ab..6c17795e058 100644 --- a/src/m/sr2k.h +++ b/src/m/sr2k.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="hpux" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/stride.h b/src/m/stride.h index cb0380024a1..d846a6c9843 100644 --- a/src/m/stride.h +++ b/src/m/stride.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/sun1.h b/src/m/sun1.h index fda451a9310..03cb4e803ff 100644 --- a/src/m/sun1.h +++ b/src/m/sun1.h @@ -40,7 +40,7 @@ Sun 1, 2 and 3 (-machine=sun1, -machine=sun2, -machine=sun3; problems caused by bugs in the "export" version of SunOS 4. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/sun2.h b/src/m/sun2.h index 00b7ae97c4d..e764ded3ce7 100644 --- a/src/m/sun2.h +++ b/src/m/sun2.h @@ -42,7 +42,7 @@ Sun 1, 2 and 3 (-machine=sun1, -machine=sun2, -machine=sun3; problems caused by bugs in the "export" version of SunOS 4. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/tad68k.h b/src/m/tad68k.h index 5e982a314ab..c8be8763fb5 100644 --- a/src/m/tad68k.h +++ b/src/m/tad68k.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/tahoe.h b/src/m/tahoe.h index 8fe41cd4109..9b9271577fc 100644 --- a/src/m/tahoe.h +++ b/src/m/tahoe.h @@ -29,7 +29,7 @@ Use -opsystem=bsd4-2 or -opsystem=bsd4-3, depending on the version of Berkeley you are running. NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/targon31.h b/src/m/targon31.h index 0c657e0ea5d..39e995b076d 100644 --- a/src/m/targon31.h +++ b/src/m/targon31.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/tek4300.h b/src/m/tek4300.h index be43210212a..6498238461d 100644 --- a/src/m/tek4300.h +++ b/src/m/tek4300.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="bsd4-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/tekxd88.h b/src/m/tekxd88.h index 1d46bb9bb55..f351229292f 100644 --- a/src/m/tekxd88.h +++ b/src/m/tekxd88.h @@ -22,7 +22,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/template.h b/src/m/template.h index fccc5b0901c..b893ba23df2 100644 --- a/src/m/template.h +++ b/src/m/template.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/tower32.h b/src/m/tower32.h index 0ce623b7f37..01daada2423 100644 --- a/src/m/tower32.h +++ b/src/m/tower32.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/tower32v3.h b/src/m/tower32v3.h index 226c0e2640a..ff209edab41 100644 --- a/src/m/tower32v3.h +++ b/src/m/tower32v3.h @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/ustation.h b/src/m/ustation.h index f88cdc5ee63..0ac833c28da 100644 --- a/src/m/ustation.h +++ b/src/m/ustation.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-3" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/vax.h b/src/m/vax.h index 80844ba3ba6..82695074424 100644 --- a/src/m/vax.h +++ b/src/m/vax.h @@ -52,7 +52,7 @@ Vax running VMS (-opsystem=vms) NOTE-END */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #undef WORDS_BIG_ENDIAN diff --git a/src/m/wicat.h b/src/m/wicat.h index 67409844666..3ac7b530739 100644 --- a/src/m/wicat.h +++ b/src/m/wicat.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN diff --git a/src/m/windowsnt.h b/src/m/windowsnt.h index f1efe64a4f5..ddad551c772 100644 --- a/src/m/windowsnt.h +++ b/src/m/windowsnt.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="" */ -/* Define BIG_ENDIAN iff lowest-numbered byte in a word +/* Define BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ /* #define BIG_ENDIAN */ diff --git a/src/m/xps100.h b/src/m/xps100.h index 691f5fedbd6..3b378319ceb 100644 --- a/src/m/xps100.h +++ b/src/m/xps100.h @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ operating system this machine is likely to run. USUAL-OPSYS="usg5-2" */ -/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word is the most significant byte. */ #define WORDS_BIG_ENDIAN From e0f24100c74828aadd926f0afa6e3440be8c89d0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:49:21 +0000 Subject: [PATCH 069/105] Replace `iff' in comments. --- src/buffer.h | 2 +- src/callproc.c | 2 +- src/casetab.c | 2 +- src/category.c | 2 +- src/ccl.c | 4 ++-- src/charset.c | 6 +++--- src/charset.h | 10 +++++----- src/coding.h | 4 ++-- src/composite.h | 4 ++-- src/dired.c | 2 +- src/editfns.c | 2 +- src/eval.c | 2 +- src/fileio.c | 2 +- src/fontset.c | 2 +- src/fontset.h | 2 +- src/getloadavg.c | 2 +- src/indent.c | 2 +- src/indent.h | 2 +- src/intervals.c | 2 +- src/keyboard.c | 4 ++-- src/keyboard.h | 2 +- src/keymap.c | 2 +- src/lisp.h | 4 ++-- src/lread.c | 6 +++--- src/macterm.c | 2 +- src/macterm.h | 2 +- src/msdos.c | 2 +- src/process.c | 12 ++++++------ src/process.h | 2 +- src/regex.c | 2 +- src/search.c | 2 +- src/systime.h | 4 ++-- src/systty.h | 2 +- src/termhooks.h | 2 +- src/textprop.c | 4 ++-- src/w32term.c | 2 +- src/w32term.h | 2 +- src/window.h | 2 +- src/xterm.c | 2 +- src/xterm.h | 2 +- 40 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/buffer.h b/src/buffer.h index 65cfef4f04f..ed99dc4ffb1 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -561,7 +561,7 @@ struct buffer Lisp_Object filename; /* Dir for expanding relative file names. */ Lisp_Object directory; - /* True iff this buffer has been backed up (if you write to the + /* True if this buffer has been backed up (if you write to the visited file and it hasn't been backed up, then a backup will be made). */ /* This isn't really used by the C code, so could be deleted. */ diff --git a/src/callproc.c b/src/callproc.c index 1ea0dfa43a6..bf7ea43b868 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -117,7 +117,7 @@ Lisp_Object Vprocess_environment; Lisp_Object Qbuffer_file_type; #endif /* DOS_NT */ -/* True iff we are about to fork off a synchronous process or if we +/* True if we are about to fork off a synchronous process or if we are waiting for it. */ int synch_process_alive; diff --git a/src/casetab.c b/src/casetab.c index 1d364a6df7e..a53bb1ece52 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -40,7 +40,7 @@ static void set_identity (); static void shuffle (); DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0, - doc: /* Return t iff OBJECT is a case table. + doc: /* Return t if OBJECT is a case table. See `set-case-table' for more information on these data structures. */) (object) Lisp_Object object; diff --git a/src/category.c b/src/category.c index 55e752045e7..7ea9b7810fa 100644 --- a/src/category.c +++ b/src/category.c @@ -559,7 +559,7 @@ syms_of_category () doc: /* List of pair (cons) of categories to determine word boundary. Emacs treats a sequence of word constituent characters as a single -word (i.e. finds no word boundary between them) iff they belongs to +word (i.e. finds no word boundary between them) only if they belong to the same charset. But, exceptions are allowed in the following cases. \(1) The case that characters are in different charsets is controlled diff --git a/src/ccl.c b/src/ccl.c index c25e67abf57..564fd4ba4fa 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -659,13 +659,13 @@ while (0) #define CCL_LookupIntConstTbl 0x13 /* Lookup multibyte character by integer key. Afterwards R7 set - to 1 iff lookup succeeded. + to 1 if lookup succeeded. 1:ExtendedCOMMNDRrrRRRXXXXXXXX 2:ARGUMENT(Hash table ID) */ #define CCL_LookupCharConstTbl 0x14 /* Lookup integer by multibyte character key. Afterwards R7 set - to 1 iff lookup succeeded. + to 1 if lookup succeeded. 1:ExtendedCOMMNDRrrRRRrrrXXXXX 2:ARGUMENT(Hash table ID) */ diff --git a/src/charset.c b/src/charset.c index a6ec309cbb3..1a85cd39c72 100644 --- a/src/charset.c +++ b/src/charset.c @@ -337,7 +337,7 @@ split_string (str, len, charset, c1, c2) return 0; } -/* Return 1 iff character C has valid printable glyph. +/* Return 1 if character C has valid printable glyph. Use the macro CHAR_PRINTABLE_P instead. */ int char_printable_p (c) @@ -1102,8 +1102,8 @@ DIMENSION, CHARS, and FINAL-CHAR. */) return CHARSET_SYMBOL (charset); } -/* If GENERICP is nonzero, return nonzero iff C is a valid normal or - generic character. If GENERICP is zero, return nonzero iff C is a +/* If GENERICP is nonzero, return nonzero if C is a valid normal or + generic character. If GENERICP is zero, return nonzero if C is a valid normal character. Do not call this function directly, instead use macro CHAR_VALID_P. */ int diff --git a/src/charset.h b/src/charset.h index 984d466d97d..c20766f910b 100644 --- a/src/charset.h +++ b/src/charset.h @@ -413,8 +413,8 @@ extern int width_by_char_head[256]; | ((c1) <= 0 ? 0 : (((c1) & 0x7F) << 7)))))) -/* If GENERICP is nonzero, return nonzero iff C is a valid normal or - generic character. If GENERICP is zero, return nonzero iff C is a +/* If GENERICP is nonzero, return nonzero if C is a valid normal or + generic character. If GENERICP is zero, return nonzero if C is a valid normal character. */ #define CHAR_VALID_P(c, genericp) \ ((c) >= 0 \ @@ -450,7 +450,7 @@ extern int width_by_char_head[256]; #define VALID_LEADING_CODE_P(code) \ (! NILP (CHARSET_TABLE_ENTRY (code))) -/* Return 1 iff the byte sequence at unibyte string STR (LENGTH bytes) +/* Return 1 if the byte sequence at unibyte string STR (LENGTH bytes) is valid as a multibyte form. If valid, by a side effect, BYTES is set to the byte length of the multibyte form. */ @@ -471,7 +471,7 @@ extern int width_by_char_head[256]; && VALID_LEADING_CODE_P (str[1])))))))) -/* Return 1 iff the byte sequence at multibyte string STR is valid as +/* Return 1 if the byte sequence at multibyte string STR is valid as a unibyte form. By a side effect, BYTES is set to the byte length of one character at STR. */ @@ -499,7 +499,7 @@ extern int width_by_char_head[256]; c1 = CHAR_FIELD3 (c), \ c2 = -1))) -/* Return 1 iff character C has valid printable glyph. */ +/* Return 1 if character C has valid printable glyph. */ #define CHAR_PRINTABLE_P(c) (ASCII_BYTE_P (c) || char_printable_p (c)) /* The charset of the character at STR is stored in CHARSET, and the diff --git a/src/coding.h b/src/coding.h index 9906e66af6c..2efcd4f47e2 100644 --- a/src/coding.h +++ b/src/coding.h @@ -263,7 +263,7 @@ enum coding_type eol-type is not consistent through the file. */ -/* 1 iff composing. */ +/* 1 if composing. */ #define COMPOSING_P(coding) ((int) coding->composing > (int) COMPOSITION_NO) #define COMPOSITION_DATA_SIZE 4080 @@ -372,7 +372,7 @@ struct coding_system /* The current status of composition handling. */ int composing; - /* 1 iff the next character is a composition rule. */ + /* 1 if the next character is a composition rule. */ int composition_rule_follows; /* Information of compositions are stored here on decoding and set diff --git a/src/composite.h b/src/composite.h index 5dc8dde62e2..ba8f8c84104 100644 --- a/src/composite.h +++ b/src/composite.h @@ -56,7 +56,7 @@ enum composition_method { /* Temporary variable used only in the following macros. */ extern Lisp_Object composition_temp; -/* Return 1 iff the composition is already registered. */ +/* Return 1 if the composition is already registered. */ #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop)) /* Return ID number of the already registered composition. */ @@ -91,7 +91,7 @@ extern Lisp_Object composition_temp; ? COMPOSITION_WITH_ALTCHARS \ : COMPOSITION_WITH_RULE_ALTCHARS)))) -/* Return 1 iff the composition is valid. It is valid if length of +/* Return 1 if the composition is valid. It is valid if length of the composition equals to (END - START). */ #define COMPOSITION_VALID_P(start, end, prop) \ (CONSP (prop) \ diff --git a/src/dired.c b/src/dired.c index 22283b66ea0..1fb5387268a 100644 --- a/src/dired.c +++ b/src/dired.c @@ -916,7 +916,7 @@ Elements of the attribute list are: 7. Size in bytes. This is a floating point number if the size is too large for an integer. 8. File modes, as a string of ten letters or dashes as in ls -l. - 9. t iff file's gid would change if file were deleted and recreated. + 9. t if file's gid would change if file were deleted and recreated. 10. inode number. If inode number is larger than the Emacs integer, this is a cons cell containing two integers: first the high part, then the low 16 bits. diff --git a/src/editfns.c b/src/editfns.c index 5ab8e5eddc8..6c6742d242e 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3516,7 +3516,7 @@ usage: (format STRING &rest OBJECTS) */) precision ::= '.' [0-9]* If a field-width is specified, it specifies to which width - the output should be padded with blanks, iff the output + the output should be padded with blanks, if the output string is shorter than field-width. If precision is specified, it specifies the number of diff --git a/src/eval.c b/src/eval.c index 60e3c77a3a3..026a3375589 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1785,7 +1785,7 @@ signal_error (s, arg) } -/* Return nonzero iff LIST is a non-nil atom or +/* Return nonzero if LIST is a non-nil atom or a list containing one of CONDITIONS. */ static int diff --git a/src/fileio.c b/src/fileio.c index 1962035e0bd..26723fa4f3e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5191,7 +5191,7 @@ This does code conversion according to the value of * if we do writes that don't end with a carriage return. Furthermore * it cannot handle writes of more then 16K. The modified * version of "sys_write" in SYSDEP.C (see comment there) copes with - * this EXCEPT for the last record (iff it doesn't end with a carriage + * this EXCEPT for the last record (if it doesn't end with a carriage * return). This implies that if your buffer doesn't end with a carriage * return, you get one free... tough. However it also means that if * we make two calls to sys_write (a la the following code) you can diff --git a/src/fontset.c b/src/fontset.c index bf6f7121b23..b670e228047 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -500,7 +500,7 @@ free_face_fontset (f, face) } -/* Return 1 iff FACE is suitable for displaying character C. +/* Return 1 if FACE is suitable for displaying character C. Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P when C is not a single byte character.. */ diff --git a/src/fontset.h b/src/fontset.h index 5b5c5cbcfaa..c8bd1e36eab 100644 --- a/src/fontset.h +++ b/src/fontset.h @@ -66,7 +66,7 @@ struct font_info /* Average width of glyphs in the font. */ int average_width; - /* 1 iff `vertical-centering-font-regexp' matches this font name. + /* 1 if `vertical-centering-font-regexp' matches this font name. In this case, we render characters at vartical center positions of lines. */ int vertical_centering; diff --git a/src/getloadavg.c b/src/getloadavg.c index f40149a8c47..6d66cbfd8a1 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c @@ -484,7 +484,7 @@ static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */ #if !defined(HAVE_LIBKSTAT) && defined(LOAD_AVE_TYPE) /* File descriptor open to /dev/kmem or VMS load ave driver. */ static int channel; -/* Nonzero iff channel is valid. */ +/* Nonzero if channel is valid. */ static int getloadavg_initialized; /* Offset in kmem to seek to read load average, or 0 means invalid. */ static long offset; diff --git a/src/indent.c b/src/indent.c index 905cf7559a7..b3c1d0cf81a 100644 --- a/src/indent.c +++ b/src/indent.c @@ -116,7 +116,7 @@ character_width (c, dp) return 0; } -/* Return true iff the display table DISPTAB specifies the same widths +/* Return true if the display table DISPTAB specifies the same widths for characters as WIDTHTAB. We use this to decide when to invalidate the buffer's width_run_cache. */ diff --git a/src/indent.h b/src/indent.h index 2d3c158b069..2e873769603 100644 --- a/src/indent.h +++ b/src/indent.h @@ -61,7 +61,7 @@ extern int last_known_column_point; /* Functions for dealing with the column cache. */ -/* Return true iff the display table DISPTAB specifies the same widths +/* Return true if the display table DISPTAB specifies the same widths for characters as WIDTHTAB. We use this to decide when to invalidate the buffer's column_cache. */ int disptab_matches_widthtab P_ ((struct Lisp_Char_Table *disptab, diff --git a/src/intervals.c b/src/intervals.c index 89f99a052b9..a695976b8b7 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -2200,7 +2200,7 @@ set_point_both (buffer, charpos, bytepos) temp_set_point_both (buffer, charpos, bytepos); - /* We run point-left and point-entered hooks here, iff the + /* We run point-left and point-entered hooks here, if the two intervals are not equivalent. These hooks take (old_point, new_point) as arguments. */ if (NILP (Vinhibit_point_motion_hooks) diff --git a/src/keyboard.c b/src/keyboard.c index 5cedd0572b2..171f2da7217 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -500,7 +500,7 @@ static struct input_event * volatile kbd_store_ptr; /* The above pair of variables forms a "queue empty" flag. When we enqueue a non-hook event, we increment kbd_store_ptr. When we dequeue a non-hook event, we increment kbd_fetch_ptr. We say that - there is input available iff the two pointers are not equal. + there is input available if the two pointers are not equal. Why not just have a flag set and cleared by the enqueuing and dequeuing functions? Such a flag could be screwed up by interrupts @@ -3590,7 +3590,7 @@ restore_getcjmp (temp) kbd_buffer_store_event places events in kbd_buffer, and kbd_buffer_get_event retrieves them. */ -/* Return true iff there are any events in the queue that read-char +/* Return true if there are any events in the queue that read-char would return. If this returns false, a read-char would block. */ static int readable_events (flags) diff --git a/src/keyboard.h b/src/keyboard.h index e24f9a133ae..15e55ad4e67 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -240,7 +240,7 @@ extern Lisp_Object item_properties; /* Macros for dealing with lispy events. */ -/* True iff EVENT has data fields describing it (i.e. a mouse click). */ +/* True if EVENT has data fields describing it (i.e. a mouse click). */ #define EVENT_HAS_PARAMETERS(event) (CONSP (event)) /* Extract the head from an event. diff --git a/src/keymap.c b/src/keymap.c index a39c0d43984..e1e45b18d4e 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -4093,7 +4093,7 @@ don't alter it yourself. */); DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, doc: /* Alist of keymaps to use for minor modes. Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read -key sequences and look up bindings iff VARIABLE's value is non-nil. +key sequences and look up bindings if VARIABLE's value is non-nil. If two active keymaps bind the same key, the keymap appearing earlier in the list takes precedence. */); Vminor_mode_map_alist = Qnil; diff --git a/src/lisp.h b/src/lisp.h index 9a13a95b3b0..7499349a193 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1441,7 +1441,7 @@ typedef unsigned char UCHAR; #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) -/* Return 1 iff GLYPH contains valid character code. */ +/* Return 1 if GLYPH contains valid character code. */ #define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (FAST_GLYPH_CHAR (glyph), 1) /* The ID of the mode line highlighting face. */ @@ -1588,7 +1588,7 @@ typedef unsigned char UCHAR; "dead", which is what we want; this is an argument-checking macro, and the user should never get access to interior windows. - A window of any sort, leaf or interior, is dead iff the buffer, + A window of any sort, leaf or interior, is dead if the buffer, vchild, and hchild members are all nil. */ #define CHECK_LIVE_WINDOW(x) \ diff --git a/src/lread.c b/src/lread.c index 5ecb521ff8a..5037937e08b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -93,7 +93,7 @@ Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */ extern Lisp_Object Qevent_symbol_element_mask; extern Lisp_Object Qfile_exists_p; -/* non-zero iff inside `load' */ +/* non-zero if inside `load' */ int load_in_progress; /* Directory in which the sources were found. */ @@ -1126,7 +1126,7 @@ in which case file-name-handlers are ignored. */) On success, returns a file descriptor. On failure, returns -1. SUFFIXES is a list of strings containing possible suffixes. - The empty suffix is automatically added iff the list is empty. + The empty suffix is automatically added if the list is empty. PREDICATE non-nil means don't open the files, just look for one that satisfies the predicate. In this case, @@ -4074,7 +4074,7 @@ customize `jka-compr-load-suffixes' rather than the present variable. */); Vload_file_rep_suffixes = Fcons (build_string (""), Qnil); DEFVAR_BOOL ("load-in-progress", &load_in_progress, - doc: /* Non-nil iff inside of `load'. */); + doc: /* Non-nil if inside of `load'. */); DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, doc: /* An alist of expressions to be evalled when particular files are loaded. diff --git a/src/macterm.c b/src/macterm.c index 87a9861934c..b282bac3aa6 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -11109,7 +11109,7 @@ XTread_socket (sd, expected, hold_quit) /* Window will be selected only when it is not selected now and last mouse movement event was not in it. Minibuffer window - will be selected iff it is active. */ + will be selected only when it is active. */ if (WINDOWP (window) && !EQ (window, last_window) && !EQ (window, selected_window)) diff --git a/src/macterm.h b/src/macterm.h index f9ce0ef051d..6a68f39762d 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -150,7 +150,7 @@ struct mac_display_info char *mac_id_name; /* The number of fonts actually stored in the font table. - font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= + font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= n_fonts <= font_table_size and font_table[i].name != 0. */ int n_fonts; diff --git a/src/msdos.c b/src/msdos.c index 59854268e14..ef65597f7e7 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -3231,7 +3231,7 @@ dos_rawgetc () `dos_get_modifiers', they might have already released the Alt key, and Emacs gets just `x', which is BAD. However, for keys with the `Map' property set, the ASCII - code returns zero iff Alt is pressed. So, when we DON'T + code returns zero only if Alt is pressed. So, when we DON'T have to support international_keyboard, we don't have to distinguish between the left and right Alt keys, and we can set the META modifier for any keys with the `Map' diff --git a/src/process.c b/src/process.c index 99c5e07f0d4..97bcba3b392 100644 --- a/src/process.c +++ b/src/process.c @@ -2781,7 +2781,7 @@ The stopped state is cleared by `continue-process' and set by :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the process filter are multibyte, otherwise they are unibyte. -If this keyword is not specified, the strings are multibyte iff +If this keyword is not specified, the strings are multibyte if `default-enable-multibyte-characters' is non-nil. :sentinel SENTINEL -- Install SENTINEL as the process sentinel. @@ -3920,7 +3920,7 @@ it specifies a fractional number of seconds to wait. If optional fourth arg JUST-THIS-ONE is non-nil, only accept output from PROCESS, suspending reading output from other processes. If JUST-THIS-ONE is an integer, don't run any timers either. -Return non-nil iff we received any output before the timeout expired. */) +Return non-nil if we received any output before the timeout expired. */) (process, seconds, millisec, just_this_one) register Lisp_Object process, seconds, millisec, just_this_one; { @@ -4253,16 +4253,16 @@ select_wrapper (n, rfd, wfd, xfd, tmo) (and gobble terminal input into the buffer if any arrives). If WAIT_PROC is specified, wait until something arrives from that - process. The return value is true iff we read some input from + process. The return value is true if we read some input from that process. If JUST_WAIT_PROC is non-nil, handle only output from WAIT_PROC (suspending output from other processes). A negative value means don't run any timers either. - If WAIT_PROC is specified, then the function returns true iff we + If WAIT_PROC is specified, then the function returns true if we received input from that process before the timeout elapsed. - Otherwise, return true iff we received input from any process. */ + Otherwise, return true if we received input from any process. */ int wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, @@ -7324,7 +7324,7 @@ Lisp_Object QCtype; do_display != 0 means redisplay should be done to show subprocess output that arrives. - Return true iff we received input from any process. */ + Return true if we received input from any process. */ int wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, diff --git a/src/process.h b/src/process.h index 6fb783e72b0..2502e61a31d 100644 --- a/src/process.h +++ b/src/process.h @@ -138,7 +138,7 @@ extern Lisp_Object chan_process[]; /* Alist of elements (NAME . PROCESS). */ extern Lisp_Object Vprocess_alist; -/* True iff we are about to fork off a synchronous process or if we +/* True if we are about to fork off a synchronous process or if we are waiting for it. */ extern int synch_process_alive; diff --git a/src/regex.c b/src/regex.c index 095afa1c465..6435133c96f 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2048,7 +2048,7 @@ re_wctype (str) else return 0; } -/* True iff CH is in the char class CC. */ +/* True if CH is in the char class CC. */ boolean re_iswctype (ch, cc) int ch; diff --git a/src/search.c b/src/search.c index c74b1071237..3a9fabeb3ce 100644 --- a/src/search.c +++ b/src/search.c @@ -1614,7 +1614,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) have nontrivial translation are the same aside from the last byte. This makes it possible to translate just the last byte of a character, and do so after just a simple test of the context. - CHARSET_BASE is nonzero iff there is such a non-ASCII character. + CHARSET_BASE is nonzero if there is such a non-ASCII character. If that criterion is not satisfied, do not call this function. */ diff --git a/src/systime.h b/src/systime.h index 85c2799f083..8b1b7f56ad6 100644 --- a/src/systime.h +++ b/src/systime.h @@ -67,7 +67,7 @@ extern time_t timezone; EMACS_SECS (TIME) is an rvalue for the seconds component of TIME. EMACS_SET_SECS (TIME, SECONDS) sets that to SECONDS. - EMACS_HAS_USECS is defined iff EMACS_TIME has a usecs component. + EMACS_HAS_USECS is defined if EMACS_TIME has a usecs component. EMACS_USECS (TIME) is an rvalue for the microseconds component of TIME. This returns zero if EMACS_TIME doesn't have a microseconds component. EMACS_SET_USECS (TIME, MICROSECONDS) sets that to MICROSECONDS. @@ -83,7 +83,7 @@ extern time_t timezone; EMACS_SUB_TIME (DEST, SRC1, SRC2) subtracts SRC2 from SRC1 and stores the result in DEST. SRC should not be negative. - EMACS_TIME_NEG_P (TIME) is true iff TIME is negative. + EMACS_TIME_NEG_P (TIME) is true if TIME is negative. */ diff --git a/src/systty.h b/src/systty.h index 15dd7a4e26c..c89edfc8d93 100644 --- a/src/systty.h +++ b/src/systty.h @@ -297,7 +297,7 @@ static struct sensemode { written before making the change. Return 0 if all went well, and -1 if anything failed. - EMACS_TTY_TABS_OK (struct emacs_tty *P) is false iff the kernel + EMACS_TTY_TABS_OK (struct emacs_tty *P) is false if the kernel expands tabs to spaces upon output; in that case, there is no advantage to using tabs over spaces. */ diff --git a/src/termhooks.h b/src/termhooks.h index 5d317f2da3d..32078254593 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -201,7 +201,7 @@ extern void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME)); /* Input queue declarations and hooks. */ /* Expedient hack: only provide the below definitions to files that - are prepared to handle lispy things. CONSP is defined iff lisp.h + are prepared to handle lispy things. CONSP is defined if lisp.h has been included before this file. */ #ifdef CONSP diff --git a/src/textprop.c b/src/textprop.c index 711ee571af6..8ce5656e5a2 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -1633,8 +1633,8 @@ Return t if any property was actually removed, nil otherwise. */) The flag `modified' records if changes have been made. When object is a buffer, we must call modify_region before changes are made and signal_after_change when we are done. - We call modify_region before calling remove_properties iff modified == 0, - and we call signal_after_change before returning iff modified != 0. */ + We call modify_region before calling remove_properties if modified == 0, + and we call signal_after_change before returning if modified != 0. */ for (;;) { if (i == 0) diff --git a/src/w32term.c b/src/w32term.c index b3bf9a0f704..0422257f2d6 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4336,7 +4336,7 @@ w32_read_socket (sd, expected, hold_quit) /* Window will be selected only when it is not selected now and last mouse movement event was not in it. Minibuffer window will be selected - iff it is active. */ + only when it is active. */ if (WINDOWP(window) && !EQ (window, last_window) && !EQ (window, selected_window)) diff --git a/src/w32term.h b/src/w32term.h index 3bf7d588501..acf864d5f38 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -198,7 +198,7 @@ struct w32_display_info char *w32_id_name; /* The number of fonts actually stored in w32_font_table. - font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= + font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= n_fonts <= font_table_size. and font_table[i].name != 0. */ int n_fonts; diff --git a/src/window.h b/src/window.h index a5c1f34a0ce..ea8965392c4 100644 --- a/src/window.h +++ b/src/window.h @@ -819,7 +819,7 @@ extern int command_loop_level; extern int minibuf_level; -/* true iff we should redraw the mode lines on the next redisplay. */ +/* true if we should redraw the mode lines on the next redisplay. */ extern int update_mode_lines; diff --git a/src/xterm.c b/src/xterm.c index 3deb518bad5..00d653fc19f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6622,7 +6622,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) /* Window will be selected only when it is not selected now and last mouse movement event was not in it. Minibuffer window - will be selected iff it is active. */ + will be selected only when it is active. */ if (WINDOWP (window) && !EQ (window, last_window) && !EQ (window, selected_window)) diff --git a/src/xterm.h b/src/xterm.h index 84f12d94abd..ad768e36779 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -253,7 +253,7 @@ struct x_display_info char *x_id_name; /* The number of fonts actually stored in x_font_table. - font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= + font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= n_fonts <= font_table_size and font_table[i].name != 0. */ int n_fonts; From 6d5baad533e588d71506bb53fbf67bc4cae58f0b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 07:56:20 +0000 Subject: [PATCH 070/105] *** empty log message *** --- lispref/ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index ef88b746185..59da0e8a455 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -2,6 +2,8 @@ * intro.texi (nil and t): Do not use `iff' in documentation. + * tips.texi (Documentation Tips): Recommend against `iff'. + 2007-08-07 Chong Yidong * display.texi (Image Cache): Document image-refresh. From 6c4a608e90ea2751932464690fcb7affa41b047a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 08:01:42 +0000 Subject: [PATCH 071/105] (Documentation Tips): Recommend against `iff'. --- lisp/ChangeLog | 3 +++ lispref/tips.texi | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65df7d26b15..29e9027e54e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,9 @@ * Replace `iff' in doc-strings and comments. + * help-mode.el (help-make-xrefs): Search for symbol constituents, + rather than just `-'. + 2007-08-08 Martin Rudalics * dired.el (dired-pop-to-buffer): diff --git a/lispref/tips.texi b/lispref/tips.texi index de590c4cf9d..f3070f4659b 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi @@ -844,6 +844,12 @@ Avoid using the word ``cause'' (or its equivalents) unnecessarily. Instead of, ``Cause Emacs to display text in boldface,'' write just ``Display text in boldface.'' +@item +Avoid using ``iff'' (a mathematics term meaning ``if and only if''), +since many people are unfamiliar with it and mistake it for a typo. In +most cases, the meaning is clear with just ``if''. Otherwise, try to +find an alternate phrasing that conveys the meaning. + @item When a command is meaningful only in a certain mode or situation, do mention that in the documentation string. For example, From 42be947978e697c7f7fb124261a52c624c76d583 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Aug 2007 08:03:53 +0000 Subject: [PATCH 072/105] (help-make-xrefs): Search for symbol constituents, rather than just `-'. --- lisp/help-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 5344d750eef..818a0111cb8 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -436,9 +436,9 @@ that." ;; An obvious case of a key substitution: (save-excursion (while (re-search-forward - ;; Assume command name is only word characters - ;; and dashes to get things like `use M-x foo.'. - "\\bar'. + "\\= (current-column) col) - (looking-at "\\(\\sw\\|-\\)+$")) + (looking-at "\\(\\sw\\|\\s_\\)+$")) (let ((sym (intern-soft (match-string 0)))) (if (fboundp sym) (help-xref-button 0 'help-function sym)))) From ece1116442ad1858cf122f0725a4650ef3d5e88e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 8 Aug 2007 11:51:48 +0000 Subject: [PATCH 073/105] (sendmail-pre-abbrev-expand-hook): Check for self-insert-command, not self-insert. --- lisp/ChangeLog | 5 +++++ lisp/mail/mailabbrev.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29e9027e54e..f817d235f57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-08 Andreas Schwab + + * mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook): Check for + self-insert-command, not self-insert. + 2007-08-08 Glenn Morris * emacs-lisp/checkdoc.el (checkdoc-ispell-lisp-words): Remove `iff'. diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index b3e2c051e7d..8862e6ca2d2 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -495,7 +495,7 @@ of a mail alias. The value is set up, buffer-local, when first needed.") (or (and (integerp last-command-char) ;; Some commands such as M-> may want to expand first. - (equal this-command 'self-insert) + (equal this-command 'self-insert-command) (or (eq (char-syntax last-command-char) ?_) ;; Don't expand on @. (memq last-command-char '(?@ ?. ?% ?! ?_ ?-)))) From 4aaffda19b84c458cc5637c0e3b5dea5eea38fd6 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 8 Aug 2007 14:06:02 +0000 Subject: [PATCH 074/105] (auto-mode-alist): Use the purecopied text (duh!). --- lisp/ChangeLog | 4 ++++ lisp/files.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f817d235f57..24d83794eac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-08-08 Stefan Monnier + + * files.el (auto-mode-alist): Use the purecopied text (duh!). + 2007-08-08 Andreas Schwab * mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook): Check for diff --git a/lisp/files.el b/lisp/files.el index 4d952f3f935..8ade456ee07 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1886,7 +1886,7 @@ since only a single case-insensitive search through the alist is made." ;; c++-mode, java-mode and more) are added through autoload ;; directives in that file. That way is discouraged since it ;; spreads out the definition of the initial value. - (mapc + (mapcar (lambda (elt) (cons (purecopy (car elt)) (cdr elt))) `(;; do this first, so that .html.pl is Polish html, not Perl From ea1711904fd349350ae115269d0fb0e611b45dd9 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Wed, 8 Aug 2007 16:37:46 +0000 Subject: [PATCH 075/105] ps-print-color-p fix --- lisp/ChangeLog | 7 +++++++ lisp/ps-print.el | 15 ++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24d83794eac..fe3b90d5100 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2007-08-08 Vinicius Jose Latorre + + * ps-print.el (ps-default-fg, ps-default-bg): Docstring fix. + (ps-begin-job): Use ps-default-fg and ps-default-bg only when + ps-print-color-p is neither nil nor black-white. Reported by Christian + Schlauer . + 2007-08-08 Stefan Monnier * files.el (auto-mode-alist): Use the purecopied text (duh!). diff --git a/lisp/ps-print.el b/lisp/ps-print.el index a2346b8f76b..4f5f67fd91e 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -3016,7 +3016,8 @@ Valid values are: Any other value is ignored and black color will be used. -It's used only when `ps-print-color-p' is non-nil." +This variable is used only when `ps-print-color-p' (which see) is neither nil +nor black-white." :type '(choice :menu-tag "Default Foreground Gray/Color" :tag "Default Foreground Gray/Color" (const :tag "Session Foreground" t) @@ -3059,7 +3060,8 @@ Valid values are: Any other value is ignored and white color will be used. -It's used only when `ps-print-color-p' is non-nil. +This variable is used only when `ps-print-color-p' (which see) is neither nil +nor black-white. See also `ps-use-face-background'." :type '(choice :menu-tag "Default Background Gray/Color" @@ -5920,7 +5922,8 @@ XSTART YSTART are the relative position for the first page in a sheet.") 1.0) ps-default-background (ps-rgb-color (cond - ((or (not (eq ps-print-color-p t)) + ((or (member ps-print-color-p + '(nil back-white)) (eq genfunc 'ps-generate-postscript)) nil) ((eq ps-default-bg 'frame-parameter) @@ -5933,7 +5936,8 @@ XSTART YSTART are the relative position for the first page in a sheet.") 1.0) ps-default-foreground (ps-rgb-color (cond - ((or (not (eq ps-print-color-p t)) + ((or (member ps-print-color-p + '(nil back-white)) (eq genfunc 'ps-generate-postscript)) nil) ((eq ps-default-fg 'frame-parameter) @@ -5944,7 +5948,8 @@ XSTART YSTART are the relative position for the first page in a sheet.") ps-default-fg)) "unspecified-fg" 0.0) - ps-default-color (and (eq ps-print-color-p t) + ps-default-color (and (not (member ps-print-color-p + '(nil back-white))) ps-default-foreground) ps-current-color ps-default-color) ;; initialize page dimensions From 4cb071a4bd34c40215e88ca8fa31eec0e796def9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 8 Aug 2007 19:44:55 +0000 Subject: [PATCH 076/105] (Man-next-section): Make sure we do not move backward. --- lisp/man.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/man.el b/lisp/man.el index 56539072439..03003a46d1b 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -64,7 +64,7 @@ ;; ========== Features ========== ;; + Runs "man" in the background and pipes the results through a ;; series of sed and awk scripts so that all retrieving and cleaning -;; is done in the background. The cleaning commands are configurable. +;; is done in the background. The cleaning commands are configurable. ;; + Syntax is the same as Un*x man ;; + Functionality is the same as Un*x man, including "man -k" and ;; "man

", etc. @@ -1291,14 +1291,18 @@ The following key bindings are currently in effect in the buffer: (defun Man-next-section (n) "Move point to Nth next section (default 1)." (interactive "p") - (let ((case-fold-search nil)) + (let ((case-fold-search nil) + (start (point))) (if (looking-at Man-heading-regexp) (forward-line 1)) (if (re-search-forward Man-heading-regexp (point-max) t n) (beginning-of-line) (goto-char (point-max)) ;; The last line doesn't belong to any section. - (forward-line -1)))) + (forward-line -1)) + ;; But don't move back from the starting point (can happen if `start' + ;; is somewhere on the last line). + (if (< (point) start) (goto-char start)))) (defun Man-previous-section (n) "Move point to Nth previous section (default 1)." From a88459cd637fe9fbe44491468cac08fbc840171b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 8 Aug 2007 19:52:03 +0000 Subject: [PATCH 077/105] Remove spurious * in docstrings. Merge defvars and toplevel setq-defaults. (Man-highlight-references0): Limit=nil rather than point-max. (Man-mode-map): Move initialization into the declaration. (Man-strip-page-headers, Man-unindent): Use dolist & inhibit-read-only. (Man-view-header-file): Use expand-file-name rather than concat. (Man-notify-when-ready, Man-bgproc-sentinel): Use with-current-buffer. --- lisp/ChangeLog | 12 +++++ lisp/man.el | 136 ++++++++++++++++++++++--------------------------- 2 files changed, 72 insertions(+), 76 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe3b90d5100..ae2e80bd306 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2007-08-08 Stefan Monnier + + * man.el: Remove spurious * in docstrings. + Merge defvars and toplevel setq-defaults. + (Man-highlight-references0): Limit=nil rather than point-max. + (Man-mode-map): Move initialization into the declaration. + (Man-strip-page-headers, Man-unindent): Use dolist & inhibit-read-only. + (Man-view-header-file): Use expand-file-name rather than concat. + (Man-notify-when-ready, Man-bgproc-sentinel): Use with-current-buffer. + + * man.el (Man-next-section): Make sure we do not move backward. + 2007-08-08 Vinicius Jose Latorre * ps-print.el (ps-default-fg, ps-default-bg): Docstring fix. diff --git a/lisp/man.el b/lisp/man.el index 03003a46d1b..c7593e88dda 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -37,7 +37,7 @@ ;; ========== Credits and History ========== ;; In mid 1991, several people posted some interesting improvements to -;; man.el from the standard emacs 18.57 distribution. I liked many of +;; man.el from the standard Emacs 18.57 distribution. I liked many of ;; these, but wanted everything in one single package, so I decided ;; to incorporate them into a single manual browsing mode. While ;; much of the code here has been rewritten, and some features added, @@ -109,8 +109,6 @@ (defvar Man-notify) -(defvar Man-current-page) -(defvar Man-page-list) (defcustom Man-filter-list nil "*Manpage cleaning filter command phrases. This variable contains a list of the following form: @@ -127,13 +125,8 @@ the manpage buffer." (string :tag "Phrase String")))) :group 'man) -(defvar Man-original-frame) -(defvar Man-arguments) -(defvar Man-sections-alist) -(defvar Man-refpages-alist) (defvar Man-uses-untabify-flag t "Non-nil means use `untabify' instead of `Man-untabify-command'.") -(defvar Man-page-mode-string) (defvar Man-sed-script nil "Script for sed to nuke backspaces and ANSI codes from manpages.") @@ -141,28 +134,28 @@ the manpage buffer." ;; user variables (defcustom Man-fontify-manpage-flag t - "*Non-nil means make up the manpage with fonts." + "Non-nil means make up the manpage with fonts." :type 'boolean :group 'man) (defcustom Man-overstrike-face 'bold - "*Face to use when fontifying overstrike." + "Face to use when fontifying overstrike." :type 'face :group 'man) (defcustom Man-underline-face 'underline - "*Face to use when fontifying underlining." + "Face to use when fontifying underlining." :type 'face :group 'man) (defcustom Man-reverse-face 'highlight - "*Face to use when fontifying reverse video." + "Face to use when fontifying reverse video." :type 'face :group 'man) ;; Use the value of the obsolete user option Man-notify, if set. (defcustom Man-notify-method (if (boundp 'Man-notify) Man-notify 'friendly) - "*Selects the behavior when manpage is ready. + "Selects the behavior when manpage is ready. This variable may have one of the following values, where (sf) means that the frames are switched, so the manpage is displayed in the frame where the man command was called from: @@ -183,7 +176,7 @@ Any other value of `Man-notify-method' is equivalent to `meek'." :group 'man) (defcustom Man-width nil - "*Number of columns for which manual pages should be formatted. + "Number of columns for which manual pages should be formatted. If nil, the width of the window selected at the moment of man invocation is used. If non-nil, the width of the frame selected at the moment of man invocation is used. The value also can be a @@ -194,12 +187,12 @@ positive integer." :group 'man) (defcustom Man-frame-parameters nil - "*Frame parameter list for creating a new frame for a manual page." + "Frame parameter list for creating a new frame for a manual page." :type 'sexp :group 'man) (defcustom Man-downcase-section-letters-flag t - "*Non-nil means letters in sections are converted to lower case. + "Non-nil means letters in sections are converted to lower case. Some Un*x man commands can't handle uppercase letters in sections, for example \"man 2V chmod\", but they are often displayed in the manpage with the upper case letter. When this variable is t, the section @@ -209,7 +202,7 @@ being sent to the man background process." :group 'man) (defcustom Man-circular-pages-flag t - "*Non-nil means the manpage list is treated as circular for traversal." + "Non-nil means the manpage list is treated as circular for traversal." :type 'boolean :group 'man) @@ -220,7 +213,7 @@ being sent to the man background process." ;; '("3X" . "3") ; Xlib man pages '("3X11" . "3") '("1-UCB" . "")) - "*Association list of bogus sections to real section numbers. + "Association list of bogus sections to real section numbers. Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in their references which Un*x `man' does not recognize. This association list is used to translate those sections, when found, to @@ -250,9 +243,6 @@ the associated section number." (defvar Man-awk-command "awk" "Command used for processing awk scripts.") -(defvar Man-mode-map nil - "Keymap for Man mode.") - (defvar Man-mode-hook nil "Hook run when Man mode is enabled.") @@ -349,20 +339,22 @@ Otherwise, the value is whatever the function ;; end user variables ;; other variables and keymap initializations -(make-variable-buffer-local 'Man-sections-alist) -(make-variable-buffer-local 'Man-refpages-alist) -(make-variable-buffer-local 'Man-page-list) -(make-variable-buffer-local 'Man-current-page) -(make-variable-buffer-local 'Man-page-mode-string) +(defvar Man-original-frame) (make-variable-buffer-local 'Man-original-frame) +(defvar Man-arguments) (make-variable-buffer-local 'Man-arguments) (put 'Man-arguments 'permanent-local t) -(setq-default Man-sections-alist nil) -(setq-default Man-refpages-alist nil) -(setq-default Man-page-list nil) -(setq-default Man-current-page 0) -(setq-default Man-page-mode-string "1 of 1") +(defvar Man-sections-alist nil) +(make-variable-buffer-local 'Man-sections-alist) +(defvar Man-refpages-alist nil) +(make-variable-buffer-local 'Man-refpages-alist) +(defvar Man-page-list nil) +(make-variable-buffer-local 'Man-page-list) +(defvar Man-current-page 0) +(make-variable-buffer-local 'Man-current-page) +(defvar Man-page-mode-string "1 of 1") +(make-variable-buffer-local 'Man-page-mode-string) (defconst Man-sysv-sed-script "\ /\b/ { s/_\b//g @@ -398,30 +390,32 @@ Otherwise, the value is whatever the function table) "Syntax table used in Man mode buffers.") -(unless Man-mode-map - (setq Man-mode-map (make-sparse-keymap)) - (suppress-keymap Man-mode-map) - (set-keymap-parent Man-mode-map button-buffer-map) +(defvar Man-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + (set-keymap-parent map button-buffer-map) - (define-key Man-mode-map " " 'scroll-up) - (define-key Man-mode-map "\177" 'scroll-down) - (define-key Man-mode-map "n" 'Man-next-section) - (define-key Man-mode-map "p" 'Man-previous-section) - (define-key Man-mode-map "\en" 'Man-next-manpage) - (define-key Man-mode-map "\ep" 'Man-previous-manpage) - (define-key Man-mode-map ">" 'end-of-buffer) - (define-key Man-mode-map "<" 'beginning-of-buffer) - (define-key Man-mode-map "." 'beginning-of-buffer) - (define-key Man-mode-map "r" 'Man-follow-manual-reference) - (define-key Man-mode-map "g" 'Man-goto-section) - (define-key Man-mode-map "s" 'Man-goto-see-also-section) - (define-key Man-mode-map "k" 'Man-kill) - (define-key Man-mode-map "q" 'Man-quit) - (define-key Man-mode-map "m" 'man) - ;; Not all the man references get buttons currently. The text in the - ;; manual page can contain references to other man pages - (define-key Man-mode-map "\r" 'man-follow) - (define-key Man-mode-map "?" 'describe-mode)) + (define-key map " " 'scroll-up) + (define-key map "\177" 'scroll-down) + (define-key map "n" 'Man-next-section) + (define-key map "p" 'Man-previous-section) + (define-key map "\en" 'Man-next-manpage) + (define-key map "\ep" 'Man-previous-manpage) + (define-key map ">" 'end-of-buffer) + (define-key map "<" 'beginning-of-buffer) + (define-key map "." 'beginning-of-buffer) + (define-key map "r" 'Man-follow-manual-reference) + (define-key map "g" 'Man-goto-section) + (define-key map "s" 'Man-goto-see-also-section) + (define-key map "k" 'Man-kill) + (define-key map "q" 'Man-quit) + (define-key map "m" 'man) + ;; Not all the man references get buttons currently. The text in the + ;; manual page can contain references to other man pages + (define-key map "\r" 'man-follow) + (define-key map "?" 'describe-mode) + map) + "Keymap for Man mode.") ;; buttons (define-button-type 'Man-abstract-xref-man-page @@ -730,8 +724,7 @@ all sections related to a subject, put something appropriate into the (require 'env) (message "Invoking %s %s in the background" manual-program man-args) (setq buffer (generate-new-buffer bufname)) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (setq buffer-undo-list t) (setq Man-original-frame (selected-frame)) (setq Man-arguments man-args)) @@ -802,8 +795,7 @@ all sections related to a subject, put something appropriate into the (defun Man-notify-when-ready (man-buffer) "Notify the user when MAN-BUFFER is ready. See the variable `Man-notify-method' for the different notification behaviors." - (let ((saved-frame (save-excursion - (set-buffer man-buffer) + (let ((saved-frame (with-current-buffer man-buffer Man-original-frame))) (cond ((eq Man-notify-method 'newframe) @@ -975,7 +967,7 @@ default type, `Man-xref-man-page' is used for the buttons." (Man-next-section 1) (point))) (goto-char (point-min)) - (point-max)))) + nil))) (while (re-search-forward regexp end t) (make-text-button (match-beginning button-pos) @@ -1031,8 +1023,7 @@ manpage command." (or (stringp process) (set-process-buffer process nil)) - (save-excursion - (set-buffer Man-buffer) + (with-current-buffer Man-buffer (let ((case-fold-search nil)) (goto-char (point-min)) (cond ((or (looking-at "No \\(manual \\)*entry for") @@ -1223,13 +1214,10 @@ The following key bindings are currently in effect in the buffer: (defun Man-strip-page-headers () "Strip all the page headers but the first from the manpage." - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (case-fold-search nil) - (page-list Man-page-list) - (page ()) (header "")) - (while page-list - (setq page (car page-list)) + (dolist (page Man-page-list) (and (nth 2 page) (goto-char (car page)) (re-search-forward Man-first-heading-regexp nil t) @@ -1243,17 +1231,14 @@ The following key bindings are currently in effect in the buffer: ;; line. ;; (setq header (concat "\n" header))) (while (search-forward header (nth 1 page) t) - (replace-match ""))) - (setq page-list (cdr page-list))))) + (replace-match "")))))) (defun Man-unindent () "Delete the leading spaces that indent the manpage." - (let ((buffer-read-only nil) - (case-fold-search nil) - (page-list Man-page-list)) - (while page-list - (let ((page (car page-list)) - (indent "") + (let ((inhibit-read-only t) + (case-fold-search nil)) + (dolist (page Man-page-list) + (let ((indent "") (nindent 0)) (narrow-to-region (car page) (car (cdr page))) (if Man-uses-untabify-flag @@ -1281,7 +1266,6 @@ The following key bindings are currently in effect in the buffer: (or (eolp) (delete-char nindent)) (forward-line 1))) - (setq page-list (cdr page-list)) )))) @@ -1466,7 +1450,7 @@ Specify which REFERENCE to use; default is based on word at point." (let ((path Man-header-file-path) complete-path) (while path - (setq complete-path (concat (car path) "/" file) + (setq complete-path (expand-file-name file (car path)) path (cdr path)) (if (file-readable-p complete-path) (progn (view-file complete-path) From 219d320aabacef2ebfb8dc74c3695f9dea8a7f9a Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 8 Aug 2007 21:14:52 +0000 Subject: [PATCH 078/105] (Example Major Modes): Fix typo. --- lispref/ChangeLog | 4 ++++ lispref/modes.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 59da0e8a455..25bd07b9979 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2007-08-08 Martin Rudalics + + * modes.texi (Example Major Modes): Fix typo. + 2007-08-08 Glenn Morris * intro.texi (nil and t): Do not use `iff' in documentation. diff --git a/lispref/modes.texi b/lispref/modes.texi index 95fbe6a292f..3d60756a901 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1078,7 +1078,7 @@ each calls the following function to set various variables: In Lisp and most programming languages, we want the paragraph commands to treat only blank lines as paragraph separators. And the -modes should undestand the Lisp conventions for comments. The rest of +modes should understand the Lisp conventions for comments. The rest of @code{lisp-mode-variables} sets this up: @smallexample From 2540a3abbdc759f476f130f11ed8963a01c03fc1 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Thu, 9 Aug 2007 01:41:08 +0000 Subject: [PATCH 079/105] username and password default --- lisp/ChangeLog | 5 +++++ lisp/url/url-auth.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae2e80bd306..07e268e5036 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-09 Edward O'Connor (tiny change) + + * url/url-auth.el (url-basic-auth): When prompting for username + and password, default to the username and password in the URL. + 2007-08-08 Stefan Monnier * man.el: Remove spurious * in docstrings. diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 030409c3391..3c33fd914e5 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -68,7 +68,9 @@ instead of the pathname inheritance method." (server (url-host href)) (port (url-port href)) (path (url-filename href)) - user pass byserv retval data) + (user (url-user href)) + (pass (url-password href)) + byserv retval data) (setq server (format "%s:%d" server port) path (cond (realm realm) @@ -79,8 +81,8 @@ instead of the pathname inheritance method." (cond ((and prompt (not byserv)) (setq user (read-string (url-auth-user-prompt url realm) - (user-real-login-name)) - pass (read-passwd "Password: ")) + (or user (user-real-login-name))) + pass (read-passwd "Password: " nil (or pass ""))) (set url-basic-auth-storage (cons (list server (cons path From 6e4a68d2b8e03f4a2f74c73a2af640f84e94b929 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 9 Aug 2007 02:49:10 +0000 Subject: [PATCH 080/105] (help-make-xrefs): Fix previous change. --- lisp/help-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 818a0111cb8..74daa9b8afb 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -438,7 +438,9 @@ that." (while (re-search-forward ;; Assume command name is only word and symbol ;; characters to get things like `use M-x foo->bar'. - "\\ Date: Thu, 9 Aug 2007 03:08:25 +0000 Subject: [PATCH 081/105] (posix_memalign): New function. --- src/ChangeLog | 8 ++++++-- src/gmalloc.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index adef925992c..20469ca12e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-08-09 YAMAMOTO Mitsuharu + + * gmalloc.c (posix_memalign): New function. + 2007-08-08 Glenn Morris * Replace `iff' in doc-strings and comments. @@ -31,8 +35,8 @@ Call malloc_enable_thread on interactive startup. * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable. - [USE_PTHREAD] (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS) - (UNLOCK_ALIGNED_BLOCKS): Conditionalize with it. + (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS) + [USE_PTHREAD]: Conditionalize with it. (malloc_atfork_handler_prepare, malloc_atfork_handler_parent) (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]: New functions. diff --git a/src/gmalloc.c b/src/gmalloc.c index ea6ccc4bf1f..ccc08e1ff68 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -129,6 +129,8 @@ extern FREE_RETURN_TYPE free PP ((__ptr_t __ptr)); #if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */ extern __ptr_t memalign PP ((__malloc_size_t __alignment, __malloc_size_t __size)); +extern int posix_memalign PP ((__ptr_t *, __malloc_size_t, + __malloc_size_t size)); #endif /* Allocate SIZE bytes on a page boundary. */ @@ -1857,6 +1859,36 @@ memalign (alignment, size) return result; } +#ifndef ENOMEM +#define ENOMEM 12 +#endif + +#ifndef EINVAL +#define EINVAL 22 +#endif + +int +posix_memalign (memptr, alignment, size) + __ptr_t *memptr; + __malloc_size_t alignment; + __malloc_size_t size; +{ + __ptr_t mem; + + if (alignment == 0 + || alignment % sizeof (__ptr_t) != 0 + || (alignment & (alignment - 1)) != 0) + return EINVAL; + + mem = memalign (alignment, size); + if (mem == NULL) + return ENOMEM; + + *memptr = mem; + + return 0; +} + #endif /* Not DJGPP v1 */ /* Allocate memory on a page boundary. Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc. From 2b6cdf0a7f850ad04b55296cb2e56cd8cb02a122 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 9 Aug 2007 08:09:03 +0000 Subject: [PATCH 082/105] *** empty log message *** --- admin/FOR-RELEASE | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 1f82c03dfda..05a54dc9257 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -2,6 +2,9 @@ Tasks needed before the next release. * TO BE DONE SHORTLY BEFORE RELEASE +** When Emacs 22.2 is released, change the license on the Savannah page +to GPL v3 or later. + ** Check for widow and orphan lines in manuals; make sure all the pages really look ok in the manual as formatted. From 9d8f43bfbf6cda54e39a060c3626e52fed973e01 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 9 Aug 2007 14:39:20 +0000 Subject: [PATCH 083/105] (vc-rcs-find-file-not-found-hook): Move from vc-default-find-file-not-found-hook. --- lisp/vc-rcs.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index d73f8522115..b341f82a73b 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -225,6 +225,14 @@ When VERSION is given, perform check for that version." ;; The workfile is unchanged if rcsdiff found no differences. (zerop status))) +(defun vc-rcs-find-file-not-found-hook () + (if (yes-or-no-p + (format "File %s was lost; check out from version control? " + (file-name-nondirectory buffer-file-name))) + (save-excursion + (require 'vc) + (let ((default-directory (file-name-directory buffer-file-name))) + (not (vc-error-occurred (vc-checkout buffer-file-name))))))) ;;; ;;; State-changing functions From a37737301211b72450b98033f5f2786bc871bc7a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 9 Aug 2007 14:42:00 +0000 Subject: [PATCH 084/105] (vc-default-find-file-not-found-hook): Do nothing. --- lisp/ChangeLog | 11 +++++++++-- lisp/vc-hooks.el | 10 +++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 07e268e5036..7a9b0933d5b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,14 @@ +2007-08-09 Stefan Monnier + + * vc-hooks.el (vc-default-find-file-not-found-hook): Do nothing. + + * vc-rcs.el (vc-rcs-find-file-not-found-hook): + Move from vc-default-find-file-not-found-hook. + 2007-08-09 Edward O'Connor (tiny change) - * url/url-auth.el (url-basic-auth): When prompting for username - and password, default to the username and password in the URL. + * url/url-auth.el (url-basic-auth): When prompting for username + and password, default to the username and password in the URL. 2007-08-08 Stefan Monnier diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 052365945f2..0356e10fe5c 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -838,13 +838,9 @@ Used in `find-file-not-found-functions'." (if backend (vc-call-backend backend 'find-file-not-found-hook)))) (defun vc-default-find-file-not-found-hook (backend) - (if (yes-or-no-p - (format "File %s was lost; check out from version control? " - (file-name-nondirectory buffer-file-name))) - (save-excursion - (require 'vc) - (setq default-directory (file-name-directory buffer-file-name)) - (not (vc-error-occurred (vc-checkout buffer-file-name)))))) + ;; This used to do what vc-rcs-find-file-not-found-hook does, but it only + ;; really makes sense for RCS. For other backends, better not do anything. + nil) (add-hook 'find-file-not-found-functions 'vc-file-not-found-hook) From 33e5d7d4c9998782b15081248e49b951725ed5f3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 9 Aug 2007 14:57:45 +0000 Subject: [PATCH 085/105] (vc-bzr-registered): Use \0 instead of literal NULs. (vc-bzr-state-words): Add "kind changed" state word. (vc-bzr-status): New function. Return Bzr idea of file status, which is different from VC's. (vc-bzr-state): Use vc-bzr-status. (vc-workfile-unchanged-p): Use vc-bzr-status. (vc-bzr-revert): Use synchronous process; expect exitcode 0. (vc-dired-state): Process "kind changed" state word. --- lisp/ChangeLog | 11 +++++++++++ lisp/vc-bzr.el | Bin 23462 -> 24827 bytes 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a9b0933d5b..e53d67b2c41 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2007-08-09 Riccardo Murri + + * vc-bzr.el (vc-bzr-registered): Use \0 instead of literal NULs. + (vc-bzr-state-words): Add "kind changed" state word. + (vc-bzr-status): New function. Return Bzr idea of file status, + which is different from VC's. + (vc-bzr-state): Use vc-bzr-status. + (vc-workfile-unchanged-p): Use vc-bzr-status. + (vc-bzr-revert): Use synchronous process; expect exitcode 0. + (vc-dired-state): Process "kind changed" state word. + 2007-08-09 Stefan Monnier * vc-hooks.el (vc-default-find-file-not-found-hook): Do nothing. diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index cfb417519d3d8e966a11ede6c2133e17e4225151..a11aa2e7ba895d7fd13eb2a2eae71c1b9841e90a 100644 GIT binary patch delta 1439 zcmY*ZL2nyH6xK$Kh?f!)H+GwZq_10$*T_zT#0evzB9hdiR45KD2UK;kGmb}D&p5NQ zF|H6%C2kz3G&eYLL7Y(03UP&BfcOC@XL>;5+ylIs-A&>>y?Ni8H}Cu2d;7z$-izP8 zXTR0VHywXIjHHN&hT!36n}Kh>zkk*I(U~=W*Y2379e*}B^WLp*S!$*a zqxSw|)lM|gX#!!N$E@iC1iMV9O2Bsa?iLgvi6W^e7YCpvy#H8j_(jk$iBkqV0Rqv9 z6qu&BcYE)X9&Esa+q?I=_jZ~s7!R0Y<=F-MiB>in7AJVz0)j+}iC0}Vncqb=_=0lAiEBcYtC;d0be644svVLm|ha<&OtE8UW>r zMLM1U@=`1rNh|=VJwibW&JB>M9;Lcvi)^GKe~J25P%Bk}v}D3C!Ds?pV6`XAY3@`~ z%&EdD6PiaPw#h9Yq~^O|2K$O&Qc!Fp6RxG2xR+24*R%WyJ-`VeD4vkoSL}c%8l|K# z=6aC#!SD7_y$LX--p0yg6s1Ur+KN;vge~SGsg|t*p}fWTnE9`|YM!n1>VRKZwELWH zR$Cp-csQPW*Gy-rvYhLN#kNOIg(d{I-U}dblQ{!mzFPZkAy38hQ6Z&ybG>IacV^9( z>(xroEPCl?`HS^eSI)Z|+|Y&FS`>WBga6YQDX( z>^03%@PYYyW#M7WKDPtWj+urq#Mw(@G^Tgatzy$IBlZNhM}YlXBqQvb4bK6Du$VBS z>Vn(cxpB+<6V~g_ACe?F!Vpr1AjK<-jWBe}ggeS8*NmdKwiKSrJ_RgdjZXY2Z#68n zo^sn@C-aoo4-181!<<&GUdGA`U315(a}*1PH`7sD%QhvNHJj$iPR;xhy#89bfH|FM z!OY^qayECfJMV2~58m=$uK4&X-0pt*(N^~3yL8^WnO*+y=}Q;>mu9WkbI1JA?8)vM GmHz>PY5QaU!f*XyZ#ArTXJ&Cu6Ua5sP3KFbTNFkaCp6*7M&N`>*KMAd>npN7Wda!bdzkNSa-(Tr^zU zpg)8(6UBB&;_u$AeId!DMcllKf673P$ Date: Fri, 10 Aug 2007 06:52:30 +0000 Subject: [PATCH 086/105] (backquote-delay-process): New function. (backquote-process): Add internal arg `level'. Use the two to correctly handle nested backquotes. --- lisp/emacs-lisp/backquote.el | 54 ++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index 54fcfc3df8a..6daaf001433 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el @@ -118,10 +118,28 @@ Vectors work just like lists. Nested backquotes are permitted." ;; constant, 1 => to be unquoted, 2 => to be spliced in. ;; The top-level backquote macro just discards the tag. -(defun backquote-process (s) +(defun backquote-delay-process (s level) + "Process a (un|back|splice)quote inside a backquote. +This simply recurses through the body." + (let ((exp (backquote-listify (list (backquote-process (nth 1 s) level) + (cons 0 (list 'quote (car s)))) + '(0)))) + (if (eq (car-safe exp) 'quote) + (cons 0 (list 'quote s)) + (cons 1 exp)))) + +(defun backquote-process (s &optional level) + "Process the body of a backquote. +S is the body. Returns a cons cell whose cdr is piece of code which +is the macro-expansion of S, and whose car is a small integer whose value +can either indicate that the code is constant (0), or not (1), or returns +a list which should be spliced into its environment (2). +LEVEL is only used internally and indicates the nesting level: +0 (the default) is for the toplevel nested inside a single backquote." + (unless level (setq level 0)) (cond ((vectorp s) - (let ((n (backquote-process (append s ())))) + (let ((n (backquote-process (append s ()) level))) (if (= (car n) 0) (cons 0 s) (cons 1 (cond @@ -138,11 +156,15 @@ Vectors work just like lists. Nested backquotes are permitted." s (list 'quote s)))) ((eq (car s) backquote-unquote-symbol) - (cons 1 (nth 1 s))) + (if (<= level 0) + (cons 1 (nth 1 s)) + (backquote-delay-process s (1- level)))) ((eq (car s) backquote-splice-symbol) - (cons 2 (nth 1 s))) + (if (<= level 0) + (cons 2 (nth 1 s)) + (backquote-delay-process s (1- level)))) ((eq (car s) backquote-backquote-symbol) - (backquote-process (cdr (backquote-process (nth 1 s))))) + (backquote-delay-process s (1+ level))) (t (let ((rest s) item firstlist list lists expression) @@ -154,11 +176,13 @@ Vectors work just like lists. Nested backquotes are permitted." ;; at the beginning, put them in FIRSTLIST, ;; as a list of tagged values (TAG . FORM). ;; If there are any at the end, they go in LIST, likewise. - (while (consp rest) - ;; Turn . (, foo) into (,@ foo). - (if (eq (car rest) backquote-unquote-symbol) - (setq rest (list (list backquote-splice-symbol (nth 1 rest))))) - (setq item (backquote-process (car rest))) + (while (and (consp rest) + ;; Stop if the cdr is an expression inside a backquote or + ;; unquote since this needs to go recursively through + ;; backquote-process. + (not (or (eq (car rest) backquote-unquote-symbol) + (eq (car rest) backquote-backquote-symbol)))) + (setq item (backquote-process (car rest) level)) (cond ((= (car item) 2) ;; Put the nonspliced items before the first spliced item @@ -168,8 +192,8 @@ Vectors work just like lists. Nested backquotes are permitted." list nil)) ;; Otherwise, put any preceding nonspliced items into LISTS. (if list - (setq lists (cons (backquote-listify list '(0 . nil)) lists))) - (setq lists (cons (cdr item) lists)) + (push (backquote-listify list '(0 . nil)) lists)) + (push (cdr item) lists) (setq list nil)) (t (setq list (cons item list)))) @@ -177,8 +201,8 @@ Vectors work just like lists. Nested backquotes are permitted." ;; Handle nonsplicing final elements, and the tail of the list ;; (which remains in REST). (if (or rest list) - (setq lists (cons (backquote-listify list (backquote-process rest)) - lists))) + (push (backquote-listify list (backquote-process rest level)) + lists)) ;; Turn LISTS into a form that produces the combined list. (setq expression (if (or (cdr lists) @@ -221,5 +245,5 @@ Vectors work just like lists. Nested backquotes are permitted." tail)) (t (cons 'list heads))))) -;;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a +;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a ;;; backquote.el ends here From 62fc0b713fd855a94153a2045dbf985b28e24770 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Aug 2007 06:52:54 +0000 Subject: [PATCH 087/105] *** empty log message *** --- etc/NEWS | 4 + lisp/ChangeLog | 6 ++ lisp/textmodes/bibtex-style.el | 155 +++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 lisp/textmodes/bibtex-style.el diff --git a/etc/NEWS b/etc/NEWS index 7c0712ca724..a428a39f421 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -55,6 +55,8 @@ in to make it use the scrollbars from the system theme. * New Modes and Packages in Emacs 22.2 +** bibtex-style-mode helps you write BibTeX's *.bst files. + ** The new package css-mode.el provides a major mode for editing CSS files. ** The new package vera-mode.el provides a major mode for editing Vera files. @@ -67,6 +69,8 @@ in to make it use the scrollbars from the system theme. *** VC has some support for Mercurial (hg). +*** VC has some support for Bazaar (Bzr). + *** VC has some support for Git. * Lisp Changes in Emacs 22.2. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e53d67b2c41..43508f79101 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-10 Stefan Monnier + + * emacs-lisp/backquote.el (backquote-delay-process): New function. + (backquote-process): Add internal arg `level'. Use the two to + correctly handle nested backquotes. + 2007-08-09 Riccardo Murri * vc-bzr.el (vc-bzr-registered): Use \0 instead of literal NULs. diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el new file mode 100644 index 00000000000..99c2f92cab0 --- /dev/null +++ b/lisp/textmodes/bibtex-style.el @@ -0,0 +1,155 @@ +;;; bibtex-style.el --- Major mode for BibTeX Style files + +;; Copyright (C) 2005,2007 Free Software Foundation, Inc. + +;; Author: Stefan Monnier +;; Keywords: + +;; 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 3, 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Done: font-lock, imenu, outline, commenting, indentation. +;; Todo: tab-completion. +;; Bugs: + +;;; Code: + +(defvar bibtex-style-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?% "<" st) + (modify-syntax-entry ?\n ">" st) + (modify-syntax-entry ?\{ "(}" st) + (modify-syntax-entry ?\} "){" st) + (modify-syntax-entry ?\" "\"" st) + (modify-syntax-entry ?. "_" st) + (modify-syntax-entry ?' "'" st) + (modify-syntax-entry ?# "'" st) + (modify-syntax-entry ?* "." st) + (modify-syntax-entry ?= "." st) + (modify-syntax-entry ?$ "_" st) + st)) + + +(defconst bibtex-style-commands + '("ENTRY" "EXECUTE" "FUNCTION" "INTEGERS" "ITERATE" "MACRO" "READ" + "REVERSE" "SORT" "STRINGS")) + +(defconst bibtex-style-functions + ;; From http://www.eeng.dcu.ie/local-docs/btxdocs/btxhak/btxhak/node4.html. + '("<" ">" "=" "+" "-" "*" ":=" + "add.period$" "call.type$" "change.case$" "chr.to.int$" "cite$" + "duplicate$" "empty$" "format.name$" "if$" "int.to.chr$" "int.to.str$" + "missing$" "newline$" "num.names$" "pop$" "preamble$" "purify$" "quote$" + "skip$" "stack$" "substring$" "swap$" "text.length$" "text.prefix$" + "top$" "type$" "warning$" "while$" "width$" "write$")) + +(defvar bibtex-style-font-lock-keywords + `((,(regexp-opt bibtex-style-commands 'words) . font-lock-keyword-face) + ("\\w+\\$" . font-lock-keyword-face) + ("\\<\\(FUNCTION\\|MACRO\\)\\s-+{\\([^}\n]+\\)}" + (2 font-lock-function-name-face)))) + +;;;###autoload (add-to-list 'auto-mode-alist '("\\.bst\\'" . bibtex-style-mode)) + +;;;###autoload +(define-derived-mode bibtex-style-mode nil "BibStyle" + "Major mode for editing BibTeX style files." + (set (make-local-variable 'comment-start) "%") + (set (make-local-variable 'outline-regexp) "^[a-z]") + (set (make-local-variable 'imenu-generic-expression) + '((nil "\\<\\(FUNCTION\\|MACRO\\)\\s-+{\\([^}\n]+\\)}" 2))) + (set (make-local-variable 'indent-line-function) 'bibtex-style-indent-line) + (set (make-local-variable 'parse-sexp-ignore-comments) t) + (setq font-lock-defaults + '(bibtex-style-font-lock-keywords nil t + ((?. . "w"))))) + +(defun bibtex-style-indent-line () + "Indent current line of BibTeX Style code." + (interactive) + (let* ((savep (point)) + (indent (condition-case nil + (save-excursion + (forward-line 0) + (skip-chars-forward " \t") + (if (>= (point) savep) (setq savep nil)) + (max (bibtex-style-calculate-indentation) 0)) + (error 0)))) + (if savep + (save-excursion (indent-line-to indent)) + (indent-line-to indent)))) + +(defcustom bibtex-style-indent-basic 2 + "Basic amount of indentation to use in BibTeX Style mode." + :type 'integer) + +(defun bibtex-style-calculate-indentation (&optional virt) + (or + ;; Stick the first line at column 0. + (and (= (point-min) (line-beginning-position)) 0) + ;; Commands start at column 0. + (and (looking-at (regexp-opt bibtex-style-commands 'words)) 0) + ;; Trust the current indentation, if such info is applicable. + (and virt (save-excursion (skip-chars-backward " \t{") (bolp)) + (current-column)) + ;; Put leading close-paren where the matching open brace would be. + (and (looking-at "}") + (condition-case nil + (save-excursion + (up-list -1) + (bibtex-style-calculate-indentation 'virt)) + (scan-error nil))) + ;; Align leading "if$" with previous command. + (and (looking-at "if\\$") + (condition-case nil + (save-excursion + (backward-sexp 3) + (bibtex-style-calculate-indentation 'virt)) + (scan-error + ;; There is no command before the "if$". + (condition-case nil + (save-excursion + (up-list -1) + (+ bibtex-style-indent-basic + (bibtex-style-calculate-indentation 'virt))) + (scan-error nil))))) + ;; Right after an opening brace. + (condition-case err (save-excursion (backward-sexp 1) nil) + (scan-error (goto-char (nth 2 err)) + (+ bibtex-style-indent-basic + (bibtex-style-calculate-indentation 'virt)))) + ;; Default, align with previous command. + (let ((fai ;; First arm of an "if$". + (condition-case nil + (save-excursion + (forward-sexp 2) + (forward-comment (point-max)) + (looking-at "if\\$")) + (scan-error nil)))) + (save-excursion + (condition-case err + (while (progn + (backward-sexp 1) + (save-excursion (skip-chars-backward " \t{") (not (bolp))))) + (scan-error nil)) + (+ (current-column) + (if (or fai (looking-at "ENTRY")) bibtex-style-indent-basic 0)))))) + + +(provide 'bibtex-style) +;; arch-tag: b20ad41a-fd36-466e-8fd2-cc6137f9c55c +;;; bibtex-style.el ends here From a22dec271e8bb8be08a87e9aad39bb59ffb4d284 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Aug 2007 08:01:30 +0000 Subject: [PATCH 088/105] (new_backquote_output): Rename from old_backquote_output. (print): Inverse its logic (according to its name) so as to match the behavior of new_backquote_flag in lread.c. --- src/ChangeLog | 6 ++++++ src/print.c | 20 ++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 20469ca12e3..dd86df3ef62 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-08-10 Stefan Monnier + + * print.c (new_backquote_output): Rename from old_backquote_output. + (print): Inverse its logic (according to its name) so as to match the + behavior of new_backquote_flag in lread.c. + 2007-08-09 YAMAMOTO Mitsuharu * gmalloc.c (posix_memalign): New function. diff --git a/src/print.c b/src/print.c index f7060024f32..cae80d1acfe 100644 --- a/src/print.c +++ b/src/print.c @@ -93,8 +93,8 @@ Lisp_Object Vfloat_output_format, Qfloat_output_format; /* Avoid actual stack overflow in print. */ int print_depth; -/* Nonzero if inside outputting backquote in old style. */ -int old_backquote_output; +/* Level of nesting inside outputting backquote in new style. */ +int new_backquote_output; /* Detect most circularities to print finite output. */ #define PRINT_CIRCLE 200 @@ -1291,7 +1291,7 @@ print (obj, printcharfun, escapeflag) register Lisp_Object printcharfun; int escapeflag; { - old_backquote_output = 0; + new_backquote_output = 0; /* Reset print_number_index and Vprint_number_table only when the variable Vprint_continuous_numbering is nil. Otherwise, @@ -1756,14 +1756,24 @@ print_object (obj, printcharfun, escapeflag) print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); } else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) - && ! old_backquote_output + && ((EQ (XCAR (obj), Qbackquote)))) + { + print_object (XCAR (obj), printcharfun, 0); + new_backquote_output++; + print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); + new_backquote_output--; + } + else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) + && new_backquote_output && ((EQ (XCAR (obj), Qbackquote) || EQ (XCAR (obj), Qcomma) || EQ (XCAR (obj), Qcomma_at) || EQ (XCAR (obj), Qcomma_dot)))) { print_object (XCAR (obj), printcharfun, 0); + new_backquote_output--; print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); + new_backquote_output++; } else { @@ -1783,9 +1793,7 @@ print_object (obj, printcharfun, escapeflag) print_object (Qbackquote, printcharfun, 0); PRINTCHAR (' '); - ++old_backquote_output; print_object (XCAR (XCDR (tem)), printcharfun, 0); - --old_backquote_output; PRINTCHAR (')'); obj = XCDR (obj); From 5bdc71d0cd0dde41c781591951695cf509585f78 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Aug 2007 08:20:20 +0000 Subject: [PATCH 089/105] (log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings. --- lisp/ChangeLog | 3 +++ lisp/log-view.el | 18 +++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 43508f79101..713ad4d3bf6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2007-08-10 Stefan Monnier + * log-view.el (log-view-font-lock-keywords): Use `eval' so as to adapt + to buffer-local settings. + * emacs-lisp/backquote.el (backquote-delay-process): New function. (backquote-process): Add internal arg `level'. Use the two to correctly handle nested backquotes. diff --git a/lisp/log-view.el b/lisp/log-view.el index 6a1fc9a11b1..41e689f0025 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el @@ -160,14 +160,18 @@ (concat "\\|[^ \n].*[^0-9\n][0-9][0-9]:[0-9][0-9][^0-9\n].*[^ \n]" ;;Email of user and finally Msg, used as revision name. " .*@.*\n\\(?: \\* \\(.*\\)\\)?") - "\\)$")) + "\\)$") + "Regexp matching the text identifying a revision.") + +(defvar log-view-font-lock-keywords + ;; We use `eval' so as to use the buffer-local value of log-view-file-re + ;; and log-view-message-re, if applicable. + '((eval . `(,log-view-file-re + (1 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) + (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) + (0 log-view-file-face append))) + (eval . `(,log-view-message-re . log-view-message-face)))) -(defconst log-view-font-lock-keywords - `((,log-view-file-re - (1 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) - (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) - (0 log-view-file-face append)) - (,log-view-message-re . log-view-message-face))) (defconst log-view-font-lock-defaults '(log-view-font-lock-keywords t nil nil nil)) From 14e1270cdebbb0a3dbb340ae32d69ff4180d5e21 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 11 Aug 2007 02:06:37 +0000 Subject: [PATCH 090/105] (x_draw_image_glyph_string): Adjust stipple origin when filling pixmap with stippled background. --- src/ChangeLog | 5 +++++ src/xterm.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index dd86df3ef62..0447af98490 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-11 YAMAMOTO Mitsuharu + + * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when + filling pixmap with stippled background. + 2007-08-10 Stefan Monnier * print.c (new_backquote_output): Rename from old_backquote_output. diff --git a/src/xterm.c b/src/xterm.c index 00d653fc19f..512fff35f50 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2476,9 +2476,11 @@ x_draw_image_glyph_string (s) { /* Fill background with a stipple pattern. */ XSetFillStyle (s->display, s->gc, FillOpaqueStippled); + XSetTSOrigin (s->display, s->gc, - s->x, - s->y); XFillRectangle (s->display, pixmap, s->gc, 0, 0, s->background_width, s->height); XSetFillStyle (s->display, s->gc, FillSolid); + XSetTSOrigin (s->display, s->gc, 0, 0); } else { From 31dab3b61e2c516b8045b6db9452e9fbf548e7c4 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 11 Aug 2007 02:59:26 +0000 Subject: [PATCH 091/105] *** empty log message *** --- admin/FOR-RELEASE | 3 --- 1 file changed, 3 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 05a54dc9257..1f82c03dfda 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -2,9 +2,6 @@ Tasks needed before the next release. * TO BE DONE SHORTLY BEFORE RELEASE -** When Emacs 22.2 is released, change the license on the Savannah page -to GPL v3 or later. - ** Check for widow and orphan lines in manuals; make sure all the pages really look ok in the manual as formatted. From ba6f8422340d7652908cd759bfaf8d6918754d75 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 17:57:34 +0000 Subject: [PATCH 092/105] *** empty log message *** --- admin/FOR-RELEASE | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 1f82c03dfda..a0b54c2f2ea 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -44,7 +44,9 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. ** timh@insightful.com, 25 June: undigestify-rmail-message in emacs 22.1 doesn't split a digest -* FIXES FOR EMACS 22.3 +** andreas.roehler@online.de, 24 Jul: CVS build on Suse 10.0 failed + +* FIXES FOR EMACS 22.2 Here we list small fixes that arrived too late for Emacs 22.2, but that should be installed on the release branch after 22.2 is released. From e80b38498cc1c021d665993e219ec643e9009598 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 17:59:40 +0000 Subject: [PATCH 093/105] (combine-and-quote-strings): Renamed from strings->string. (split-string-and-unquote): Renamed from string->strings. --- lisp/subr.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 84f216b0861..8de09b032f5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2760,11 +2760,10 @@ Modifies the match data; use `save-match-data' if necessary." list))) (nreverse list))) -;; (string->strings (strings->string X)) == X -(defun strings->string (strings &optional separator) +(defun combine-and-quote-strings (strings &optional separator) "Concatenate the STRINGS, adding the SEPARATOR (default \" \"). This tries to quote the strings to avoid ambiguity such that - (string->strings (strings->string strs)) == strs + (split-string-and-unquote (combine-and-quote-strings strs)) == strs Only some SEPARATORs will work properly." (let ((sep (or separator " "))) (mapconcat @@ -2774,20 +2773,20 @@ Only some SEPARATORs will work properly." str)) strings sep))) -;; (string->strings (strings->string X)) == X -(defun string->strings (string &optional separator) +(defun split-string-and-unquote (string &optional separator) "Split the STRING into a list of strings. -It understands elisp style quoting within STRING such that - (string->strings (strings->string strs)) == strs +It understands Emacs Lisp quoting within STRING, such that + (split-string-and-unquote (combine-and-quote-strings strs)) == strs The SEPARATOR regexp defaults to \"\\s-+\"." (let ((sep (or separator "\\s-+")) (i (string-match "[\"]" string))) - (if (null i) (split-string string sep t) ; no quoting: easy + (if (null i) + (split-string string sep t) ; no quoting: easy (append (unless (eq i 0) (split-string (substring string 0 i) sep t)) (let ((rfs (read-from-string string i))) (cons (car rfs) - (string->strings (substring string (cdr rfs)) - sep))))))) + (split-string-and-unquote (substring string (cdr rfs)) + sep))))))) ;;;; Replacement in strings. From 517e7169e13fcbbd44a0fc6819699b49f732e1da Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 18:00:34 +0000 Subject: [PATCH 094/105] (cvs-qtypedesc-strings): Use new names combine-and-quote-strings and split-string-and-unquote. --- lisp/pcvs-util.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el index 6991f796526..e5ab1638c60 100644 --- a/lisp/pcvs-util.el +++ b/lisp/pcvs-util.el @@ -211,7 +211,8 @@ arguments. If ARGS is not a list, no argument will be passed." (defconst cvs-qtypedesc-string1 (cvs-qtypedesc-create 'identity 'identity t)) (defconst cvs-qtypedesc-string (cvs-qtypedesc-create 'identity 'identity)) (defconst cvs-qtypedesc-strings - (cvs-qtypedesc-create 'string->strings 'strings->string nil)) + (cvs-qtypedesc-create 'split-string-and-unquote + 'combine-and-quote-strings nil)) (defun cvs-query-read (default prompt qtypedesc &optional hist-sym) (let* ((qtypedesc (or qtypedesc cvs-qtypedesc-strings)) From a988c1c2396bd51bed71af9cb64444ba787c10f1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 18:01:29 +0000 Subject: [PATCH 095/105] (flymake-err-line-patterns): Fix infloop in javac regexp. --- lisp/progmodes/flymake.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 0ce53f43937..99e5fb53823 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -927,7 +927,7 @@ Convert it to flymake internal format." ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1) ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1) ;; ant/javac - (" *\\(\\[javac\\]\\)? *\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" + (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" 2 4 nil 5)) ;; compilation-error-regexp-alist) (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) From 00b733b76ddba1c9e7ffc005134aac129195518a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 18:02:39 +0000 Subject: [PATCH 096/105] (gud-common-init): Use new name split-string-and-unquote. --- lisp/progmodes/gud.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 06bdd6a0b5f..d5632ffe09f 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2462,7 +2462,7 @@ comint mode, which see." ;; for local variables in the debugger buffer. (defun gud-common-init (command-line massage-args marker-filter &optional find-file) - (let* ((words (string->strings command-line)) + (let* ((words (split-string-and-unquote command-line)) (program (car words)) (dir default-directory) ;; Extract the file name from WORDS From c0d8c0a4c53163b99ab500a0329c917736c2b131 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 18:05:08 +0000 Subject: [PATCH 097/105] (vi-next-line): Ignore return value of line-move. --- lisp/emulation/vi.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 54fb2d1e997..977a7980803 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -788,7 +788,7 @@ The given COUNT is remembered for future scrollings." "Go down count lines, try to keep at the same column." (interactive "p") (setq this-command 'next-line) ; this is a needed trick - (if (= (point) (or (line-move count) (point))) + (if (= (point) (progn (line-move count) (point))) (ding) ; no moving, already at end of buffer (setq last-command 'next-line))) From ad4fed11b3fc9553c8fb60868c7b4aa52229f437 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Aug 2007 18:11:57 +0000 Subject: [PATCH 098/105] (cvs-reread-cvsrc, cvs-checkout, cvs-mode-checkout) (cvs-execute-single-file): Use new name split-string-and-unquote. (cvs-header-msg): Use new name combine-and-quote-strings. --- etc/NEWS | 3 +++ lisp/ChangeLog | 20 ++++++++++++++++++++ lisp/pcvs.el | 11 ++++++----- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a428a39f421..8e4d7f95f1c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -81,6 +81,9 @@ as its frame. ** The new function `image-refresh' refreshes all images associated with a given image specification. +** The new function `split-string-and-unquote' does (what?) + +** The new function `combine-and-quote-strings' does (what?) * Installation Changes in Emacs 22.1 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 713ad4d3bf6..cba37b26f2a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2007-08-12 Richard Stallman + + * pcvs.el (cvs-reread-cvsrc, cvs-checkout, cvs-mode-checkout) + (cvs-execute-single-file): Use new name split-string-and-unquote. + (cvs-header-msg): Use new name combine-and-quote-strings. + + * emulation/vi.el (vi-next-line): Ignore return value of line-move. + + * progmodes/gud.el (gud-common-init): Use new name + split-string-and-unquote. + + * progmodes/flymake.el (flymake-err-line-patterns): Fix infloop + in javac regexp. + + * pcvs-util.el (cvs-qtypedesc-strings): Use new names + combine-and-quote-strings and split-string-and-unquote. + + * subr.el (combine-and-quote-strings): Renamed from strings->string. + (split-string-and-unquote): Renamed from string->strings. + 2007-08-10 Stefan Monnier * log-view.el (log-view-font-lock-keywords): Use `eval' so as to adapt diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 901110bbfa3..6db3ed31a51 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -182,7 +182,7 @@ (when (re-search-forward (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") nil t) (let* ((sym (intern (concat "cvs-" cmd "-flags"))) - (val (string->strings (or (match-string 2) "")))) + (val (split-string-and-unquote (or (match-string 2) "")))) (cvs-flags-set sym 0 val)))) ;; ensure that cvs doesn't have -q or -Q (cvs-flags-set 'cvs-cvs-flags 0 @@ -612,7 +612,7 @@ If non-nil, NEW means to create a new buffer no matter what." (t arg))) args))) (concat cvs-program " " - (strings->string + (combine-and-quote-strings (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery) (if cvs-cvsroot (list "-d" cvs-cvsroot)) args @@ -941,7 +941,8 @@ With a prefix argument, prompt for cvs FLAGS to use." (let ((root (cvs-get-cvsroot))) (if (or (null root) current-prefix-arg) (setq root (read-string "CVS Root: "))) - (list (string->strings (read-string "Module(s): " (cvs-get-module))) + (list (split-string-and-unquote + (read-string "Module(s): " (cvs-get-module))) (read-directory-name "CVS Checkout Directory: " nil default-directory nil) (cvs-add-branch-prefix @@ -964,7 +965,7 @@ The files are stored to DIR." (if branch (format " (branch: %s)" branch) "")))) (list (read-directory-name prompt nil default-directory nil)))) - (let ((modules (string->strings (cvs-get-module))) + (let ((modules (split-string-and-unquote (cvs-get-module))) (flags (cvs-add-branch-prefix (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))) (cvs-cvsroot (cvs-get-cvsroot))) @@ -2253,7 +2254,7 @@ With prefix argument, prompt for cvs flags." (let* ((args (append constant-args arg-list))) (insert (format "=== %s %s\n\n" - program (strings->string args))) + program (split-string-and-unquote args))) ;; FIXME: return the exit status? (apply 'call-process program nil t t args) From e4f61b3bae7d3d4e33d84b2d8d9dd6d161a54232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 13 Aug 2007 06:36:47 +0000 Subject: [PATCH 099/105] (update_frame_tool_bar): Use -1 as index to gtk_toolbar_insert. --- src/ChangeLog | 5 +++++ src/gtkutil.c | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0447af98490..3cfec569bdd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-13 Jan Dj,Ad(Brv + + * gtkutil.c (update_frame_tool_bar): Use -1 as index + to gtk_toolbar_insert. + 2007-08-11 YAMAMOTO Mitsuharu * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when diff --git a/src/gtkutil.c b/src/gtkutil.c index d463e0e6d79..7dc451a5d04 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3372,12 +3372,15 @@ xg_tool_bar_callback (w, client_data) key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); XSETFRAME (frame, f); + + /* We generate two events here. The first one is to set the prefix + to `(tool_bar)', see keyboard.c. */ event.kind = TOOL_BAR_EVENT; event.frame_or_window = frame; - event.arg = frame; - kbd_buffer_store_event (&event); - - event.kind = TOOL_BAR_EVENT; + event.arg = frame; + kbd_buffer_store_event (&event); + + event.kind = TOOL_BAR_EVENT; event.frame_or_window = frame; event.arg = key; /* Convert between the modifier bits GDK uses and the modifier bits @@ -3799,7 +3802,7 @@ update_frame_tool_bar (f) gtk_container_add (GTK_CONTAINER (weventbox), wbutton); ti = gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (ti), weventbox); - gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); + gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); } continue; } @@ -3816,7 +3819,7 @@ update_frame_tool_bar (f) gtk_container_add (GTK_CONTAINER (weventbox), wbutton); ti = gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (ti), weventbox); - gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); + gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); /* The EMACS_INT cast avoids a warning. */ From 9f78fa2c10028d45c29c67efd03fd43368e93bca Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 13 Aug 2007 09:26:45 +0000 Subject: [PATCH 100/105] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cba37b26f2a..f1ee5598d34 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-08-13 Nick Roberts + + * progmodes/gdb-ui.el (gdb-send): Handle CTRL-D more carefully. + 2007-08-12 Richard Stallman * pcvs.el (cvs-reread-cvsrc, cvs-checkout, cvs-mode-checkout) From cdf71ff2ef86e20d8892da4a938a93e1a0c5377b Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 13 Aug 2007 09:28:31 +0000 Subject: [PATCH 101/105] (gdb-send): Handle CTRL-D more carefully. --- lisp/progmodes/gdb-ui.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index c4d14462245..716b79138f9 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1132,10 +1132,10 @@ This filter may simply queue input for a later time." (let ((item (concat string "\n"))) (if gdb-enable-debug (push (cons 'send item) gdb-debug-log)) (process-send-string proc item))) - (if (and (string-match "\\\\$" string) - (not comint-input-sender-no-newline)) ;;Try to catch C-d. + (if (string-match "\\\\\\'" string) (setq gdb-continuation (concat gdb-continuation string "\n")) - (let ((item (concat gdb-continuation string "\n"))) + (let ((item (concat gdb-continuation string + (if (not comint-input-sender-no-newline) "\n")))) (gdb-enqueue-input item) (setq gdb-continuation nil))))) From a6631b3a5ca7a53774eb7a98b1a38619ffc92762 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:37:50 +0000 Subject: [PATCH 102/105] (cvs-parse-table): Handle additional instance of optional quotes around files in NEED-UPDATE . REMOVED case. --- lisp/pcvs-parse.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/pcvs-parse.el b/lisp/pcvs-parse.el index c26a27ed008..3ca1829030f 100644 --- a/lisp/pcvs-parse.el +++ b/lisp/pcvs-parse.el @@ -284,6 +284,8 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'." ;; File removed, since it is removed (by third party) in repository. (and (cvs-or + ;; some cvs versions output quotes around these files + (cvs-match "warning: `\\(.*\\)' is not (any longer) pertinent$" (file 1)) (cvs-match "warning: \\(.*\\) is not (any longer) pertinent$" (file 1)) (cvs-match "`\\(.*\\)' is no longer in the repository$" (file 1)) (cvs-match "\\(.*\\) is no longer in the repository$" (file 1))) From 0fad0ff9f7ba9c21c4d745e71d4aef27833c3b8a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:38:37 +0000 Subject: [PATCH 103/105] (ada-gnatls-args): Fix docstring. (ada-treat-cmd-string): Improve error message. (ada-do-file-completion): Call `ada-require-project-file', so project variables are set properly. (ada-prj-find-prj-file): Delete Emacs 20.2 support. (ada-gnatfind-buffer-name): New constant. (ada-find-any-references): Use new constant. Set buffer name properly in compilation-start. Toggle read-only properly. (ada-find-in-src-path): Fix spelling error in docstring. --- lisp/progmodes/ada-xref.el | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index e8db3d51c2a..c37d11910d4 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -71,7 +71,7 @@ Set to 0, if you don't use crunched filenames. This should be a string." :type 'string :group 'ada) (defcustom ada-gnatls-args '("-v") - "*Arguments to pass to `gnatfind' to find location of the runtime. + "*Arguments to pass to `gnatls' to find location of the runtime. Typical use is to pass `--RTS=soft-floats' on some systems that support it. You can also add `-I-' if you do not want the current directory to be included. @@ -322,7 +322,6 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command." (reverse ada-xref-runtime-library-ali-path)) )) - (defun ada-treat-cmd-string (cmd-string) "Replace meta-sequences like ${...} in CMD-STRING with the appropriate value. Assumes project exists. @@ -345,7 +344,7 @@ replaced by the name including the extension." ;; Check if there is an environment variable with the same name (if (null value) (if (not (setq value (getenv name))) - (message "%s" (concat "No environment variable " name " found")))) + (message "%s" (concat "No project or environment variable " name " found")))) (cond ((null value) @@ -535,6 +534,11 @@ All the directories are returned as absolute directories." Completion is attempted in all the directories in the source path, as defined in the project file." ;; FIXME: doc arguments + + ;; This function is not itself interactive, but it is called as part + ;; of the prompt of interactive functions, so we require a project + ;; file. + (ada-require-project-file) (let (list (dirs (ada-xref-get-src-dir-field))) @@ -663,9 +667,6 @@ is non-nil, prompt the user to select one. If none are found, return ada-prj-file-extension)) (dir (file-name-directory current-file)) - ;; on Emacs 20.2, directory-files does not work if - ;; parse-sexp-lookup-properties is set - (parse-sexp-lookup-properties nil) (prj-files (directory-files dir t (concat ".*" (regexp-quote @@ -905,6 +906,8 @@ If ARG is t, the contents of the old *gnatfind* buffer is preserved." (interactive "d\nP") (ada-find-references pos arg t)) +(defconst ada-gnatfind-buffer-name "*gnatfind*") + (defun ada-find-any-references (entity &optional file line column local-only append) "Search for references to any entity whose name is ENTITY. @@ -943,23 +946,25 @@ buffer `*gnatfind*', if there is one." (setq command (concat command " -P" ada-prj-default-project-file)) (setq command (concat command " -p" ada-prj-default-project-file)))) - (if (and append (get-buffer "*gnatfind*")) + (if (and append (get-buffer ada-gnatfind-buffer-name)) (save-excursion (set-buffer "*gnatfind*") (setq old-contents (buffer-string)))) (let ((compilation-error "reference")) - (compilation-start command)) + (compilation-start command 'compilation-mode (lambda (mode) ada-gnatfind-buffer-name))) ;; Hide the "Compilation" menu (save-excursion - (set-buffer "*gnatfind*") + (set-buffer ada-gnatfind-buffer-name) (local-unset-key [menu-bar compilation-menu]) (if old-contents (progn (goto-char 1) + (set 'buffer-read-only nil) (insert old-contents) + (set 'buffer-read-only t) (goto-char (point-max))))) ) ) @@ -1940,7 +1945,7 @@ This function attempts to find the possible declarations for the identifier anywhere in the object path. This command requires the external `egrep' program to be available. -This works well when one is using an external librarie and wants to find +This works well when one is using an external library and wants to find the declaration and documentation of the subprograms one is using." ;; FIXME: what does this function do? (let (list From 86444e1bf0767b5daf853e390f3ac30b3c01e47f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:39:45 +0000 Subject: [PATCH 104/105] (vhdl-update-progress-info): Avoid divide by zero error. --- lisp/progmodes/vhdl-mode.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index a1bd32a313d..0d909a4a3ff 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -6982,10 +6982,13 @@ only-lines." (when (and vhdl-progress-info (not noninteractive) (< vhdl-progress-interval (- (nth 1 (current-time)) (aref vhdl-progress-info 2)))) - (message (concat string "... (%2d%s)") - (/ (* 100 (- pos (aref vhdl-progress-info 0))) - (- (aref vhdl-progress-info 1) - (aref vhdl-progress-info 0))) "%") + (let ((delta (- (aref vhdl-progress-info 1) + (aref vhdl-progress-info 0)))) + (if (= 0 delta) + (message (concat string "... (100%s)") "%") + (message (concat string "... (%2d%s)") + (/ (* 100 (- pos (aref vhdl-progress-info 0))) + delta) "%"))) (aset vhdl-progress-info 2 (nth 1 (current-time))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From 9d2db4c6637fe37d75f947063bcb2ecce319a1bc Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 13 Aug 2007 11:47:43 +0000 Subject: [PATCH 105/105] *** empty log message *** --- lisp/ChangeLog | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1ee5598d34..c26869f1327 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2007-08-13 Stephen Leake + + * pcvs-parse.el (cvs-parse-table): Handle additional instance of + optional quotes around files in NEED-UPDATE . REMOVED case. + + * progmodes/ada-xref.el (ada-gnatls-args): Fix docstring. + (ada-treat-cmd-string): Improve error message. + (ada-do-file-completion): Call `ada-require-project-file', so + project variables are set properly. + (ada-prj-find-prj-file): Delete Emacs 20.2 support. + (ada-gnatfind-buffer-name): New constant. + (ada-find-any-references): Use new constant. Set buffer name + properly in compilation-start. Toggle read-only properly. + (ada-find-in-src-path): Fix spelling error in docstring. + + * progmodes/vhdl-mode.el (vhdl-update-progress-info): Avoid divide + by zero error. + 2007-08-13 Nick Roberts * progmodes/gdb-ui.el (gdb-send): Handle CTRL-D more carefully. @@ -49,7 +67,7 @@ * vc-rcs.el (vc-rcs-find-file-not-found-hook): Move from vc-default-find-file-not-found-hook. -2007-08-09 Edward O'Connor (tiny change) +2007-08-09 Edward O'Connor (tiny change) * url/url-auth.el (url-basic-auth): When prompting for username and password, default to the username and password in the URL. @@ -308,8 +326,7 @@ 2007-07-30 Dan Nicolaescu - * vc-git.el: (vc-directory-exclusion-list, vc-handled-backends): - Remove. + * vc-git.el (vc-directory-exclusion-list, vc-handled-backends): Remove. (vc-git-revision-completion-table): Enable. * vc-hooks.el (vc-handled-backends): Add GIT and HG.