Now on revision 104964. ------------------------------------------------------------ revno: 104964 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-07-05 14:05:06 +0200 message: lisp/emacs-lock.el: Add back code accidentally replaced with garbage. diff: === modified file 'lisp/emacs-lock.el' --- lisp/emacs-lock.el 2011-07-05 11:38:44 +0000 +++ lisp/emacs-lock.el 2011-07-05 12:05:06 +0000 @@ -237,4 +237,7 @@ (interactive) (call-interactively 'emacs-lock-mode)) (make-obsolete 'toggle-emacs-lock 'emacs-lock-mode "24.1") -k + +(provide 'emacs-lock) + +;;; emacs-lock.el ends here ------------------------------------------------------------ revno: 104963 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-07-05 13:38:44 +0200 message: lisp/emacs-lock.el: New file. Old one moved to lisp/obsolete/. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-07-05 03:02:06 +0000 +++ etc/ChangeLog 2011-07-05 11:38:44 +0000 @@ -1,3 +1,7 @@ +2011-07-05 Juanma Barranquero + + * NEWS: Document new emacs-lock.el and renaming of old one. + 2011-07-05 Manoj Srivastava * themes/manoj-dark-theme.el (manoj-dark): New file. === modified file 'etc/NEWS' --- etc/NEWS 2011-07-04 22:11:40 +0000 +++ etc/NEWS 2011-07-05 11:38:44 +0000 @@ -857,6 +857,13 @@ ** xmodmap-generic-mode for xmodmap files. +** New emacs-lock.el package. +(The pre-existing one has been renamed to old-emacs-lock.el and moved +to obsolete/.) Now, Emacs Lock is a proper minor mode +`emacs-lock-mode'. Protection against exiting Emacs and killing the +buffer can be set separately. The mechanism for auto turning off +protection for buffers with inferior processes has been generalized. + * Incompatible Lisp Changes in Emacs 24.1 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-05 10:02:48 +0000 +++ lisp/ChangeLog 2011-07-05 11:38:44 +0000 @@ -1,3 +1,8 @@ +2011-07-05 Juanma Barranquero + + * obsolete/old-emacs-lock.el: Rename from emacs-lock.el. + * emacs-lock.el: New file. + 2011-07-05 Julien Danjou * textmodes/rst.el (rst-define-level-faces): Use `facep' rather === added file 'lisp/emacs-lock.el' --- lisp/emacs-lock.el 1970-01-01 00:00:00 +0000 +++ lisp/emacs-lock.el 2011-07-05 11:38:44 +0000 @@ -0,0 +1,240 @@ +;;; emacs-lock.el --- protect buffers against killing or exiting -*- lexical-binding: t -*- + +;; Copyright (C) 2011 Free Software Foundation, Inc + +;; Author: Juanma Barranquero +;; Inspired by emacs-lock.el by Tom Wurgler +;; Maintainer: FSF +;; Keywords: extensions, processes + +;; This file is part of GNU Emacs. + +;; GNU Emacs 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 of the License, or +;; (at your option) any later version. + +;; GNU Emacs 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. If not, see . + +;;; Commentary: + +;; This package defines a minor mode Emacs Lock to mark a buffer as +;; protected against accidental killing, or exiting Emacs, or both. +;; Buffers associated with inferior modes, like shell or telnet, can +;; be treated specially, by auto-unlocking them if their interior +;; processes are dead. + +;;; Code: + +(defgroup emacs-lock nil + "Emacs-Lock mode." + :version "24.1" + :group 'convenience) + +(defcustom emacs-lock-default-locking-mode 'all + "Default locking mode of Emacs-Locked buffers. + +Its value is used as the default for `emacs-lock-mode' (which +see) the first time that Emacs Lock mode is turned on in a buffer +without passing an explicit locking mode. + +Possible values are: + exit -- Emacs cannot exit while the buffer is locked + kill -- the buffer cannot be killed, but Emacs can exit as usual + all -- the buffer is locked against both actions + nil -- the buffer is not locked" + :type '(choice + (const :tag "Do not allow Emacs to exit" exit) + (const :tag "Do not allow killing the buffer" kill) + (const :tag "Do not allow killing the buffer or exiting Emacs" all) + (const :tag "Do not lock the buffer" nil)) + :group 'emacs-lock + :version "24.1") + +;; Note: as auto-unlocking can lead to data loss, it would be better +;; to default to nil; but the value below is for compatibility with +;; the old emacs-lock.el. +(defcustom emacs-lock-unlockable-modes '((shell-mode . all) + (telnet-mode . all)) + "Alist of auto-unlockable modes. +Each element is a pair (MAJOR-MODE . ACTION), where ACTION is +one of `kill', `exit' or `all'. Buffers with matching major +modes are auto-unlocked for the specific action if their +inferior processes are not alive. If this variable is t, all +buffers associated to inferior processes are auto-unlockable +for both actions (NOT RECOMMENDED)." + :type '(choice + (const :tag "All buffers with inferior processes" t) + (repeat :tag "Selected modes" + (cons :tag "Set auto-unlock for" + (symbol :tag "Major mode") + (radio + (const :tag "Allow exiting" exit) + (const :tag "Allow killing" kill) + (const :tag "Allow both" all))))) + :group 'emacs-lock + :version "24.1") + +(defvar emacs-lock-mode nil + "If non-nil, the current buffer is locked. +It can be one of the following values: + exit -- Emacs cannot exit while the buffer is locked + kill -- the buffer cannot be killed, but Emacs can exit as usual + all -- the buffer is locked against both actions + nil -- the buffer is not locked") +(make-variable-buffer-local 'emacs-lock-mode) +(put 'emacs-lock-mode 'permanent-local t) + +(defvar emacs-lock--old-mode nil + "Most recent locking mode set on the buffer. +Internal use only.") +(make-variable-buffer-local 'emacs-lock--old-mode) +(put 'emacs-lock--old-mode 'permanent-local t) + +(defvar emacs-lock--try-unlocking nil + "Non-nil if current buffer should be checked for auto-unlocking. +Internal use only.") +(make-variable-buffer-local 'emacs-lock--try-unlocking) +(put 'emacs-lock--try-unlocking 'permanent-local t) + +(defun emacs-lock-live-process-p (buffer-or-name) + "Return t if BUFFER-OR-NAME is associated with a live process." + (let ((proc (get-buffer-process buffer-or-name))) + (and proc (process-live-p proc)))) + +(defun emacs-lock--can-auto-unlock (action) + "Return t if the current buffer can auto-unlock for ACTION. +ACTION must be one of `kill' or `exit'. +See `emacs-lock-unlockable-modes'." + (and emacs-lock--try-unlocking + (not (emacs-lock-live-process-p (current-buffer))) + (or (eq emacs-lock-unlockable-modes t) + (let ((unlock (cdr (assq major-mode emacs-lock-unlockable-modes)))) + (or (eq unlock 'all) (eq unlock action)))))) + +(defun emacs-lock--exit-locked-buffer () + "Return the name of the first exit-locked buffer found." + (save-current-buffer + (catch :found + (dolist (buffer (buffer-list)) + (set-buffer buffer) + (unless (or (emacs-lock--can-auto-unlock 'exit) + (memq emacs-lock-mode '(nil kill))) + (throw :found (buffer-name)))) + nil))) + +(defun emacs-lock--kill-emacs-hook () + "Signal an error if any buffer is exit-locked. +Used from `kill-emacs-hook' (which see)." + (let ((buffer-name (emacs-lock--exit-locked-buffer))) + (when buffer-name + (error "Emacs cannot exit because buffer %S is locked" buffer-name)))) + +(defun emacs-lock--kill-emacs-query-functions () + "Display a message if any buffer is exit-locked. +Return a value appropriate for `kill-emacs-query-functions' (which see)." + (let ((locked (emacs-lock--exit-locked-buffer))) + (or (not locked) + (progn + (message "Emacs cannot exit because buffer %S is locked" locked) + nil)))) + +(defun emacs-lock--kill-buffer-query-functions () + "Display a message if the current buffer is kill-locked. +Return a value appropriate for `kill-buffer-query-functions' (which see)." + (or (emacs-lock--can-auto-unlock 'kill) + (memq emacs-lock-mode '(nil exit)) + (progn + (message "Buffer %S is locked and cannot be killed" (buffer-name)) + nil))) + +(defun emacs-lock--set-mode (mode arg) + "Setter function for `emacs-lock-mode'." + (setq emacs-lock-mode + (cond ((memq arg '(all exit kill)) + ;; explicit locking mode arg, use it + arg) + ((and (eq arg current-prefix-arg) (consp current-prefix-arg)) + ;; called with C-u M-x emacs-lock-mode, so ask the user + (intern (completing-read "Locking mode: " + '("all" "exit" "kill") + nil t nil nil + (symbol-name + emacs-lock-default-locking-mode)))) + ((eq mode t) + ;; turn on, so use previous setting, or customized default + (or emacs-lock--old-mode emacs-lock-default-locking-mode)) + (t + ;; anything else (turn off) + mode)))) + +;;;###autoload +(define-minor-mode emacs-lock-mode + "Toggle Emacs Lock mode in the current buffer. + +With \\[universal-argument], ask for the locking mode to be used. +With other prefix ARG, turn mode on if ARG is positive, off otherwise. + +Initially, if the user does not pass an explicit locking mode, it defaults +to `emacs-lock-default-locking-mode' (which see); afterwards, the locking +mode most recently set on the buffer is used instead. + +When called from Elisp code, ARG can be any locking mode: + + exit -- Emacs cannot exit while the buffer is locked + kill -- the buffer cannot be killed, but Emacs can exit as usual + all -- the buffer is locked against both actions + +Other values are interpreted as usual." + :init-value nil + :lighter ("" + (emacs-lock--try-unlocking " locked:" " Locked:") + (:eval (symbol-name emacs-lock-model))) + :group 'emacs-lock + :variable (emacs-lock-mode . + (lambda (mode) + (emacs-lock--set-mode mode arg))) + (when emacs-lock-mode + (setq emacs-lock--old-mode emacs-lock-mode) + (setq emacs-lock--try-unlocking + (or (and (eq emacs-lock-unlockable-modes t) + (emacs-lock-live-process-p (current-buffer))) + (assq major-mode emacs-lock-unlockable-modes))))) + +(unless noninteractive + (add-hook 'kill-buffer-query-functions 'emacs-lock--kill-buffer-query-functions) + ;; We set a hook in both kill-emacs-hook and kill-emacs-query-functions because + ;; we really want to use k-e-q-f to stop as soon as possible, but don't want to + ;; be caught by surprise if someone calls `kill-emacs' instead. + (add-hook 'kill-emacs-hook 'emacs-lock--kill-emacs-hook) + (add-hook 'kill-emacs-query-functions 'emacs-lock--kill-emacs-query-functions)) + +(defun emacs-lock-unload-function () + "Unload the Emacs Lock library." + (catch :continue + (dolist (buffer (buffer-list)) + (set-buffer buffer) + (when emacs-lock-mode + (if (y-or-n-p (format "Buffer %S is locked, unlock it? " (buffer-name))) + (emacs-lock-mode -1) + (message "Unloading of feature `emacs-lock' aborted.") + (throw :continue t)))) + ;; continue standard unloading + nil)) + +;;; Compatibility + +(define-obsolete-variable-alias 'emacs-lock-from-exiting 'emacs-lock-mode "24.1") + +(defun toggle-emacs-lock () + "Toggle `emacs-lock-from-exiting' for the current buffer." + (interactive) + (call-interactively 'emacs-lock-mode)) +(make-obsolete 'toggle-emacs-lock 'emacs-lock-mode "24.1") +k === renamed file 'lisp/emacs-lock.el' => 'lisp/obsolete/old-emacs-lock.el' --- lisp/emacs-lock.el 2011-04-19 13:44:55 +0000 +++ lisp/obsolete/old-emacs-lock.el 2011-07-05 11:38:44 +0000 @@ -5,6 +5,7 @@ ;; Author: Tom Wurgler ;; Created: 12/8/94 ;; Keywords: extensions, processes +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. ------------------------------------------------------------ revno: 104962 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-07-05 06:24:56 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2011-07-03 22:14:08 +0000 +++ lisp/dired.el 2011-07-05 10:24:56 +0000 @@ -3642,7 +3642,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "65e65633e08c3e4b4a4b1c735f2f48b8") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "d7b197829c8d456cc5bc6c5fdab7c4b0") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ ------------------------------------------------------------ revno: 104961 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-07-05 06:19:43 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2011-07-02 10:18:42 +0000 +++ autogen/configure 2011-07-05 10:19:43 +0000 @@ -11166,7 +11166,7 @@ fi HAVE_GCONF=no -if test "${HAVE_GSETTINGS}" = "no" && test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then +if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then succeeded=no @@ -11265,8 +11265,8 @@ $as_echo "#define HAVE_GCONF 1" >>confdefs.h - SETTINGS_CFLAGS="$GCONF_CFLAGS" - SETTINGS_LIBS="$GCONF_LIBS" + SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" + SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" fi fi ------------------------------------------------------------ revno: 104960 committer: Julien Danjou branch nick: trunk timestamp: Tue 2011-07-05 12:02:48 +0200 message: * textmodes/rst.el (rst-define-level-faces): Use `facep' rather than `boundp' to check if face is set. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-05 09:51:56 +0000 +++ lisp/ChangeLog 2011-07-05 10:02:48 +0000 @@ -1,3 +1,8 @@ +2011-07-05 Julien Danjou + + * textmodes/rst.el (rst-define-level-faces): Use `facep' rather + than `boundp' to check if face is set. + 2011-07-05 Juanma Barranquero * register.el (registerv-make): === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2011-05-25 09:03:59 +0000 +++ lisp/textmodes/rst.el 2011-07-05 10:02:48 +0000 @@ -2800,7 +2800,7 @@ rst-level-face-base-color (+ (* (1- i) rst-level-face-step-light) rst-level-face-base-light)))) - (unless (boundp sym) + (unless (facep sym) (make-empty-face sym) (set-face-doc-string sym doc) (set-face-background sym col) ------------------------------------------------------------ revno: 104959 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-07-05 11:51:56 +0200 message: Fix typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-05 08:21:38 +0000 +++ lisp/ChangeLog 2011-07-05 09:51:56 +0000 @@ -1,6 +1,11 @@ +2011-07-05 Juanma Barranquero + + * register.el (registerv-make): + * window.el (window-min-height): Fix typos in docstrings. + 2011-07-05 Jan Djärv - * dynamic-setting.el (dynamic-setting-handle-config-changed-event): + * dynamic-setting.el (dynamic-setting-handle-config-changed-event): Update doc string. 2011-07-04 Juanma Barranquero === modified file 'lisp/custom.el' --- lisp/custom.el 2011-07-03 22:16:07 +0000 +++ lisp/custom.el 2011-07-05 09:51:56 +0000 @@ -1407,7 +1407,7 @@ (face-spec-recalc face frame))) -;;; XEmacs compability functions +;;; XEmacs compatibility functions ;; In XEmacs, when you reset a Custom Theme, you have to specify the ;; theme to reset it to. We just apply the next available theme, so === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2011-07-01 13:37:00 +0000 +++ lisp/dired-aux.el 2011-07-05 09:51:56 +0000 @@ -1008,7 +1008,7 @@ (dired-uncache (if (consp dired-directory) (car dired-directory) dired-directory)) (dired-map-over-marks (let ((fname (dired-get-filename)) - ;; Postphone readin hook till we map + ;; Postpone readin hook till we map ;; over all marked files (Bug#6810). (dired-after-readin-hook nil)) (message "Redisplaying... %s" fname) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-07-04 13:11:52 +0000 +++ lisp/gnus/ChangeLog 2011-07-05 09:51:56 +0000 @@ -1,3 +1,7 @@ +2011-07-05 Juanma Barranquero + + * message.el (message-return-action): Fix typo in docstring. + 2011-07-04 Lars Magne Ingebrigtsen * nnimap.el (nnimap-request-scan): Say that splitting has finished. === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-07-03 00:24:28 +0000 +++ lisp/gnus/message.el 2011-07-05 09:51:56 +0000 @@ -1185,7 +1185,7 @@ (defvar message-send-actions nil "A list of actions to be performed upon successful sending of a message.") (defvar message-return-action nil - "Action to return to the caller after sending or postphoning a message.") + "Action to return to the caller after sending or postponing a message.") (defvar message-exit-actions nil "A list of actions to be performed upon exiting after sending a message.") (defvar message-kill-actions nil === modified file 'lisp/mail/feedmail.el' --- lisp/mail/feedmail.el 2011-07-03 20:09:38 +0000 +++ lisp/mail/feedmail.el 2011-07-05 09:51:56 +0000 @@ -351,7 +351,7 @@ ;; systems with non-classic /bin/[r]mail behavior ;; guard against nil user-mail-address in generating MESSAGE-ID: ;; feedmail-queue-slug-suspect-regexp is now a variable to -;; accomodate non-ASCII environments (thanks to +;; accommodate non-ASCII environments (thanks to ;; Makoto.Nakagawa@jp.compaq.com for this suggestion) ;; feedmail-buffer-to-smtp, to parallel feedmail-buffer-to-smtpmail ;; patchlevel 10, 22 April 2001 === modified file 'lisp/register.el' --- lisp/register.el 2011-06-26 06:37:04 +0000 +++ lisp/register.el 2011-07-05 09:51:56 +0000 @@ -70,7 +70,7 @@ DATA can be any value. PRINT-FUNC if provided controls how `list-registers' and `view-register' print the register. It should be a function -recieving one argument DATA and print text that completes +receiving one argument DATA and print text that completes this sentence: Register X contains [TEXT PRINTED BY PRINT-FUNC] JUMP-FUNC if provided, controls how `jump-to-register' jumps to the register. === modified file 'lisp/window.el' --- lisp/window.el 2011-07-02 10:36:48 +0000 +++ lisp/window.el 2011-07-05 09:51:56 +0000 @@ -163,8 +163,8 @@ (defcustom window-min-height 4 "The minimum number of lines of any window. -The value has to accomodate a mode- or header-line if present. A -value less than `window-safe-min-height' is ignored. The value +The value has to accommodate a mode- or header-line if present. +A value less than `window-safe-min-height' is ignored. The value of this variable is honored when windows are resized or split. Applications should never rebind this variable. To resize a @@ -3380,7 +3380,7 @@ (balance-windows-2 window horizontal) (let ((size (window-new-total window))) (while sub - (set-window-new-total sub size) + (set-window-new-total sub size) (balance-windows-1 sub horizontal) (setq sub (window-right sub)))))))) @@ -5039,7 +5039,7 @@ (setq window (cond ((eq cand 'largest) - ;; The largest window. + ;; The largest window. (get-largest-window frame t)) ((eq cand 'lru) ;; The least recently used window. @@ -5750,7 +5750,7 @@ (display-buffer-reuse-window buffer '(nil nil t) '((reuse-window-dedicated . t))))))) -(defsubst display-buffer-same-window (&optional buffer-or-name label) +(defsubst display-buffer-same-window (&optional buffer-or-name label) "Display buffer specified by BUFFER-OR-NAME in the selected window. Another window will be used only if the buffer can't be shown in the selected window, usually because it is dedicated to another @@ -5759,7 +5759,7 @@ (interactive "BDisplay buffer in same window:\nP") (display-buffer buffer-or-name 'same-window label)) -(defsubst display-buffer-same-frame (&optional buffer-or-name label) +(defsubst display-buffer-same-frame (&optional buffer-or-name label) "Display buffer specified by BUFFER-OR-NAME in a window on the same frame. Another frame will be used only if there is no other choice. Optional argument BUFFER-OR-NAME and LABEL are as for @@ -5767,7 +5767,7 @@ (interactive "BDisplay buffer on same frame:\nP") (display-buffer buffer-or-name 'same-frame label)) -(defsubst display-buffer-other-window (&optional buffer-or-name label) +(defsubst display-buffer-other-window (&optional buffer-or-name label) "Display buffer specified by BUFFER-OR-NAME in another window. The selected window will be used only if there is no other choice. Windows on the selected frame are preferred to windows @@ -5776,7 +5776,7 @@ (interactive "BDisplay buffer in another window:\nP") (display-buffer buffer-or-name 'other-window label)) -(defun display-buffer-same-frame-other-window (&optional buffer-or-name label) +(defun display-buffer-same-frame-other-window (&optional buffer-or-name label) "Display buffer specified by BUFFER-OR-NAME in another window on the same frame. The selected window or another frame will be used only if there is no other choice. Optional argument BUFFER-OR-NAME and LABEL are @@ -5853,7 +5853,7 @@ (interactive "BPop to buffer in selected window:\nP") (pop-to-buffer buffer-or-name 'same-window norecord label)) -(defsubst pop-to-buffer-same-frame (&optional buffer-or-name norecord label) +(defsubst pop-to-buffer-same-frame (&optional buffer-or-name norecord label) "Pop to buffer specified by BUFFER-OR-NAME in a window on the selected frame. Another frame will be used only if there is no other choice. Optional arguments BUFFER-OR-NAME, NORECORD and LABEL are as for @@ -5870,7 +5870,7 @@ (interactive "BPop to buffer in another window:\nP") (pop-to-buffer buffer-or-name 'other-window norecord)) -(defsubst pop-to-buffer-same-frame-other-window (&optional buffer-or-name norecord label) +(defsubst pop-to-buffer-same-frame-other-window (&optional buffer-or-name norecord label) "Pop to buffer specified by BUFFER-OR-NAME in another window on the selected frame. The selected window or another frame will be used only if there is no other choice. Optional arguments BUFFER-OR-NAME, NORECORD @@ -6908,7 +6908,7 @@ ;; window and the current buffer when we're done. (setq window (window-normalize-live-window window)) ;; Can't resize a full height or fixed-size window. - (unless (or (window-size-fixed-p window) + (unless (or (window-size-fixed-p window) (window-full-height-p window)) ;; `with-selected-window' should orderly restore the current buffer. (with-selected-window window === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-05 08:21:38 +0000 +++ src/ChangeLog 2011-07-05 09:51:56 +0000 @@ -173,7 +173,7 @@ with value as argument. (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling g_settings_new (Bug#8967). Do not create gsettings_obj. - Remove calls to g_settings_bind. Connect something_changedCB to + Remove calls to g_settings_bind. Connect something_changedCB to "changed". * xgselect.c: Add defined (HAVE_GSETTINGS). @@ -270,8 +270,8 @@ min_width/height (Bug#8919). * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new. - (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size. Fix - indentation. + (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size. + Fix indentation. 2011-06-26 Eli Zaretskii @@ -1832,7 +1832,7 @@ and %.0c. Fix bug with strchr succeeding on '\0' when looking for flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when formatting out-of-range floating point numbers with int - formats. (Bug#8668) + formats. (Bug#8668) * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN. @@ -2796,9 +2796,9 @@ :verify-hostname-error, :verify-error, and :verify-flags parameters of `gnutls-boot' and documented those parameters in the docstring. Start callback support. - (emacs_gnutls_handshake): Add Woe32 support. Retry handshake - unless a fatal error occured. Call gnutls_alert_send_appropriate - on error. Return error code. + (emacs_gnutls_handshake): Add Woe32 support. Retry handshake + unless a fatal error occurred. Call gnutls_alert_send_appropriate + on error. Return error code. (emacs_gnutls_write): Call emacs_gnutls_handle_error. (emacs_gnutls_read): Likewise. (Fgnutls_boot): Return handshake error code. === modified file 'src/eval.c' --- src/eval.c 2011-07-04 02:14:42 +0000 +++ src/eval.c 2011-07-05 09:51:56 +0000 @@ -3162,7 +3162,7 @@ shouldn't bind any arguments, instead just call the byte-code interpreter directly; it will push arguments as necessary. - Byte-code objects with either a non-existant, or a nil value for + Byte-code objects with either a non-existent, or a nil value for the `push args' slot (the default), have dynamically-bound arguments, and use the argument-binding code below instead (as do all interpreted functions, even lexically bound ones). */ === modified file 'src/gnutls.c' --- src/gnutls.c 2011-07-04 02:47:04 +0000 +++ src/gnutls.c 2011-07-05 09:51:56 +0000 @@ -379,7 +379,7 @@ /* non-fatal error */ return -1; else { - /* a fatal error occured */ + /* a fatal error occurred */ return 0; } } ------------------------------------------------------------ revno: 104958 committer: Jan D. branch nick: trunk timestamp: Tue 2011-07-05 10:21:38 +0200 message: Use GConf and GSettings both, check GConf/GSettings toolbar style and font name. * configure.in (HAVE_GCONF): Allow both HAVE_GCONF and HAVE_GSETTINGS. * lisp/dynamic-setting.el (dynamic-setting-handle-config-changed-event): Update doc string. * src/xsettings.c: Use both GConf and GSettings if both are available. (store_config_changed_event): Add comment. (dpyinfo_valid, store_font_name_changed, map_tool_bar_style) (store_tool_bar_style_changed): New functions. (store_monospaced_changed): Add comment. Call dpyinfo_valid. (struct xsettings): Move font inside HAVE_XFT. (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines. (GSETTINGS_MONO_FONT): Renamed from SYSTEM_MONO_FONT. Move inside HAVE_XFT. (something_changed_gsettingsCB): Renamed from something_changedCB. Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME also. (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines. (GCONF_MONO_FONT): Renamed from SYSTEM_MONO_FONT. Move inside HAVE_XFT. (something_changed_gconfCB): Renamed from something_changedCB. Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also. (parse_settings): Move check for font inside HAVE_XFT. (read_settings, apply_xft_settings): Add comment. (read_and_apply_settings): Add comment. Call map_tool_bar_style and store_tool_bar_style_changed. Move check for font inside HAVE_XFT and call store_font_name_changed. (xft_settings_event): Add comment. (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT. (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT. (xsettings_initialize): Call init_gsettings last. (xsettings_get_system_font, xsettings_get_system_normal_font): Add comment. diff: === modified file 'ChangeLog' --- ChangeLog 2011-07-01 17:53:59 +0000 +++ ChangeLog 2011-07-05 08:21:38 +0000 @@ -1,3 +1,7 @@ +2011-07-05 Jan Djärv + + * configure.in (HAVE_GCONF): Allow both HAVE_GCONF and HAVE_GSETTINGS. + 2011-07-01 Glenn Morris * configure.in (SETTINGS_CFLAGS, SETTINGS_LIBS) [HAVE_GCONF]: Fix typo. === modified file 'configure.in' --- configure.in 2011-07-01 17:53:59 +0000 +++ configure.in 2011-07-05 08:21:38 +0000 @@ -1996,13 +1996,13 @@ dnl GConf has been tested under GNU/Linux only. dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6. HAVE_GCONF=no -if test "${HAVE_GSETTINGS}" = "no" && test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then +if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.13, HAVE_GCONF=yes, HAVE_GCONF=no) if test "$HAVE_GCONF" = yes; then AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.]) dnl Newer GConf doesn't link with g_objects, so this is not defined. - SETTINGS_CFLAGS="$GCONF_CFLAGS" - SETTINGS_LIBS="$GCONF_LIBS" + SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" + SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" fi fi === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 22:40:03 +0000 +++ lisp/ChangeLog 2011-07-05 08:21:38 +0000 @@ -1,3 +1,8 @@ +2011-07-05 Jan Djärv + + * dynamic-setting.el (dynamic-setting-handle-config-changed-event): + Update doc string. + 2011-07-04 Juanma Barranquero * server.el (server-execute): Catch quit and call === modified file 'lisp/dynamic-setting.el' --- lisp/dynamic-setting.el 2011-01-25 04:08:28 +0000 +++ lisp/dynamic-setting.el 2011-07-05 08:21:38 +0000 @@ -86,7 +86,9 @@ Changes can be The monospace font. If `font-use-system-font' is nil, the font is not changed. + The normal font. Xft parameters, like DPI and hinting. + The Gtk+ theme name. The tool bar style." (interactive "e") (let ((type (nth 1 event)) === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-05 02:51:15 +0000 +++ src/ChangeLog 2011-07-05 08:21:38 +0000 @@ -1,3 +1,35 @@ +2011-07-05 Jan Djärv + + * xsettings.c: Use both GConf and GSettings if both are available. + (store_config_changed_event): Add comment. + (dpyinfo_valid, store_font_name_changed, map_tool_bar_style) + (store_tool_bar_style_changed): New functions. + (store_monospaced_changed): Add comment. Call dpyinfo_valid. + (struct xsettings): Move font inside HAVE_XFT. + (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines. + (GSETTINGS_MONO_FONT): Renamed from SYSTEM_MONO_FONT. + Move inside HAVE_XFT. + (something_changed_gsettingsCB): Renamed from something_changedCB. + Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME + also. + (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines. + (GCONF_MONO_FONT): Renamed from SYSTEM_MONO_FONT. Move inside HAVE_XFT. + (something_changed_gconfCB): Renamed from something_changedCB. + Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also. + (parse_settings): Move check for font inside HAVE_XFT. + (read_settings, apply_xft_settings): Add comment. + (read_and_apply_settings): Add comment. Call map_tool_bar_style and + store_tool_bar_style_changed. Move check for font inside HAVE_XFT and + call store_font_name_changed. + (xft_settings_event): Add comment. + (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE + and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT. + (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE + and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT. + (xsettings_initialize): Call init_gsettings last. + (xsettings_get_system_font, xsettings_get_system_normal_font): Add + comment. + 2011-07-05 Paul Eggert Random fixes. E.g., (random) never returned negative values. === modified file 'src/xsettings.c' --- src/xsettings.c 2011-07-03 06:17:19 +0000 +++ src/xsettings.c 2011-07-05 08:21:38 +0000 @@ -37,11 +37,11 @@ #ifdef HAVE_GSETTINGS #include #include -#else +#endif + #ifdef HAVE_GCONF #include #endif -#endif #ifdef HAVE_XFT #include @@ -54,6 +54,8 @@ Qtool_bar_style; static Lisp_Object current_tool_bar_style; +/* Store an config changed event in to the event queue. */ + static void store_config_changed_event (Lisp_Object arg, Lisp_Object display_name) { @@ -65,6 +67,23 @@ kbd_buffer_store_event (&event); } +/* Return non-zero if DPYINFO is still valid. */ +static int +dpyinfo_valid (struct x_display_info *dpyinfo) +{ + int found = 0; + if (dpyinfo != NULL) + { + struct x_display_info *d; + for (d = x_display_list; !found && d; d = d->next) + found = d == dpyinfo && d->display == dpyinfo->display; + } + return found; +} + +/* Store a monospace font change event if the monospaced font changed. */ + +#ifdef HAVE_XFT static void store_monospaced_changed (const char *newfont) { @@ -74,28 +93,69 @@ xfree (current_mono_font); current_mono_font = xstrdup (newfont); - if (first_dpyinfo != NULL && use_system_font) - { - /* Check if display still open */ - struct x_display_info *dpyinfo; - int found = 0; - for (dpyinfo = x_display_list; !found && dpyinfo; dpyinfo = dpyinfo->next) - found = dpyinfo == first_dpyinfo; - - if (found) - store_config_changed_event (Qmonospace_font_name, - XCAR (first_dpyinfo->name_list_element)); - } -} - - -#ifdef HAVE_GSETTINGS -static GSettings *gsettings_client; -#else -#ifdef HAVE_GCONF -static GConfClient *gconf_client; -#endif -#endif + if (dpyinfo_valid (first_dpyinfo) && use_system_font) + { + store_config_changed_event (Qmonospace_font_name, + XCAR (first_dpyinfo->name_list_element)); + } +} + +/* Store a font name change event if the font name changed. */ + +static void +store_font_name_changed (const char *newfont) +{ + if (current_font != NULL && strcmp (newfont, current_font) == 0) + return; /* No change. */ + + xfree (current_font); + current_font = xstrdup (newfont); + + if (dpyinfo_valid (first_dpyinfo)) + { + store_config_changed_event (Qfont_name, + XCAR (first_dpyinfo->name_list_element)); + } +} +#endif /* HAVE_XFT */ + +/* Map TOOL_BAR_STYLE from a string to its correspinding Lisp value. + Return Qnil if TOOL_BAR_STYLE is not known. */ + +static Lisp_Object +map_tool_bar_style (const char *tool_bar_style) +{ + Lisp_Object style = Qnil; + if (tool_bar_style) + { + if (strcmp (tool_bar_style, "both") == 0) + style = Qboth; + else if (strcmp (tool_bar_style, "both-horiz") == 0) + style = Qboth_horiz; + else if (strcmp (tool_bar_style, "icons") == 0) + style = Qimage; + else if (strcmp (tool_bar_style, "text") == 0) + style = Qtext; + } + + return style; +} + +/* Store a tool bar style change event if the tool bar style changed. */ + +static void +store_tool_bar_style_changed (const char *newstyle, + struct x_display_info *dpyinfo) +{ + Lisp_Object style = map_tool_bar_style (newstyle); + if (EQ (current_tool_bar_style, style)) + return; /* No change. */ + + current_tool_bar_style = style; + if (dpyinfo_valid (dpyinfo)) + store_config_changed_event (Qtool_bar_style, + XCAR (dpyinfo->name_list_element)); +} #define XSETTINGS_FONT_NAME "Gtk/FontName" @@ -117,67 +177,129 @@ FcBool aa, hinting; int rgba, lcdfilter, hintstyle; double dpi; -#endif char *font; +#endif + char *tb_style; unsigned seen; }; #ifdef HAVE_GSETTINGS -#define GSETTINGS_SCHEMA "org.gnome.desktop.interface" -#define SYSTEM_MONO_FONT "monospace-font-name" +#define GSETTINGS_SCHEMA "org.gnome.desktop.interface" +#define GSETTINGS_TOOL_BAR_STYLE "toolbar-style" + +#ifdef HAVE_XFT +#define GSETTINGS_MONO_FONT "monospace-font-name" +#define GSETTINGS_FONT_NAME "font-name" +#endif + + +/* The single GSettings instance, or NULL if not connected to GSettings. */ + +static GSettings *gsettings_client; + +/* Callback called when something changed in GSettings. */ static void -something_changedCB (GSettings *settings, - gchar *key, - gpointer user_data) +something_changed_gsettingsCB (GSettings *settings, + gchar *key, + gpointer user_data) { GVariant *val; - if (strcmp (key, SYSTEM_MONO_FONT) != 0) return; - val = g_settings_get_value (settings, SYSTEM_MONO_FONT); - if (val) - { - g_variant_ref_sink (val); - if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) - { - const gchar *newfont = g_variant_get_string (val, NULL); - store_monospaced_changed (newfont); - } - g_variant_unref (val); - } + + if (strcmp (key, GSETTINGS_TOOL_BAR_STYLE) == 0) + { + val = g_settings_get_value (settings, GSETTINGS_TOOL_BAR_STYLE); + if (val) + { + g_variant_ref_sink (val); + if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) + { + const gchar *newstyle = g_variant_get_string (val, NULL); + store_tool_bar_style_changed (newstyle, first_dpyinfo); + } + g_variant_unref (val); + } + } +#ifdef HAVE_XFT + else if (strcmp (key, GSETTINGS_MONO_FONT) == 0) + { + val = g_settings_get_value (settings, GSETTINGS_MONO_FONT); + if (val) + { + g_variant_ref_sink (val); + if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) + { + const gchar *newfont = g_variant_get_string (val, NULL); + store_monospaced_changed (newfont); + } + g_variant_unref (val); + } + } + else if (strcmp (key, GSETTINGS_FONT_NAME) == 0) + { + val = g_settings_get_value (settings, GSETTINGS_FONT_NAME); + if (val) + { + g_variant_ref_sink (val); + if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) + { + const gchar *newfont = g_variant_get_string (val, NULL); + store_font_name_changed (newfont); + } + g_variant_unref (val); + } + } +#endif /* HAVE_XFT */ } -#else +#endif /* HAVE_GSETTINGS */ + #ifdef HAVE_GCONF -#define SYSTEM_MONO_FONT "/desktop/gnome/interface/monospace_font_name" - +#define GCONF_TOOL_BAR_STYLE "/desktop/gnome/interface/toolbar_style" #ifdef HAVE_XFT -# define SYSTEM_FONT "/desktop/gnome/interface/font_name" +#define GCONF_MONO_FONT "/desktop/gnome/interface/monospace_font_name" +#define GCONF_FONT_NAME "/desktop/gnome/interface/font_name" #endif -/* Callback called when something changed in GConf that we care about, - that is SYSTEM_MONO_FONT. */ +/* The single GConf instance, or NULL if not connected to GConf. */ + +static GConfClient *gconf_client; + +/* Callback called when something changed in GConf that we care about. */ static void -something_changedCB (GConfClient *client, - guint cnxn_id, - GConfEntry *entry, - gpointer user_data) +something_changed_gconfCB (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + gpointer user_data) { GConfValue *v = gconf_entry_get_value (entry); + const char *key = gconf_entry_get_key (entry); - if (!v) return; - if (v->type == GCONF_VALUE_STRING) + if (!v || v->type != GCONF_VALUE_STRING || ! key) return; + if (strcmp (key, GCONF_TOOL_BAR_STYLE) == 0) + { + const char *value = gconf_value_get_string (v); + store_tool_bar_style_changed (value, first_dpyinfo); + } +#ifdef HAVE_XFT + else if (strcmp (key, GCONF_MONO_FONT) == 0) { const char *value = gconf_value_get_string (v); store_monospaced_changed (value); } + else if (strcmp (key, GCONF_FONT_NAME) == 0) + { + const char *value = gconf_value_get_string (v); + store_font_name_changed (value); + } +#endif /* HAVE_XFT */ } #endif /* HAVE_GCONF */ -#endif /* ! HAVE_GSETTINGS */ #ifdef HAVE_XFT @@ -319,14 +441,14 @@ bytes_parsed += 4; /* Skip serial for this value */ if (bytes_parsed > bytes) return BadLength; - want_this = + want_this = #ifdef HAVE_XFT (nlen > 6 && strncmp (name, "Xft/", 4) == 0) + || strcmp (XSETTINGS_FONT_NAME, name) == 0 || #endif - (strcmp (XSETTINGS_FONT_NAME, name) == 0) - || (strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0); - + strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0; + switch (type) { case 0: /* Integer */ @@ -367,17 +489,17 @@ if (want_this) { ++settings_seen; - if (strcmp (name, XSETTINGS_FONT_NAME) == 0) + if (strcmp (name, XSETTINGS_TOOL_BAR_STYLE) == 0) + { + settings->tb_style = xstrdup (sval); + settings->seen |= SEEN_TB_STYLE; + } +#ifdef HAVE_XFT + else if (strcmp (name, XSETTINGS_FONT_NAME) == 0) { settings->font = xstrdup (sval); settings->seen |= SEEN_FONT; } - else if (strcmp (name, XSETTINGS_TOOL_BAR_STYLE) == 0) - { - settings->tb_style = xstrdup (sval); - settings->seen |= SEEN_TB_STYLE; - } -#ifdef HAVE_XFT else if (strcmp (name, "Xft/Antialias") == 0) { settings->seen |= SEEN_AA; @@ -442,6 +564,10 @@ return settings_seen; } +/* Read settings from the XSettings property window on display for DPYINFO. + Store settings read in SETTINGS. + Return non-zero if successful, zero if not. */ + static int read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) { @@ -471,6 +597,8 @@ return rc != 0; } +/* Apply Xft settings in SETTINGS to the Xft library. + If SEND_EVENT_P is non-zero store a Lisp event that Xft settings changed. */ static void apply_xft_settings (struct x_display_info *dpyinfo, @@ -489,9 +617,9 @@ pat); FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa); FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting); -# ifdef FC_HINT_STYLE +#ifdef FC_HINT_STYLE FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &oldsettings.hintstyle); -# endif +#endif FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &oldsettings.lcdfilter); FcPatternGetInteger (pat, FC_RGBA, 0, &oldsettings.rgba); FcPatternGetDouble (pat, FC_DPI, 0, &oldsettings.dpi); @@ -530,7 +658,7 @@ oldsettings.lcdfilter = settings->lcdfilter; } -# ifdef FC_HINT_STYLE +#ifdef FC_HINT_STYLE if ((settings->seen & SEEN_HINTSTYLE) != 0 && oldsettings.hintstyle != settings->hintstyle) { @@ -539,7 +667,7 @@ ++changed; oldsettings.hintstyle = settings->hintstyle; } -# endif +#endif if ((settings->seen & SEEN_DPI) != 0 && oldsettings.dpi != settings->dpi && settings->dpi > 0) @@ -590,11 +718,13 @@ #endif /* HAVE_XFT */ } +/* Read XSettings from the display for DPYINFO. + If SEND_EVENT_P is non-zero store a Lisp event settings that changed. */ + static void read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p) { struct xsettings settings; - Lisp_Object dpyname = XCAR (dpyinfo->name_list_element); if (!read_settings (dpyinfo, &settings)) return; @@ -602,38 +732,29 @@ apply_xft_settings (dpyinfo, True, &settings); if (settings.seen & SEEN_TB_STYLE) { - Lisp_Object style = Qnil; - if (strcmp (settings.tb_style, "both") == 0) - style = Qboth; - else if (strcmp (settings.tb_style, "both-horiz") == 0) - style = Qboth_horiz; - else if (strcmp (settings.tb_style, "icons") == 0) - style = Qimage; - else if (strcmp (settings.tb_style, "text") == 0) - style = Qtext; - if (!NILP (style) && !EQ (style, current_tool_bar_style)) - { - current_tool_bar_style = style; - if (send_event_p) - store_config_changed_event (Qtool_bar_style, dpyname); - } + if (send_event_p) + store_tool_bar_style_changed (settings.tb_style, dpyinfo); + else + current_tool_bar_style = map_tool_bar_style (settings.tb_style); xfree (settings.tb_style); } - +#ifdef HAVE_XFT if (settings.seen & SEEN_FONT) { - if (!current_font || strcmp (current_font, settings.font) != 0) + if (send_event_p) + store_font_name_changed (settings.font); + else { xfree (current_font); - current_font = settings.font; - if (send_event_p) - store_config_changed_event (Qfont_name, dpyname); + current_font = xstrdup (settings.font); } - else - xfree (settings.font); + xfree (settings.font); } +#endif } +/* Check if EVENT for the display in DPYINFO is XSettings related. */ + void xft_settings_event (struct x_display_info *dpyinfo, XEvent *event) { @@ -675,6 +796,7 @@ read_and_apply_settings (dpyinfo, True); } +/* Initialize GSettings and read startup values. */ static void init_gsettings (void) @@ -697,8 +819,21 @@ gsettings_client = g_settings_new (GSETTINGS_SCHEMA); if (!gsettings_client) return; g_object_ref_sink (G_OBJECT (gsettings_client)); - - val = g_settings_get_value (gsettings_client, SYSTEM_MONO_FONT); + g_signal_connect (G_OBJECT (gsettings_client), "changed", + G_CALLBACK (something_changed_gsettingsCB), NULL); + + val = g_settings_get_value (gsettings_client, GSETTINGS_TOOL_BAR_STYLE); + if (val) + { + g_variant_ref_sink (val); + if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) + current_tool_bar_style + = map_tool_bar_style (g_variant_get_string (val, NULL)); + g_variant_unref (val); + } + +#ifdef HAVE_XFT + val = g_settings_get_value (gsettings_client, GSETTINGS_MONO_FONT); if (val) { g_variant_ref_sink (val); @@ -707,46 +842,84 @@ g_variant_unref (val); } - g_signal_connect (G_OBJECT (gsettings_client), "changed", - G_CALLBACK (something_changedCB), NULL); + val = g_settings_get_value (gsettings_client, GSETTINGS_FONT_NAME); + if (val) + { + g_variant_ref_sink (val); + if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) + current_font = xstrdup (g_variant_get_string (val, NULL)); + g_variant_unref (val); + } +#endif /* HAVE_XFT */ + #endif /* HAVE_GSETTINGS */ } +/* Init GConf and read startup values. */ static void init_gconf (void) { -#if defined (HAVE_GCONF) && defined (HAVE_XFT) && ! defined (HAVE_GSETTINGS) +#if defined (HAVE_GCONF) char *s; #ifdef HAVE_G_TYPE_INIT g_type_init (); #endif + gconf_client = gconf_client_get_default (); - s = gconf_client_get_string (gconf_client, SYSTEM_MONO_FONT, NULL); + gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE); + gconf_client_add_dir (gconf_client, + GCONF_TOOL_BAR_STYLE, + GCONF_CLIENT_PRELOAD_ONELEVEL, + NULL); + gconf_client_notify_add (gconf_client, + GCONF_TOOL_BAR_STYLE, + something_changed_gconfCB, + NULL, NULL, NULL); + + s = gconf_client_get_string (gconf_client, GCONF_TOOL_BAR_STYLE, NULL); + if (s) + { + current_tool_bar_style = map_tool_bar_style (s); + g_free (s); + } + +#ifdef HAVE_XFT + s = gconf_client_get_string (gconf_client, GCONF_MONO_FONT, NULL); if (s) { current_mono_font = xstrdup (s); g_free (s); } - s = gconf_client_get_string (gconf_client, SYSTEM_FONT, NULL); + s = gconf_client_get_string (gconf_client, GCONF_FONT_NAME, NULL); if (s) { current_font = xstrdup (s); g_free (s); } - gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE); - gconf_client_add_dir (gconf_client, - SYSTEM_MONO_FONT, - GCONF_CLIENT_PRELOAD_ONELEVEL, - NULL); - gconf_client_notify_add (gconf_client, - SYSTEM_MONO_FONT, - something_changedCB, - NULL, NULL, NULL); -#endif /* HAVE_GCONF && HAVE_XFT && ! HAVE_GSETTINGS */ + gconf_client_add_dir (gconf_client, + GCONF_MONO_FONT, + GCONF_CLIENT_PRELOAD_ONELEVEL, + NULL); + gconf_client_notify_add (gconf_client, + GCONF_MONO_FONT, + something_changed_gconfCB, + NULL, NULL, NULL); + gconf_client_add_dir (gconf_client, + GCONF_FONT_NAME, + GCONF_CLIENT_PRELOAD_ONELEVEL, + NULL); + gconf_client_notify_add (gconf_client, + GCONF_FONT_NAME, + something_changed_gconfCB, + NULL, NULL, NULL); +#endif /* HAVE_XFT */ +#endif /* HAVE_GCONF */ } +/* Init Xsettings and read startup values. */ + static void init_xsettings (struct x_display_info *dpyinfo) { @@ -769,11 +942,14 @@ xsettings_initialize (struct x_display_info *dpyinfo) { if (first_dpyinfo == NULL) first_dpyinfo = dpyinfo; - init_gsettings (); init_gconf (); init_xsettings (dpyinfo); + init_gsettings (); } +/* Return the system monospaced font. + May be NULL if not known. */ + const char * xsettings_get_system_font (void) { @@ -781,6 +957,9 @@ } #ifdef USE_LUCID +/* Return the system font. + May be NULL if not known. */ + const char * xsettings_get_system_normal_font (void) { @@ -831,11 +1010,10 @@ first_dpyinfo = NULL; #ifdef HAVE_GSETTINGS gsettings_client = NULL; -#else +#endif #ifdef HAVE_GCONF gconf_client = NULL; #endif -#endif DEFSYM (Qmonospace_font_name, "monospace-font-name"); DEFSYM (Qfont_name, "font-name"); ------------------------------------------------------------ revno: 104957 author: Manoj Srivastava committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-07-04 23:02:06 -0400 message: * themes/manoj-dark-theme.el (manoj-dark): New file. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-07-03 21:39:49 +0000 +++ etc/ChangeLog 2011-07-05 03:02:06 +0000 @@ -1,3 +1,7 @@ +2011-07-05 Manoj Srivastava + + * themes/manoj-dark-theme.el (manoj-dark): New file. + 2011-03-29 Kevin Ryde * compilation.txt (perl-Test2): New samples. === added file 'etc/themes/manoj-dark-theme.el' --- etc/themes/manoj-dark-theme.el 1970-01-01 00:00:00 +0000 +++ etc/themes/manoj-dark-theme.el 2011-07-05 03:02:06 +0000 @@ -0,0 +1,700 @@ +;;; manoj-dark.el --- A dark theme from Manoj + +;; Copyright (C) 2011 Free Software Foundation, Inc. + +;; Author: Manoj Srivastava +;; Keywords: lisp, faces + +;; This program 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 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; I spend a lot of time workin in front of a screen (many hours in a +;; dimly lit room) and eye fatigue is an issue. This is a dark color +;; theme for emacs, which is easier on the eyes than light themes. + +;; It does not help that I am blue-green color blind, so subtle +;; variations are often lost on me. I do want to use color contrast to +;; increase productivity, but I also want to avoid the jarring angry +;; fruit salad look, and so I am in the process of crafting a logical +;; color scheme that is high contrast enough for me, without being too +;; unpleasing. + +;; In circumstances where there a lot of related faces that can be +;; viewed, for example, the Gnus group buffer, consistent and logical +;; color choices are the only sane option. Gnus groups can be newa +;; (blueish) or mail (greenish), have states (large number of under +;; messages, normal, and empty). The large number unread groups have +;; highest luminance (appear brighter), and the empty one have lower +;; luminance (appear greyer), but have the same chroma and saturation. +;; Sub states and group priorities are rendered using a color series +;; which has constant luminance and saturation, and vary in hue by a +;; constant separation -- so all the related groups have the same +;; brightness ({mail,news}/{unread,normal,empty}), and a graded +;; selection of foreground colors. It sounds more complicated that it +;; looks. The eye is drawn naturally to the unread groups, and first +;; to the mail, then USENET groups (which is my preference). + +;; Similar color variations occur for individual messages in a group; +;; high scoring messages bubble to the top, and have a higher +;; luminance. This color schema has made me slightly faster at +;; reading mail/USENET. + +;; In the message itself, quoted mail messages from different people +;; are color coordinated, with high contrast beteen citations that are +;; close to each other in the heirarchy, so it is less likely that one +;; misunderstands who said what in a long conversation. + +;; The following scheme covers programming languages, Gnus, Erc, mail, +;; org-mode, CUA-mode, apt-utils, bbdb, compilation buffers, changelog +;; mode, diff and ediff, eshell, and more. You need emacs-goodies +;; package on Debian to use this. See the wiki page at +;; http://www.emacswiki.org/cgi-bin/wiki?ColorTheme for details. The +;; project home page is at https://gna.org/projects/color-theme. + +;;; Code: + +(deftheme manoj-dark + "Very high contrast faces with a black background. +This theme avoids subtle color variations, while avoiding the +jarring angry fruit salad look to reduce eye fatigue.") + +(custom-theme-set-faces + 'manoj-dark + '(default ((t (:background "black" :foreground "WhiteSmoke")))) + ;; Font lock faces + '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + '(font-lock-constant-face ((t (:foreground "LightSlateBlue" :bold t)))) + '(font-lock-preprocessor-face ((t (:foreground "CornFlowerBlue" :italic t)))) + '(font-lock-keyword-face ((t (:foreground "cyan1")))) + '(font-lock-type-face ((t (:foreground "SteelBlue1")))) + '(font-lock-regexp-grouping-backslash ((t (:bold t :weight bold)))) + '(font-lock-regexp-grouping-construct ((t (:bold t :weight bold)))) + '(font-lock-variable-name-face ((t (:foreground "Aquamarine")))) + '(font-lock-function-name-face ((t (:foreground "mediumspringgreen" + :weight bold :height 1.1)))) + '(font-lock-string-face ((t (:foreground "RosyBrown1")))) + '(font-lock-comment-face ((t (:italic t :slant oblique :foreground "chocolate1")))) + '(font-lock-comment-delimiter-face ((t (:foreground "Salmon")))) + '(font-lock-doc-face ((t (:italic t :slant oblique :foreground "LightCoral")))) + '(font-lock-doc-string-face ((t (:foreground "Plum")))) + '(font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) + + '(cperl-array-face ((t (:foreground "LawnGreen" :background "B;ack" :bold t)))) + '(cperl-hash-face ((t (:foreground "SpringGreen" :background "B;ack" :bold t :italic t)))) + '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + + '(gnus-button ((t (:bold t :weight bold :background "#191932" :box (:line-width 2 :style released-button))))) + '(gnus-cite-attribution-face ((t (:italic t)))) + '(gnus-cite-face-1 ((t (:foreground "CornflowerBlue")))) + '(gnus-cite-face-2 ((t (:foreground "PaleGreen")))) + '(gnus-cite-face-3 ((t (:foreground "LightGoldenrod")))) + '(gnus-cite-face-4 ((t (:foreground "LightPink")))) + '(gnus-cite-face-5 ((t (:foreground "turquoise")))) + '(gnus-cite-face-6 ((t (:foreground "khaki")))) + '(gnus-cite-face-7 ((t (:foreground "plum")))) + '(gnus-cite-face-8 ((t (:foreground "DeepSkyBlue1")))) + '(gnus-cite-face-9 ((t (:foreground "chartreuse1")))) + '(gnus-cite-face-10 ((t (:foreground "thistle1")))) + '(gnus-cite-face-11 ((t (:foreground "LightYellow1")))) + '(gnus-emphasis-bold ((t (:bold t :weight bold)))) + '(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + '(gnus-emphasis-italic ((t (:italic t :slant italic)))) + '(gnus-emphasis-strikethru ((t (:strike-through t)))) + '(gnus-emphasis-underline ((t (:underline t)))) + '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + '(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + + '(gnus-header-content ((t (:italic t :foreground "DarkKhaki" :slant italic)))) + '(gnus-header-content-face ((t (:italic t :foreground "DarkKhaki" :slant italic)))) + '(gnus-header-from ((t (:foreground "PaleGreen1")))) + '(gnus-header-from-face ((t (:foreground "PaleGreen1")))) + '(gnus-header-name ((t (:bold t :foreground "BlanchedAlmond" :weight bold)))) + '(gnus-header-name-face ((t (:bold t :foreground "BlanchedAlmond" :weight bold)))) + '(gnus-header-newsgroups ((t (:italic t :foreground "yellow" :slant italic)))) + '(gnus-header-newsgroups-face ((t (:italic t :foreground "yellow" :slant italic)))) + '(gnus-header-subject ((t (:foreground "coral1")))) + '(gnus-header-subject-face ((t (:foreground "coral1")))) + '(gnus-signature ((t (:italic t :slant italic)))) + '(gnus-signature-face ((t (:italic t :slant italic)))) + '(gnus-splash ((t (:foreground "#cccccc")))) + '(gnus-summary-cancelled ((t (:background "black" :foreground "yellow")))) + '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + '(gnus-summary-high-ancient ((t (:bold t :foreground "CornflowerBlue" :weight bold)))) + '(gnus-summary-high-ancient-face ((t (:bold t :foreground "CornflowerBlue" :weight bold)))) + '(gnus-summary-normal-ancient ((t (:foreground "SkyBlue")))) + '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + '(gnus-summary-low-ancient ((t (:italic t :foreground "LightSteelBlue" :slant italic)))) + '(gnus-summary-low-ancien-facet ((t (:italic t :foreground "LightSteelBlue" :slant italic)))) + + '(gnus-summary-high-read ((t (:bold t :foreground "grey60" :weight bold)))) + '(gnus-summary-high-read-face ((t (:bold t :foreground "grey60" :weight bold)))) + '(gnus-summary-normal-read ((t (:foreground "grey50")))) + '(gnus-summary-normal-read-face ((t (:foreground "grey50")))) + '(gnus-summary-low-read ((t (:italic t :foreground "LightSlateGray" :slant italic)))) + '(gnus-summary-low-read-face ((t (:italic t :foreground "LightSlateGray" :slant italic)))) + + '(gnus-summary-high-ticked ((t (:bold t :foreground "RosyBrown" :weight bold)))) + '(gnus-summary-high-ticked-face ((t (:bold t :foreground "RosyBrown" :weight bold)))) + '(gnus-summary-normal-ticked ((t (:foreground "LightSalmon")))) + '(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) + '(gnus-summary-low-ticked ((t (:italic t :foreground "pink" :slant italic)))) + '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic)))) + + '(gnus-summary-high-undownloaded ((t (:bold t :foreground "ivory3" :weight bold)))) + '(gnus-summary-normal-undownloaded ((t (:foreground "LightGray" :weight normal)))) + '(gnus-summary-low-undownloaded ((t (:italic t :foreground "grey75" :slant italic :weight normal)))) + + '(gnus-summary-high-unread ((t (:bold t :foreground "PaleGreen" :weight bold)))) + '(gnus-summary-high-unread-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) + '(gnus-summary-normal-unread ((t (:foreground "YellowGreen")))) + '(gnus-summary-normal-unread-face ((t (:foreground "YellowGreen")))) + '(gnus-summary-low-unread ((t (:italic t :foreground "MediumSeaGreen" :slant italic)))) + '(gnus-summary-low-unread-face ((t (:italic t :foreground "MediumSeaGreen" :slant italic)))) + '(gnus-summary-root-face ((t (:bold t :foreground "Red" :weight bold)))) + '(gnus-summary-selected ((t (:underline t :foreground "LemonChiffon")))) + '(gnus-summary-selected-face ((t (:underline t :foreground "LemonChiffon")))) + '(gnus-user-agent-bad-face ((t (:bold t :background "black" :foreground "red" :weight bold)))) + '(gnus-user-agent-good-face ((t (:background "black" :foreground "green")))) + '(gnus-user-agent-unknown-face ((t (:bold t :background "black" :foreground "orange" :weight bold)))) + '(gnus-x-face ((t (:background "white" :foreground "black")))) + + '(gnus-group-mail-1 ((t (:bold t :foreground "#3BFF00" :weight normal)))) + '(gnus-group-mail-1-face ((t (:bold t :foreground "#3BFF00" :weight normal)))) + '(gnus-group-mail-2 ((t (:bold t :foreground "#5EFF00" :weight normal)))) + '(gnus-group-mail-2-face ((t (:bold t :foreground "#5EFF00" :weight normal)))) + '(gnus-group-mail-3 ((t (:bold t :foreground "#80FF00" :weight normal)))) + '(gnus-group-mail-3-face ((t (:bold t :foreground "#A1FF00" :weight normal)))) + + + '(gnus-group-mail-1-empty ((t (:foreground "#249900")))) + '(gnus-group-mail-1-empty-face ((t (:foreground "#249900")))) + '(gnus-group-mail-2-empty ((t (:foreground "#389900")))) + '(gnus-group-mail-2-empty-face ((t (:foreground "#389900")))) + '(gnus-group-mail-3-empty ((t (:foreground "#4D9900")))) + '(gnus-group-mail-3-empty-face ((t (:foreground "#4D9900")))) + + '(gnus-group-mail-low ((t (:bold t :foreground "aquamarine2" :weight bold)))) + '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) + '(gnus-group-mail-low-empty ((t (:foreground "aquamarine2")))) + '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine2")))) + + '(gnus-group-news-1 ((t (:bold t :foreground "#8480FF" :weight bold)))) + '(gnus-group-news-1-face ((t (:bold t :foreground "#8480FF" :weight bold)))) + '(gnus-group-news-2 ((t (:bold t :foreground "#8088FF" :weight bold)))) + '(gnus-group-news-2-face ((t (:bold t :foreground "#8088FF" :weight bold)))) + '(gnus-group-news-3 ((t (:bold t :foreground "#8095FF" :weight bold)))) + '(gnus-group-news-3-face ((t (:bold t :foreground "#8095FF" :weight bold)))) + '(gnus-group-news-4 ((t (:bold t :foreground "#80A1FF" :weight bold)))) + '(gnus-group-news-4-face ((t (:bold t :foreground "#80A1FF" :weight bold)))) + '(gnus-group-news-5 ((t (:bold t :foreground "#80AEFF" :weight bold)))) + '(gnus-group-news-5-face ((t (:bold t :foreground "#80AEFF" :weight bold)))) + '(gnus-group-news-6 ((t (:bold t :foreground "#80BBFF" :weight bold)))) + '(gnus-group-news-6-face ((t (:bold t :foreground "#80BBFF" :weight bold)))) + + '(gnus-group-news-1-empty ((t (:foreground "#524DFF")))) + '(gnus-group-news-1-empty-face ((t (:foreground "#524DFF")))) + '(gnus-group-news-2-empty ((t (:foreground "#4D58FF")))) + '(gnus-group-news-2-empty-face ((t (:foreground "#4D58FF")))) + '(gnus-group-news-3-empty ((t (:foreground "#4D6AFF")))) + '(gnus-group-news-3-empty-face ((t (:foreground "#4D6AFF")))) + '(gnus-group-news-4-empty ((t (:foreground "#4D7CFF")))) + '(gnus-group-news-4-empty-face ((t (:foreground "#4D7CFF")))) + '(gnus-group-news-5-empty ((t (:foreground "#4D8EFF")))) + '(gnus-group-news-5-empty-face ((t (:foreground "#4D8EFF")))) + '(gnus-group-news-6-empty ((t (:foreground "#4DA0FF")))) + '(gnus-group-news-6-empty-face ((t (:foreground "#4DA0FF")))) + + '(gnus-group-news-low ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) + '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) + '(gnus-group-news-low-empty ((t (:foreground "DarkTurquoise")))) + '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + + ;;message faces + '(message-cited-text ((t (:foreground "red3")))) + '(message-header-cc ((t (:bold t :foreground "chartreuse1" :weight bold)))) + '(message-header-cc-face ((t (:bold t :foreground "chartreuse1" :weight bold)))) + '(message-header-name ((t (:foreground "green")))) + '(message-header-name-face ((t (:foreground "green")))) + '(message-header-newsgroups ((t (:italic t :bold t :foreground "papaya whip" :slant italic :weight bold)))) + '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "papaya whip" :slant italic :weight bold)))) + '(message-header-other ((t (:foreground "ivory")))) + '(message-header-other-face ((t (:foreground "ivory")))) + '(message-header-subject ((t (:foreground "OliveDrab1")))) + '(message-header-subject-face ((t (:foreground "OliveDrab1")))) + '(message-header-to ((t (:bold t :foreground "floral white" :weight bold)))) + '(message-header-to-face ((t (:bold t :foreground "floral white" :weight bold)))) + '(message-header-xheader ((t (:foreground "DeepSkyBlue1")))) + '(message-header-xheader-face ((t (:foreground "DeepSkyBlue1")))) + '(message-mml ((t (:foreground "MediumSpringGreen")))) + '(message-mml-face ((t (:foreground "MediumSpringGreen")))) + '(message-separator ((t (:foreground "LightSkyBlue1")))) + '(message-separator-face ((t (:foreground "LightSkyBlue1")))) + '(message-url ((t (:bold t :foreground "blue" :weight bold)))) + + '(bg:erc-color-face0 ((t (:background "saddle brown")))) + '(bg:erc-color-face1 ((t (:background "black")))) + '(bg:erc-color-face10 ((t (:background "DodgerBlue4")))) + '(bg:erc-color-face11 ((t (:background "cyan4")))) + '(bg:erc-color-face12 ((t (:background "blue")))) + '(bg:erc-color-face13 ((t (:background "deeppink")))) + '(bg:erc-color-face14 ((t (:background "gray50")))) + '(bg:erc-color-face15 ((t (:background "grey15")))) + '(bg:erc-color-face2 ((t (:background "blue4")))) + '(bg:erc-color-face3 ((t (:background "green4")))) + '(bg:erc-color-face4 ((t (:background "red")))) + '(bg:erc-color-face5 ((t (:background "brown")))) + '(bg:erc-color-face6 ((t (:background "purple")))) + '(bg:erc-color-face7 ((t (:background "orange")))) + '(bg:erc-color-face8 ((t (:background "yellow4")))) + '(bg:erc-color-face9 ((t (:background "green")))) + '(erc-action-face ((t (:bold t :weight bold :foreground "turquoise1")))) + '(erc-bold-face ((t (:bold t :weight bold)))) + '(erc-button ((t (:bold t :weight bold :foreground "RoyalBlue1" :box (:line-width 2 :style released-button))))) + '(erc-button-face ((t (:bold t :weight bold :foreground "RoyalBlue1" :box (:line-width 2 :style released-button))))) + '(erc-command-indicator-face ((t (:bold t :weight bold)))) + '(erc-current-nick-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) + '(erc-dangerous-host-face ((t (:foreground "red")))) + '(erc-direct-msg-face ((t (:foreground "sandybrown")))) + '(erc-error-face ((t (:foreground "red")))) + '(erc-fool-face ((t (:foreground "dim gray")))) + '(erc-header-line ((t (:background "grey95" :foreground "ConFlowerBlue")))) + '(erc-input-face ((t (:foreground "brown")))) + '(erc-inverse-face ((t (:background "Black" :foreground "White")))) + '(erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold)))) + '(erc-my-nick-face ((t (:bold t :foreground "brown" :weight bold)))) + '(erc-nick-default-face ((t (:bold t :weight bold :foreground "DodgerBlue1")))) + '(erc-button-nickname-face ((t (:bold t :weight bold :background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button) )))) + '(erc-nick-msg-face ((t (:bold t :foreground "IndianRed" :weight bold)))) + '(erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold)))) + '(erc-pal-face ((t (:bold t :foreground "Magenta" :weight bold)))) + '(erc-prompt-face ((t (:bold t :background "Navy" :foreground "lightBlue2" :weight bold)))) + '(erc-timestamp-face ((t (:bold t :foreground "SeaGreen1" :weight bold)))) + '(erc-underline-face ((t (:underline t)))) + '(fg:erc-color-face0 ((t (:foreground "BlanchedAlmond")))) + '(fg:erc-color-face1 ((t (:foreground "beige")))) + '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) + '(fg:erc-color-face11 ((t (:foreground "cyan")))) + '(fg:erc-color-face12 ((t (:foreground "lightblue1")))) + '(fg:erc-color-face13 ((t (:foreground "deeppink")))) + '(fg:erc-color-face14 ((t (:foreground "gray50")))) + '(fg:erc-color-face15 ((t (:foreground "gray90")))) + '(fg:erc-color-face2 ((t (:foreground "blue4")))) + '(fg:erc-color-face3 ((t (:foreground "green4")))) + '(fg:erc-color-face4 ((t (:foreground "red")))) + '(fg:erc-color-face5 ((t (:foreground "brown")))) + '(fg:erc-color-face6 ((t (:foreground "purple")))) + '(fg:erc-color-face7 ((t (:foreground "orange")))) + '(fg:erc-color-face8 ((t (:foreground "yellow")))) + '(fg:erc-color-face9 ((t (:foreground "green")))) + + '(org-agenda-date ((t (:foreground "LightSkyBlue")))) + '(org-agenda-date-weekend ((t (:bold t :foreground "LightSkyBlue" :weight bold)))) + '(org-agenda-restriction-lock ((t (:background "skyblue4")))) + '(org-agenda-structure ((t (:foreground "LightSkyBlue")))) + '(org-archived ((t (:foreground "grey70")))) + '(org-code ((t (:foreground "grey70")))) + '(org-column ((t (:background "grey30" :slant normal :weight normal :height 81 :family "unknown-DejaVu Sans Mono")))) + '(org-column-title ((t (:bold t :background "grey30" :underline t :weight bold)))) + '(org-date ((t (:foreground "Cyan" :underline t)))) + '(org-done ((t (:bold t :foreground "PaleGreen" :weight bold)))) + '(org-drawer ((t (:foreground "LightSkyBlue")))) + '(org-ellipsis ((t (:foreground "LightGoldenrod" :underline t)))) + '(org-formula ((t (:foreground "chocolate1")))) + '(org-headline-done ((t (:foreground "LightSalmon")))) + '(org-hide ((t (:foreground "black")))) + '(org-latex-and-export-specials ((t (:foreground "burlywood")))) + '(org-level-1 ((t (:foreground "LightSkyBlue")))) + '(org-level-2 ((t (:foreground "LightGoldenrod")))) + '(org-level-3 ((t (:foreground "Cyan1")))) + '(org-level-4 ((t (:foreground "chocolate1")))) + '(org-level-5 ((t (:foreground "PaleGreen")))) + '(org-level-6 ((t (:foreground "Aquamarine")))) + '(org-level-7 ((t (:foreground "LightSteelBlue")))) + '(org-level-8 ((t (:foreground "LightSalmon")))) + '(org-link ((t (:foreground "Cyan" :underline t)))) + '(org-mode-line-clock ((t (:foreground "DarkGreen" :underline t)))) + '(org-scheduled-previously ((t (:foreground "chocolate1")))) + '(org-scheduled-today ((t (:foreground "PaleGreen")))) + '(org-sexp-date ((t (:foreground "Cyan")))) + '(org-special-keyword ((t (:foreground "LightSalmon")))) + '(org-table ((t (:foreground "LightSkyBlue")))) + '(org-tag ((t (:bold t :weight bold)))) + '(org-target ((t (:underline t)))) + '(org-time-grid ((t (:foreground "LightGoldenrod")))) + '(org-todo ((t (:bold t :foreground "Pink" :weight bold)))) + '(org-upcoming-deadline ((t (:foreground "chocolate1")))) + '(org-verbatim ((t (:foreground "grey70" :underline t)))) + '(org-warning ((t (:bold t :weight bold :foreground "Pink")))) + '(outline-1 ((t (:foreground "LightSkyBlue")))) + '(outline-2 ((t (:foreground "LightGoldenrod")))) + '(outline-3 ((t (:foreground "Cyan1")))) + '(outline-4 ((t (:foreground "chocolate1")))) + '(outline-5 ((t (:foreground "PaleGreen")))) + '(outline-6 ((t (:foreground "Aquamarine")))) + '(outline-7 ((t (:foreground "LightSteelBlue")))) + '(outline-8 ((t (:foreground "LightSalmon")))) + + + '(CUA-global-mark-face ((t (:background "cyan" :foreground "black")))) + '(CUA-rectangle-face ((t (:background "maroon" :foreground "white")))) + '(CUA-rectangle-noselect-face ((t (:background "dimgray" :foreground "white")))) + '(Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) + '(Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) + '(Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) + '(Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) + '(align-highlight-nochange-face ((t (:background "SkyBlue4")))) + + '(antlr-font-lock-keyword-face ((t (:foreground "SteelBlue")))) ;% + '(antlr-font-lock-literal-face ((t (:foreground "PaleVioletRed")))) + '(antlr-font-lock-ruledef-face ((t (:foreground "DarkGreen")))) + '(antlr-font-lock-ruleref-face ((t (:foreground "SteelBlue")))) + '(antlr-font-lock-tokendef-face ((t (:foreground "khaki")))) + '(antlr-font-lock-tokenref-face ((t (:foreground "LightSteelBlue4")))) + + '(bbdb-company ((t (:italic t :slant italic :foreground "indian red")))) + '(bbdb-field-name ((t (:bold t :weight bold :foreground "steel blue")))) + '(bbdb-field-value ((t (:foreground "AntiqueWhite2")))) + '(bbdb-name ((t (:underline t :foreground "cadet blue")))) + + '(bold ((t (:bold t :weight bold)))) + '(bold-italic ((t (:bold t :italic t :slant italic :weight bold)))) + '(border ((t (:background "gold" :foreground "black" )))) + '(buffer-menu-buffer ((t (:bold t :weight bold)))) + '(button ((t (:underline t :box (:line-width 2 :color "grey" + :style released-button) + :foreground "black" :background "grey" + :weight bold )))) + '(calendar-today-face ((t (:underline t :bold t :foreground "cornsilk")))) + '(change-log-acknowledgement-face ((t (:italic t :slant oblique :foreground "AntiqueWhite3")))) + '(change-log-conditionals-face ((t (:foreground "Aquamarine")))) + '(change-log-date-face ((t (:italic t :slant oblique :foreground "BurlyWood")))) + '(change-log-email-face ((t (:foreground "Aquamarine")))) + '(change-log-file-face ((t (:bold t :family "Verdana" :weight bold :foreground "LightSkyBlue" :height 0.9)))) + '(change-log-function-face ((t (:foreground "Aquamarine")))) + '(change-log-list-face ((t (:foreground "LightSkyBlue")))) + '(change-log-name-face ((t (:bold t :weight bold :foreground "Gold")))) + + '(comint-highlight-input ((t (:bold t :weight bold)))) + '(comint-highlight-prompt ((t (:foreground "cyan1")))) + '(compilation-column-number ((t (:foreground "PaleGreen")))) + '(compilation-error ((t (:bold t :weight bold :foreground "Brown1")))) + '(compilation-info ((t (:bold t :foreground "LightPink1" :weight bold)))) + '(compilation-line-number ((t (:foreground "LightGoldenrod")))) + '(compilation-message-face ((t (:underline t)))) + '(compilation-warning ((t (:bold t :foreground "Orange" :weight bold)))) + '(compilation-warning-face ((t (:bold t :foreground "Orange" :weight bold)))) + '(completions-common-part ((t (:family "unknown-DejaVu Sans Mono" + :width normal :weight normal + :slant normal :foreground "WhiteSmoke" + :background "black" :height 81)))) + '(completions-first-difference ((t (:bold t :weight bold)))) + + '(css-selector ((t (:foreground "LightSteelBlue")))) + '(css-property ((t (:foreground "light sea green")))) + + '(cursor ((t (:background "orchid")))) + '(custom-button-face ((t (:background "lightgrey" :foreground "black" + :box '(:line-width 2 :style released-button))))) + '(custom-button-pressed-face ((t (:background "lightgrey" + :foreground "black" + :box '(:line-width 2 :style pressed-button))))) + '(custom-changed-face ((t (:foreground "wheat" :background "blue")))) + '(custom-comment-face ((t (:background "dim gray")))) + '(custom-comment-tag-face ((t (:foreground "gray80")))) + '(custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.1)))) + '(custom-group-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold :height 1.1)))) + '(custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height 1.1)))) + '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) + '(custom-modified-face ((t (:background "blue" :foreground "white")))) + '(custom-rogue-face ((t (:background "black" :foreground "pink")))) + '(custom-saved-face ((t (:underline t)))) + '(custom-set-face ((t (:background "white" :foreground "blue")))) + '(custom-state-face ((t (:foreground "lime green")))) + '(custom-variable-button-face ((t (:bold t :underline t :weight bold + :background "lightgrey" + :foreground "black" + :box '(:line-width 2 :style released-button))))) + '(custom-variable-tag-face ((t (:bold t :family "helv" + :foreground "light blue" + :weight bold :height 1.2)))) + + '(diary ((t (:foreground "IndianRed")))) + '(diary-anniversary ((t (:foreground "Cyan1")))) + '(diary-button ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + '(diary-face ((t (:foreground "IndianRed")))) + '(diary-time ((t (:foreground "LightGoldenrod")))) + '(diff-added ((t (:foreground "Green")))) + '(diff-added-face ((t (:foreground "Green")))) + '(diff-changed-face ((t (:foreground "Khaki")))) + '(diff-context-face ((t (:foreground "grey70")))) + '(diff-file-header ((t (:bold t :background "grey20" :foreground "ivory1" :weight bold)))) + '(diff-file-header-face ((t (:bold t :background "grey20" :foreground "ivory1" :weight bold)))) + '(diff-function-face ((t (:foreground "SpringGreen1")))) + '(diff-header-face ((t (:background "SlateBlue4")))) + '(diff-hunk-header ((t (:slant italic :background "DodgerBlue4")))) + '(diff-hunk-header-face ((t (:slant italic :background "DodgerBlue4")))) + '(diff-index-face ((t (:bold t :weight bold :background "SteelBlue4" :foreground "linen" )))) + '(diff-nonexistent ((t (:bold t :weight bold :background "Black" :foreground "Wheat1")))) + '(diff-nonexistent-face ((t (:bold t :weight bold :background "Black" :foreground "Wheat1")))) + '(diff-removed ((t (:foreground "salmon1")))) + '(diff-removed-face ((t (:foreground "salmon1")))) + '(diff-refine-change-face ((t (:background "MidnightBlue")))) + '(diff-refine-change ((t (:background "MidnightBlue")))) + + '(ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) + '(ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) + '(ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) + '(ediff-current-diff-face-C ((t (:foreground "Navy" :background "Pink")))) + '(ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) + '(ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) + '(ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) + '(ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) + '(ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) + '(ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) + '(ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) + '(ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) + '(ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) + '(ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) + '(ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) + '(ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) + + '(eieio-custom-slot-tag-face ((t (:foreground "light blue")))) + '(eldoc-highlight-function-argument ((t (:bold t :weight bold)))) + '(epa-field-body ((t (:italic t :foreground "turquoise" :slant italic)))) + '(epa-field-name ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + '(epa-mark ((t (:bold t :foreground "orange" :weight bold)))) + '(epa-string ((t (:foreground "lightyellow")))) + '(epa-validity-disabled ((t (:italic t :slant italic)))) + '(epa-validity-high ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + '(epa-validity-low ((t (:italic t :slant italic)))) + '(epa-validity-medium ((t (:italic t :foreground "PaleTurquoise" :slant italic)))) + + '(escape-glyph ((t (:foreground "cyan")))) + + '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) + '(eshell-ls-backup-face ((t (:foreground "Grey")))) + '(eshell-ls-clutter-face ((t (:foreground "DimGray")))) + '(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) + '(eshell-ls-executable-face ((t (:foreground "Coral")))) + '(eshell-ls-missing-face ((t (:foreground "black")))) + '(eshell-ls-picture-face ((t (:foreground "Violet")))) + '(eshell-ls-product-face ((t (:foreground "sandybrown")))) + '(eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) + '(eshell-ls-special-face ((t (:foreground "Gold")))) + '(eshell-ls-symlink-face ((t (:foreground "DarkCyan" :bold t)))) + '(eshell-ls-symlink-face ((t (:foreground "White")))) + '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) + '(eshell-prompt-face ((t (:foreground "MediumAquamarine")))) + '(eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t)))) + '(eshell-test-ok-face ((t (:foreground "Green" :bold t)))) + + '(excerpt ((t (:italic t)))) + '(file-name-shadow ((t (:foreground "grey70")))) + '(fixed ((t (:bold t)))) + '(fixed-pitch ((t (:family "courier")))) + '(flyspell-duplicate-face ((t (:foreground "IndianRed" :bold t :underline t)))) + '(flyspell-incorrect-face ((t (:foreground "Pink" :bold t :underline t)))) + + '(fringe ((t (:background "grey30" :foreground "Wheat")))) + '(header-line ((t (:box (:line-width -1 :color "grey20" :style released-button) :background "grey20" :foreground "grey90" :height 0.9)))) + '(help-argument-name ((t (:italic t :slant italic)))) + '(highlight ((t (:background "gray10" :foreground "Old Lace")))) + '(hl-line ((t (:background "grey10" :foreground "Old Lace")))) + '(gnus-mouse-face ((t (:background "darkseagreen2" :foreground "blue")))) + '(erc-button-mouse-face ((t (:background "darkseagreen2" :foreground "blue")))) + '(align-highlight-change-face ((t (:background "darkseagreen2" :foreground "blue")))) + '(goto-address-url-mouse-face ((t (:background "darkseagreen2" :foreground "blue")))) + '(goto-address-url-mouse-face ((t (:background "darkseagreen2" :foreground "blue")))) + '(ispell-highlight-face ((t (:background "darkseagreen2" :foreground "blue")))) + '(ispell-highlight-face ((t (:background "darkseagreen2" :foreground "blue")))) + '(widget-mouse-face ((t (:background "darkseagreen2" :foreground "blue")))) + + '(highlight-beyond-fill-column-face ((t (:underline t)))) + '(highlight-changes ((t (:foreground nil :background "#382f2f")))) + '(highlight-changes-delete ((t (:foreground nil :background "#916868")))) + + '(holiday ((t (:background "chocolate4")))) + '(holiday-face ((t (:background "chocolate4")))) + + '(ibuffer-dired-buffer-face ((t (:foreground "mediumspringgreen" :weight bold :height 1.1)))) + '(ibuffer-help-buffer-face ((t (:italic t :slant oblique :foreground "chocolate1")))) + '(ibuffer-hidden-buffer-face ((t (:bold t :foreground "Pink" :weight bold)))) + '(ibuffer-occur-match-face ((t (:bold t :foreground "Pink" :weight bold)))) + '(ibuffer-read-only-buffer-face ((t (:foreground "SteelBlue1")))) + '(ibuffer-special-buffer-face ((t (:foreground "SteelBlue1")))) + + '(ido-first-match ((t (:bold t :weight bold)))) + '(ido-incomplete-regexp ((t (:bold t :weight bold :foreground "Pink")))) + '(ido-indicator ((t (:background "red1" :foreground "yellow1" :width condensed)))) + '(ido-only-match ((t (:foreground "ForestGreen")))) + '(ido-subdir ((t (:foreground "red1")))) + '(info-menu-5 ((t (:underline t)))) + '(info-menu-header ((t (:bold t :family "helv" :weight bold)))) + '(info-node ((t (:bold t :italic t :foreground "yellow")))) + '(info-node ((t (:italic t :bold t :foreground "white" :slant italic :weight bold)))) + '(info-xref ((t (:bold t :foreground "DodgerBlue1")))) + '(info-xref ((t (:bold t :foreground "cyan" :weight bold)))) + '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) + '(isearch-fail ((t (:background "red4")))) + '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + '(isearch-secondary ((t (:foreground "red3")))) + '(italic ((t (:italic t)))) + + '(js2-builtin-face ((t (:foreground "sandy brown")))) + '(js2-comment-face ((t (:foreground "dark orchid")))) + '(js2-constant-face ((t (:foreground "pale violet red")))) + '(js2-error-face ((t (:background "indian red" :foreground "green" :bold t)))) + '(js2-function-name-face ((t (:foreground "cadet blue")))) + '(js2-function-param-face ((t (:foreground "IndianRed1")))) + '(js2-instance-member-face ((t (:foreground "IndianRed1")))) + '(js2-jsdoc-tag-face ((t (:foreground "medium orchid")))) + '(js2-jsdoc-type-face ((t (:foreground "medium orchid")))) + '(js2-jsdoc-value-face ((t (:foreground "medium orchid")))) + '(js2-keyword-face ((t (:foreground "steel blue")))) + '(js2-private-function-call-face ((t (:foreground "cadet blue")))) + '(js2-private-member-face ((t (:foreground "IndianRed1")))) + '(js2-regexp-face ((t (:foreground "khaki")))) + '(js2-string-face ((t (:foreground "lemon chiffon")))) + '(js2-type-face ((t (:foreground "medium sea green")))) + '(js2-variable-name-face ((t (:foreground "IndianRed1")))) + '(js2-warning-face ((t (:background "indian red" :foreground "green")))) + + '(lazy-highlight ((t (:background "paleturquoise4")))) + '(link ((t (:foreground "cyan1" :underline t)))) + '(link-visited ((t (:underline t :foreground "violet")))) + + '(makefile-space ((t (:background "hotpink")))) + '(man-bold ((t (:bold t)))) + '(man-heading ((t (:bold t)))) + '(man-italic ((t (:foreground "yellow")))) + '(man-xref ((t (:underline t)))) + '(match ((t (:background "RoyalBlue3")))) + '(minibuffer-prompt ((t (:foreground "cyan")))) + '(mode-line ((t (:background "grey75" :foreground "Blue" + :box '(:line-width -1 :style released-button) + :height 0.9)))) + '(mode-line-buffer-id ((t (:background "grey65" :foreground "red" + :bold t :weight bold :height 0.9)))) + '(mode-line-emphasis ((t (:bold t :weight bold)))) + '(mode-line-highlight ((t (:box (:line-width 2 :color "grey40" + :style released-button :height 0.9))))) + '(mode-line-inactive ((t (:background "grey30" :foreground "grey80" + :box '(:line-width -1 :color "grey40") + :weight light :height 0.9)))) + '(mouse ((t (:background "OrangeRed")))) + + '(next-error ((t (:background "blue3")))) + '(nobreak-space ((t (:foreground "cyan" :underline t)))) + '(paren-blink-off ((t (:foreground "black")))) + '(paren-mismatch-face ((t (:bold t :background "white" :foreground "red")))) + '(paren-no-match-face ((t (:bold t :background "white" :foreground "red")))) + '(query-replace ((t (:foreground "brown4" :background "palevioletred2")))) + '(region ((t (:background "blue3")))) + '(scroll-bar ((t (:background "grey75" :foreground "WhiteSmoke")))) + '(secondary-selection ((t (:background "SkyBlue4")))) + '(semantic-dirty-token-face ((t (:background "lightyellow")))) + '(semantic-highlight-edits-face ((t (:background "gray20")))) + '(semantic-unmatched-syntax-face ((t (:underline "red")))) + '(senator-intangible-face ((t (:foreground "gray75")))) + '(senator-momentary-highlight-face ((t (:background "gray30")))) + '(senator-read-only-face ((t (:background "#664444")))) + '(sgml-doctype-face ((t (:foreground "orange")))) + '(sgml-end-tag-face ((t (:foreground "greenyellow")))) + '(sgml-entity-face ((t (:foreground "gold")))) + '(sgml-ignored-face ((t (:foreground "gray20" :background "gray60")))) + '(sgml-sgml-face ((t (:foreground "yellow")))) + '(sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) + '(shadow ((t (:foreground "grey70")))) + + '(show-paren-match ((t (:background "steelblue3")))) + '(show-paren-match-face ((t (:background "steelblue3")))) + '(show-paren-mismatch ((t (:background "purple" :foreground "white")))) + '(smerge-base ((t (:foreground "orange")))) + '(smerge-markers ((t (:background "grey30")))) + '(smerge-mine ((t (:foreground "cyan")))) + '(smerge-other ((t (:foreground "lightgreen")))) + '(smerge-refined-change ((t (:background "blue4")))) + '(speedbar-button-face ((t (:foreground "green3")))) + '(speedbar-directory-face ((t (:foreground "light blue")))) + '(speedbar-file-face ((t (:foreground "cyan")))) + '(speedbar-highlight-face ((t (:background "sea green")))) + '(speedbar-selected-face ((t (:foreground "red" :underline t)))) + '(speedbar-separator-face ((t (:background "blue" :foreground "white" :overline "gray")))) + '(speedbar-tag-face ((t (:foreground "yellow")))) + '(table-cell ((t (:background "blue1" :foreground "gray90")))) + + '(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + '(tooltip ((t (:family "helv" :background "lightyellow" :foreground "black")))) + '(trailing-whitespace ((t (:background "red1")))) + '(underline ((t (:underline t)))) + '(variable-pitch ((t (:family "helv")))) + '(vcursor ((t (:foreground "blue" :background "cyan" :underline t)))) + '(vertical-border ((t (:background "dim gray")))) + '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + '(vhdl-font-lock-prompt-face ((t (:foreground "Red" :bold t)))) + '(vhdl-font-lock-reserved-words-face ((t (:foreground "Orange" :bold t)))) + '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) + '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) + '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) + '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) + '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) + + '(viper-minibuffer-emacs-face ((t (:foreground "Black" :background "darkseagreen2")))) + '(viper-minibuffer-insert-face ((t (:foreground "Black" :background "pink")))) + '(viper-minibuffer-vi-face ((t (:foreground "DarkGreen" :background "grey")))) + '(viper-replace-overlay-face ((t (:foreground "Black" :background "darkseagreen2")))) + '(viper-search-face ((t (:foreground "Black" :background "khaki")))) + '(vm-highlight-url-face ((t (:bold t :italic t :slant italic :weight bold)))) + '(vm-highlighted-header-face ((t (:bold t :weight bold)))) + '(vm-mime-button-face ((t (:background "grey75" :foreground "black" :box (:line-width 2 :style released-button))))) + '(vm-summary-highlight-face ((t (:bold t :weight bold)))) + '(vm-xface ((t (:background "white" :foreground "black")))) + + '(which-func ((t (:foreground "Blue1")))) + '(widget ((t (:height 1.2 :background "Gray80" :foreground "black")))) + '(widget-button ((t (:bold t :weight bold :box (:line-width 2 :style released-button))))) + '(widget-button-face ((t (:bold t :weight bold :box (:line-width 2 :style released-button))))) + '(widget-button-pressed ((t (:foreground "red1" :background "lightgrey" :box (:line-width 2 :style pressed-button))))) + '(widget-button-pressed-face ((t (:foreground "red1" :background "lightgrey" :box (:line-width 2 :style pressed-button))))) + '(widget-documentation ((t (:foreground "lime green")))) + '(widget-documentation-face ((t (:foreground "lime green")))) + '(widget-field ((t (:background "dim gray")))) + '(widget-field-face ((t (:background "dim gray")))) + '(widget-inactive ((t (:foreground "grey70")))) + '(widget-inactive-face ((t (:foreground "grey70")))) + '(widget-single-line-field ((t (:background "dim gray")))) + '(widget-single-line-field-face ((t (:background "dim gray")))) + '(woman-bold-face ((t (:bold t)))) + '(woman-italic-face ((t (:foreground "beige")))) + '(woman-unknown-face ((t (:foreground "LightSalmon"))))) + +(provide-theme 'manoj-dark) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; manoj-dark.el ends here ------------------------------------------------------------ revno: 104956 [merge] committer: Paul Eggert branch nick: trunk timestamp: Mon 2011-07-04 19:53:27 -0700 message: Merge: Random fixes, e.g., (random) never returned negative. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 18:31:29 +0000 +++ src/ChangeLog 2011-07-05 02:51:15 +0000 @@ -1,3 +1,15 @@ +2011-07-05 Paul Eggert + + Random fixes. E.g., (random) never returned negative values. + * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the + subseconds part to the entropy, as that's a bit more random. + Prefer signed to unsigned, since the signedness doesn't matter and + in general we prefer signed. When given a limit, use a + denominator equal to INTMASK + 1, not to VALMASK + 1, because the + latter isn't right if USE_2_TAGS_FOR_INTS. + * sysdep.c (get_random): Return a value in the range 0..INTMASK, + not 0..VALMASK. Don't discard "excess" bits that random () returns. + 2011-07-04 Stefan Monnier * textprop.c (text_property_stickiness): === modified file 'src/fns.c' --- src/fns.c 2011-07-04 12:22:39 +0000 +++ src/fns.c 2011-07-05 02:51:15 +0000 @@ -79,10 +79,14 @@ { EMACS_INT val; Lisp_Object lispy_val; - EMACS_UINT denominator; if (EQ (limit, Qt)) - seed_random (getpid () + time (NULL)); + { + EMACS_TIME t; + EMACS_GET_TIME (t); + seed_random (getpid () ^ EMACS_SECS (t) ^ EMACS_USECS (t)); + } + if (NATNUMP (limit) && XFASTINT (limit) != 0) { /* Try to take our random number from the higher bits of VAL, @@ -92,7 +96,7 @@ it's possible to get a quotient larger than n; discarding these values eliminates the bias that would otherwise appear when using a large n. */ - denominator = ((EMACS_UINT) 1 << VALBITS) / XFASTINT (limit); + EMACS_INT denominator = (INTMASK + 1) / XFASTINT (limit); do val = get_random () / denominator; while (val >= XFASTINT (limit)); === modified file 'src/sysdep.c' --- src/sysdep.c 2011-06-25 08:40:38 +0000 +++ src/sysdep.c 2011-07-05 02:51:15 +0000 @@ -1783,7 +1783,8 @@ } /* - * Build a full Emacs-sized word out of whatever we've got. + * Return a nonnegative random integer out of whatever we've got. + * It contains enough bits to make a random (signed) Emacs fixnum. * This suffices even for a 64-bit architecture with a 15-bit rand. */ EMACS_INT @@ -1791,9 +1792,11 @@ { EMACS_UINT val = 0; int i; - for (i = 0; i < (VALBITS + RAND_BITS - 1) / RAND_BITS; i++) - val = (val << RAND_BITS) ^ random (); - return val & (((EMACS_INT) 1 << VALBITS) - 1); + for (i = 0; i < (FIXNUM_BITS + RAND_BITS - 1) / RAND_BITS; i++) + val = (random () ^ (val << RAND_BITS) + ^ (val >> (BITS_PER_EMACS_INT - RAND_BITS))); + val ^= val >> (BITS_PER_EMACS_INT - FIXNUM_BITS); + return val & INTMASK; } #ifndef HAVE_STRERROR ------------------------------------------------------------ revno: 104955 fixes bug(s): http://debbugs.gnu.org/8942 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-07-05 00:40:03 +0200 message: lisp/server.el: Catch quit and close the connection (bug#8942). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 22:16:10 +0000 +++ lisp/ChangeLog 2011-07-04 22:40:03 +0000 @@ -1,3 +1,9 @@ +2011-07-04 Juanma Barranquero + + * server.el (server-execute): Catch quit and call + `server-return-error' to pass the error back to emacsclient and + close the connection (bug#8942). + 2011-07-04 Ken Manheimer * allout.el (allout-encrypt-unencrypted-on-saves): Do not provide === modified file 'lisp/server.el' --- lisp/server.el 2011-07-04 01:04:29 +0000 +++ lisp/server.el 2011-07-04 22:40:03 +0000 @@ -1153,7 +1153,10 @@ "When done with a buffer, type \\[server-edit]"))))) (when (and frame (null tty-name)) (server-unselect-display frame))) - (error (server-return-error proc err))))) + ((quit error) + (when (eq (car err) 'quit) + (message "Quit emacsclient request")) + (server-return-error proc err))))) (defun server-return-error (proc err) (ignore-errors ------------------------------------------------------------ revno: 104954 committer: Ken Manheimer branch nick: trunk timestamp: Mon 2011-07-04 18:16:10 -0400 message: * allout.el (allout-encrypt-unencrypted-on-saves): Do not provide insecure exception for current topic. Also note that auto-saves are handled differently. (allout-auto-save-temporarily-disabled), (allout-just-did-undo): State variables for tracking auto-save inhibition situation. (allout-write-contents-hook-handler): Rename from 'allout-write-file-hook-handler', and describe how it depends on write-contents-functions sensitivity to non-nil value to prevent file write. (allout-auto-save-hook-handler): Remove. auto-save does not check this in individual buffers, only in the starting buffer, so this is not the right way for us to inhibit auto-save in a buffer according to its condition. (allout-mode): Use new allout-write-contents-hook-handler, and only with write-contents-functions. Remove auto-save provisions - they're implemented elsewhere. (allout-before-change-handler): If undo is in progress, note that for attention of allout-post-command-business. (allout-post-command-business): If the command we're following was an undo, check for change in the status of encrypted items and adjust auto-save inhibitions accordingly. (allout-toggle-subtree-encryption): Adjust auto-save inhibition according to whether there are or aren't any plain-text topics pending encryption. (allout-inhibit-auto-save-info-for-decryption): Adjust buffer-saved-size and some allout state to inhibit auto-saves if there are plain-text topics pending encryption. (allout-maybe-resume-auto-save-info-after-encryption): Adjust buffer-saved-size and some allout state to not inhibit auto-saves if there are no longer any plain-text topics pending encryption. (allout-next-topic-pending-encryption), (allout-encrypt-decrypted): No longer provide for exemption of the current topic. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 22:11:40 +0000 +++ lisp/ChangeLog 2011-07-04 22:16:10 +0000 @@ -1,3 +1,49 @@ +2011-07-04 Ken Manheimer + + * allout.el (allout-encrypt-unencrypted-on-saves): Do not provide + insecure exception for current topic. Also note that auto-saves + are handled differently. + + (allout-auto-save-temporarily-disabled), (allout-just-did-undo): + State variables for tracking auto-save inhibition situation. + + (allout-write-contents-hook-handler): Rename from + 'allout-write-file-hook-handler', and describe how it depends on + write-contents-functions sensitivity to non-nil value to prevent + file write. + + (allout-auto-save-hook-handler): Remove. auto-save does not check + this in individual buffers, only in the starting buffer, so this + is not the right way for us to inhibit auto-save in a buffer + according to its condition. + + (allout-mode): Use new allout-write-contents-hook-handler, and + only with write-contents-functions. Remove auto-save provisions - + they're implemented elsewhere. + + (allout-before-change-handler): If undo is in progress, note that + for attention of allout-post-command-business. + + (allout-post-command-business): If the command we're following was + an undo, check for change in the status of encrypted items and + adjust auto-save inhibitions accordingly. + + (allout-toggle-subtree-encryption): Adjust auto-save inhibition + according to whether there are or aren't any plain-text topics + pending encryption. + + (allout-inhibit-auto-save-info-for-decryption): Adjust + buffer-saved-size and some allout state to inhibit auto-saves if + there are plain-text topics pending encryption. + + (allout-maybe-resume-auto-save-info-after-encryption): Adjust + buffer-saved-size and some allout state to not inhibit auto-saves + if there are no longer any plain-text topics pending encryption. + + (allout-next-topic-pending-encryption), + (allout-encrypt-decrypted): No longer provide for exemption of the + current topic. + 2011-07-04 Juri Linkov Add 7z operations to delete and save changed members (bug#8968). === modified file 'lisp/allout.el' --- lisp/allout.el 2011-07-02 17:39:41 +0000 +++ lisp/allout.el 2011-07-04 22:16:10 +0000 @@ -823,37 +823,32 @@ :group 'allout-encryption) ;;;_ = allout-encrypt-unencrypted-on-saves (defcustom allout-encrypt-unencrypted-on-saves t - "When saving, should topics pending encryption be encrypted? - -The idea is to prevent file-system exposure of any un-encrypted stuff, and -mostly covers both deliberate file writes and auto-saves. - - - Yes: encrypt all topics pending encryption, even if it's the one - currently being edited. (In that case, the currently edited topic - will be automatically decrypted before any user interaction, so they - can continue editing but the copy on the file system will be - encrypted.) - Auto-saves will use the \"All except current topic\" mode if this - one is selected, to avoid practical difficulties -- see below. - - All except current topic: skip the topic currently being edited, even if - it's pending encryption. This may expose the current topic on the - file sytem, but avoids the nuisance of prompts for the encryption - passphrase in the middle of editing for, eg, autosaves. - This mode is used for auto-saves for both this option and \"Yes\". - - No: leave it to the user to encrypt any unencrypted topics. - -For practical reasons, auto-saves always use the 'except-current policy -when auto-encryption is enabled. (Otherwise, spurious passphrase prompts -and unavoidable timing collisions are too disruptive.) If security for a -file requires that even the current topic is never auto-saved in the clear, -disable auto-saves for that file." - - :type '(choice (const :tag "Yes" t) - (const :tag "All except current topic" except-current) - (const :tag "No" nil)) - :version "22.1" + "If non-nil, topics pending encryption are encrypted during buffer saves. + +This provents file-system exposure of un-encrypted contents of +items marked for encryption. + +When non-nil, if the topic currently being edited is decrypted, +it will be encrypted for saving but automatically decrypted +before any subsequent user interaction, so it is once again clear +text for editing though the file system copy is encrypted. + +\(Auto-saves are handled differently. Buffers with plain-text +exposed encrypted topics are exempted from auto saves until all +such topics are encrypted.)" + + :type 'boolean + :version "23.1" :group 'allout-encryption) (make-variable-buffer-local 'allout-encrypt-unencrypted-on-saves) +(defvar allout-auto-save-temporarily-disabled nil + "True while topic encryption is pending and auto-saving was active. + +The value of buffer-saved-size at the time of decryption is used, +for restoring when all encryptions are established.") +(defvar allout-just-did-undo nil + "True just after undo commands, until allout-post-command-business.") +(make-variable-buffer-local 'allout-just-did-undo) ;;;_ + Developer ;;;_ = allout-developer group @@ -1564,39 +1559,43 @@ (defmacro allout-mode-p () "Return t if `allout-mode' is active in current buffer." 'allout-mode) -;;;_ > allout-write-file-hook-handler () -(defun allout-write-file-hook-handler () - "Implement `allout-encrypt-unencrypted-on-saves' policy for file writes." +;;;_ > allout-write-contents-hook-handler () +(defun allout-write-contents-hook-handler () + "Implement `allout-encrypt-unencrypted-on-saves' for file writes + +Return nil if all goes smoothly, or else return an informative +message if an error is encountered. The message will serve as a +non-nil return on `write-contents-functions' to prevent saving of +the buffer while it has decrypted content. + +This behavior depends on emacs versions that implement the +`write-contents-functions' hook." (if (or (not (allout-mode-p)) (not (boundp 'allout-encrypt-unencrypted-on-saves)) (not allout-encrypt-unencrypted-on-saves)) nil - (let ((except-mark (and (equal allout-encrypt-unencrypted-on-saves - 'except-current) - (point-marker)))) - (if (save-excursion (goto-char (point-min)) - (allout-next-topic-pending-encryption except-mark)) - (progn - (message "auto-encrypting pending topics") - (sit-for 0) - (condition-case failure + (if (save-excursion (goto-char (point-min)) + (allout-next-topic-pending-encryption)) + (progn + (message "auto-encrypting pending topics") + (sit-for 0) + (condition-case failure + (progn (setq allout-after-save-decrypt - (allout-encrypt-decrypted except-mark)) - (error (message - "allout-write-file-hook-handler suppressing error %s" - failure) - (sit-for 2))))) - )) - nil) -;;;_ > allout-auto-save-hook-handler () -(defun allout-auto-save-hook-handler () - "Implement `allout-encrypt-unencrypted-on-saves' policy for auto save." - - (if (and (allout-mode-p) allout-encrypt-unencrypted-on-saves) - ;; Always implement 'except-current policy when enabled. - (let ((allout-encrypt-unencrypted-on-saves 'except-current)) - (allout-write-file-hook-handler)))) + (allout-encrypt-decrypted)) + ;; aok - return nil: + nil) + (error + ;; whoops - probably some still-decrypted items, return non-nil: + (let ((text (format (concat "%s contents write inhibited due to" + " encrypted topic encryption error:" + " %s") + (buffer-name (current-buffer)) + failure))) + (message text)(sit-for 2) + text))))) + )) ;;;_ > allout-after-saves-handler () (defun allout-after-saves-handler () "Decrypt topic encrypted for save, if it's currently being edited. @@ -1960,12 +1959,7 @@ :lighter " Allout" :keymap 'allout-mode-map - (let ((write-file-hook-var-name (cond ((boundp 'write-file-functions) - 'write-file-functions) - ((boundp 'write-file-hooks) - 'write-file-hooks) - (t 'local-write-file-hooks))) - (use-layout (if (listp allout-layout) + (let ((use-layout (if (listp allout-layout) allout-layout allout-default-layout))) @@ -1984,9 +1978,8 @@ (remove-hook 'post-command-hook 'allout-post-command-business t) (remove-hook 'before-change-functions 'allout-before-change-handler t) (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t) - (remove-hook write-file-hook-var-name - 'allout-write-file-hook-handler t) - (remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t) + (remove-hook 'write-contents-functions + 'allout-write-contents-hook-handler t) (remove-overlays (point-min) (point-max) 'category 'allout-exposure-category)) @@ -2019,9 +2012,8 @@ (add-hook 'post-command-hook 'allout-post-command-business nil t) (add-hook 'before-change-functions 'allout-before-change-handler nil t) (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t) - (add-hook write-file-hook-var-name 'allout-write-file-hook-handler + (add-hook 'write-contents-functions 'allout-write-contents-hook-handler nil t) - (add-hook 'auto-save-hook 'allout-auto-save-hook-handler nil t) ;; Stash auto-fill settings and adjust so custom allout auto-fill ;; func will be used if auto-fill is active or activated. (The @@ -2154,8 +2146,10 @@ See `allout-overlay-interior-modification-handler' for details." - (when (and (allout-mode-p) undo-in-progress (allout-hidden-p)) - (allout-show-children)) + (when (and (allout-mode-p) undo-in-progress) + (setq allout-just-did-undo t) + (if (allout-hidden-p) + (allout-show-children))) ;; allout-overlay-interior-modification-handler on an overlay handles ;; this in other emacs, via `allout-exposure-category's 'modification-hooks. @@ -3308,12 +3302,29 @@ - Implement (and clear) `allout-post-goto-bullet', for hot-spot outline commands. +- If the command we're following was an undo, check for change in + the status of encrypted items and adjust auto-save inhibitions + accordingly. + - Decrypt topic currently being edited if it was encrypted for a save." - ; Apply any external change func: (if (not (allout-mode-p)) ; In allout-mode. nil + (when allout-just-did-undo + (setq allout-just-did-undo nil) + (cond ((and (= buffer-saved-size -1) + allout-auto-save-temporarily-disabled) + ;; user possibly undid a decryption, deinhibit auto-save: + (allout-maybe-resume-auto-save-info-after-encryption)) + ((save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (not (allout-next-topic-pending-encryption)))) + ;; plain-text encrypted items are present, inhibit auto-save: + (allout-inhibit-auto-save-info-for-decryption (buffer-size))))) + (if (and (boundp 'allout-after-save-decrypt) allout-after-save-decrypt) (allout-after-saves-handler)) @@ -5899,6 +5910,8 @@ " shift it in to make it encryptable"))) (let* ((allout-buffer (current-buffer)) + ;; for use with allout-auto-save-temporarily-disabled, if necessary: + (was-buffer-saved-size buffer-saved-size) ;; Assess location: (bullet-pos allout-recent-prefix-beginning) (after-bullet-pos (point)) @@ -5978,6 +5991,12 @@ ;; Add the is-encrypted bullet qualifier: (goto-char after-bullet-pos) (insert "*")))) + + ;; adjust buffer's auto-save eligibility: + (if was-encrypted + (allout-inhibit-auto-save-info-for-decryption was-buffer-saved-size) + (allout-maybe-resume-auto-save-info-after-encryption)) + (run-hook-with-args 'allout-structure-added-hook bullet-pos subtree-end)))) ;;;_ > allout-encrypt-string (text decrypt allout-buffer keymode-cue @@ -6029,6 +6048,7 @@ (epg-context-set-passphrase-callback context #'epa-passphrase-callback-function) context)) + (encoding (with-current-buffer allout-buffer buffer-file-coding-system)) (multibyte (with-current-buffer allout-buffer @@ -6150,8 +6170,29 @@ result-text)) (error (concat "Encryption produced non-armored text, which" "conflicts with allout mode -- reconfigure!"))) - (t result-text)))) +;;;_ > allout-inhibit-auto-save-info-for-decryption +(defun allout-inhibit-auto-save-info-for-decryption (was-buffer-saved-size) + "Temporarily prevent auto-saves in this buffer when an item is decrypted. + +WAS-BUFFER-SAVED-SIZE is the value of buffer-saved-size *before* +the decryption." + (when (not (or (= buffer-saved-size -1) (= was-buffer-saved-size -1))) + (setq allout-auto-save-temporarily-disabled was-buffer-saved-size + buffer-saved-size -1))) +;;;_ > allout-maybe-resume-auto-save-info-after-encryption () +(defun allout-maybe-resume-auto-save-info-after-encryption () + "Restore auto-save info, *if* there are no topics pending encryption." + (when (and allout-auto-save-temporarily-disabled + (= buffer-saved-size -1) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (not (allout-next-topic-pending-encryption))))) + (setq buffer-saved-size allout-auto-save-temporarily-disabled + allout-auto-save-temporarily-disabled nil))) + ;;;_ > allout-encrypted-topic-p () (defun allout-encrypted-topic-p () "True if the current topic is encryptable and encrypted." @@ -6162,14 +6203,10 @@ (save-match-data (looking-at "\\*"))) ) ) -;;;_ > allout-next-topic-pending-encryption (&optional except-mark) -(defun allout-next-topic-pending-encryption (&optional except-mark) +;;;_ > allout-next-topic-pending-encryption () +(defun allout-next-topic-pending-encryption () "Return the point of the next topic pending encryption, or nil if none. -EXCEPT-MARK identifies a point whose containing topics should be excluded -from encryption. This supports 'except-current mode of -`allout-encrypt-unencrypted-on-saves'. - Such a topic has the `allout-topic-encryption-bullet' without an immediately following '*' that would mark the topic as being encrypted. It must also have content." @@ -6204,10 +6241,7 @@ (setq content-beg (point)) (backward-char 1) (allout-end-of-subtree) - (if (or (<= (point) content-beg) - (and except-mark - (<= content-beg except-mark) - (>= (point) except-mark))) + (if (<= (point) content-beg) ;; Continue looking (setq got nil) ;; Got it! @@ -6219,14 +6253,10 @@ ) ) ) -;;;_ > allout-encrypt-decrypted (&optional except-mark) -(defun allout-encrypt-decrypted (&optional except-mark) +;;;_ > allout-encrypt-decrypted () +(defun allout-encrypt-decrypted () "Encrypt topics pending encryption except those containing exemption point. -EXCEPT-MARK identifies a point whose containing topics should be excluded -from encryption. This supports the `except-current' mode of -`allout-encrypt-unencrypted-on-saves'. - If a topic that is currently being edited was encrypted, we return a list containing the location of the topic and the location of the cursor just before the topic was encrypted. This can be used, eg, to decrypt the topic @@ -6242,7 +6272,7 @@ bo-subtree editing-topic editing-point) (goto-char (point-min)) - (while (allout-next-topic-pending-encryption except-mark) + (while (allout-next-topic-pending-encryption) (setq was-modified (buffer-modified-p)) (when (save-excursion (and (boundp 'allout-encrypt-unencrypted-on-saves) ------------------------------------------------------------ revno: 104953 fixes bug(s): http://debbugs.gnu.org/8968 committer: Juri Linkov branch nick: trunk timestamp: Tue 2011-07-05 01:11:40 +0300 message: Add 7z operations to delete and save changed members. * lisp/arc-mode.el (archive-7z-expunge, archive-7z-update): New defcustoms. (archive-7z-write-file-member): New function. (archive-7z-summarize): Fix the number of dashes in the listing output. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-07-02 04:27:41 +0000 +++ etc/NEWS 2011-07-04 22:11:40 +0000 @@ -485,7 +485,7 @@ ** FIXME: xdg-open for browse-url and reportbug, 2010/08. -** Archive Mode has basic support to browse 7z archives. +** Archive Mode has basic support to browse and update 7z archives. ** browse-url has gotten a new variable that is used for mailto: URLs, `browse-url-mailto-function', which defaults to `browse-url-mail'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 20:45:22 +0000 +++ lisp/ChangeLog 2011-07-04 22:11:40 +0000 @@ -1,3 +1,12 @@ +2011-07-04 Juri Linkov + + Add 7z operations to delete and save changed members (bug#8968). + * arc-mode.el (archive-7z-expunge, archive-7z-update): + New defcustoms. + (archive-7z-write-file-member): New function. + (archive-7z-summarize): Fix the number of dashes in the + listing output. + 2011-07-04 Stefan Monnier * pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2011-04-19 13:44:55 +0000 +++ lisp/arc-mode.el 2011-07-04 22:11:40 +0000 @@ -55,9 +55,9 @@ ;; -------------------------------------------- ;; View listing Intern Intern Intern Intern Y Y ;; Extract member Y Y Y Y Y Y -;; Save changed member Y Y Y Y N N +;; Save changed member Y Y Y Y N Y ;; Add new member N N N N N N -;; Delete member Y Y Y Y N N +;; Delete member Y Y Y Y N Y ;; Rename member Y Y N N N N ;; Chmod - Y Y - N N ;; Chown - Y - - N N @@ -323,9 +323,30 @@ Extraction should happen to standard output. Archive and member name will be added." :type '(list (string :tag "Program") - (repeat :tag "Options" - :inline t - (string :format "%v"))) + (repeat :tag "Options" + :inline t + (string :format "%v"))) + :group 'archive-7z) + +(defcustom archive-7z-expunge + '("7z" "d") + "Program and its options to run in order to delete 7z file members. +Archive and member names will be added." + :type '(list (string :tag "Program") + (repeat :tag "Options" + :inline t + (string :format "%v"))) + :group 'archive-7z) + +(defcustom archive-7z-update + '("7z" "u") + "Program and its options to run in order to update a 7z file member. +Options should ensure that specified directory will be put into the 7z +file. Archive and member name will be added." + :type '(list (string :tag "Program") + (repeat :tag "Options" + :inline t + (string :format "%v"))) :group 'archive-7z) ;; ------------------------------------------------------------------------- @@ -2037,7 +2058,9 @@ (with-temp-buffer (call-process "7z" nil t nil "l" "-slt" file) (goto-char (point-min)) - (re-search-forward "^-+\n") + ;; Four dashes start the meta info section that should be skipped. + ;; Archive members start with more than four dashes. + (re-search-forward "^-----+\n") (while (re-search-forward "^Path = \\(.*\\)\n" nil t) (goto-char (match-end 0)) (let ((name (match-string 1)) @@ -2084,6 +2107,12 @@ (message "%s" (buffer-string))) (delete-file tmpfile))))) +(defun archive-7z-write-file-member (archive descr) + (archive-*-write-file-member + archive + descr + archive-7z-update)) + ;; ------------------------------------------------------------------------- ;;; Section `ar' archives. ------------------------------------------------------------ revno: 104952 committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-07-04 16:45:22 -0400 message: * bindings.el: Ignore next-buffer and previous-buffer in minibuffer-local-map. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 20:08:02 +0000 +++ lisp/ChangeLog 2011-07-04 20:45:22 +0000 @@ -5,6 +5,9 @@ 2011-07-04 Chong Yidong + * bindings.el: Ignore next-buffer and previous-buffer in + minibuffer-local-map. + * font-lock.el (font-lock-builtin-face): Change light background color to dark slate blue (Bug#6693). === modified file 'lisp/bindings.el' --- lisp/bindings.el 2011-06-11 09:50:37 +0000 +++ lisp/bindings.el 2011-07-04 20:45:22 +0000 @@ -806,6 +806,8 @@ (define-key map [up] 'previous-history-element) (define-key map "\es" 'next-matching-history-element) (define-key map "\er" 'previous-matching-history-element) + (define-key map [remap next-buffer] 'ignore) + (define-key map [remap previous-buffer] 'ignore) ;; Override the global binding (which calls indent-relative via ;; indent-for-tab-command). The alignment that indent-relative tries to ;; do doesn't make much sense here since the prompt messes it up. ------------------------------------------------------------ revno: 104951 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8958 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-07-04 16:08:02 -0400 message: * lisp/pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 20:00:56 +0000 +++ lisp/ChangeLog 2011-07-04 20:08:02 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Stefan Monnier + + * pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el + (bug#8958). + 2011-07-04 Chong Yidong * font-lock.el (font-lock-builtin-face): Change light background === modified file 'lisp/pcmpl-linux.el' --- lisp/pcmpl-linux.el 2011-01-25 04:08:28 +0000 +++ lisp/pcmpl-linux.el 2011-07-04 20:08:02 +0000 @@ -83,6 +83,19 @@ (forward-line))) (pcomplete-uniqify-list points)))) +(defun pcomplete-pare-list (l r) + "Destructively remove from list L all elements matching any in list R. +Test is done using `equal'." + (while (and l (and r (member (car l) r))) + (setq l (cdr l))) + (let ((m l)) + (while m + (while (and (cdr m) + (and r (member (cadr m) r))) + (setcdr m (cddr m))) + (setq m (cdr m)))) + l) + (defun pcmpl-linux-mountable-directories () "Return a list of mountable directory names." (let (points) ------------------------------------------------------------ revno: 104950 fixes bug(s): http://debbugs.gnu.org/6693 committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-07-04 16:00:56 -0400 message: * font-lock.el (font-lock-builtin-face): Change light background color to dark slate blue. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 17:50:55 +0000 +++ lisp/ChangeLog 2011-07-04 20:00:56 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Chong Yidong + + * font-lock.el (font-lock-builtin-face): Change light background + color to dark slate blue (Bug#6693). + 2011-07-04 Wang Diancheng (tiny change) * progmodes/gdb-mi.el (gdb): Use completion-at-point. === modified file 'lisp/ChangeLog.15' --- lisp/ChangeLog.15 2011-04-06 12:18:10 +0000 +++ lisp/ChangeLog.15 2011-07-04 20:00:56 +0000 @@ -8424,7 +8424,7 @@ * dabbrev.el (dabbrev-completion): Fix typo in docstring. -2010-08-08 MON KEY (tiny change) +2010-08-08 MON KEY * emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): Fix typo in docstring (bug#6747). === modified file 'lisp/font-lock.el' --- lisp/font-lock.el 2011-06-01 19:32:04 +0000 +++ lisp/font-lock.el 2011-07-04 20:00:56 +0000 @@ -1904,7 +1904,7 @@ (defface font-lock-builtin-face '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) - (((class color) (min-colors 88) (background light)) (:foreground "MediumOrchid4")) + (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) ------------------------------------------------------------ revno: 104949 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-07-04 14:31:29 -0400 message: * textprop.c (text_property_stickiness): Obey Vtext_property_default_nonsticky. (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky. * w32fns.c (syms_of_w32fns): * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 17:50:12 +0000 +++ src/ChangeLog 2011-07-04 18:31:29 +0000 @@ -1,3 +1,11 @@ +2011-07-04 Stefan Monnier + + * textprop.c (text_property_stickiness): + Obey Vtext_property_default_nonsticky. + (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky. + * w32fns.c (syms_of_w32fns): + * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default. + 2011-07-04 Paul Eggert * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR. === modified file 'src/textprop.c' --- src/textprop.c 2011-06-24 21:25:22 +0000 +++ src/textprop.c 2011-07-04 18:31:29 +0000 @@ -1707,10 +1707,14 @@ { Lisp_Object prev_pos, front_sticky; int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */ + Lisp_Object defalt = Fassq (prop, Vtext_property_default_nonsticky); if (NILP (buffer)) XSETBUFFER (buffer, current_buffer); + if (CONSP (defalt) && !NILP (XCDR (defalt))) + is_rear_sticky = 0; + if (XINT (pos) > BUF_BEGV (XBUFFER (buffer))) /* Consider previous character. */ { @@ -2230,9 +2234,11 @@ the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil, inherits it if NONSTICKINESS is nil. The `front-sticky' and `rear-nonsticky' properties of the character override NONSTICKINESS. */); - /* Text property `syntax-table' should be nonsticky by default. */ + /* Text properties `syntax-table'and `display' should be nonsticky + by default. */ Vtext_property_default_nonsticky - = Fcons (Fcons (intern_c_string ("syntax-table"), Qt), Qnil); + = Fcons (Fcons (intern_c_string ("syntax-table"), Qt), + Fcons (Fcons (intern_c_string ("display"), Qt), Qnil)); staticpro (&interval_insert_behind_hooks); staticpro (&interval_insert_in_front_hooks); === modified file 'src/w32fns.c' --- src/w32fns.c 2011-06-22 18:15:23 +0000 +++ src/w32fns.c 2011-07-04 18:31:29 +0000 @@ -6805,10 +6805,6 @@ DEFSYM (Qfont_param, "font-parameter"); /* This is the end of symbol initialization. */ - /* Text property `display' should be nonsticky by default. */ - Vtext_property_default_nonsticky - = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); - Fput (Qundefined_color, Qerror_conditions, pure_cons (Qundefined_color, pure_cons (Qerror, Qnil))); === modified file 'src/xfns.c' --- src/xfns.c 2011-06-24 21:25:22 +0000 +++ src/xfns.c 2011-07-04 18:31:29 +0000 @@ -5805,10 +5805,6 @@ DEFSYM (Qfont_param, "font-parameter"); /* This is the end of symbol initialization. */ - /* Text property `display' should be nonsticky by default. */ - Vtext_property_default_nonsticky - = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); - Fput (Qundefined_color, Qerror_conditions, pure_cons (Qundefined_color, pure_cons (Qerror, Qnil))); Fput (Qundefined_color, Qerror_message, ------------------------------------------------------------ revno: 104948 author: Wang Diancheng committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-07-04 13:50:55 -0400 message: * lisp/progmodes/gdb-mi.el (gdb): Use completion-at-point. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 16:08:16 +0000 +++ lisp/ChangeLog 2011-07-04 17:50:55 +0000 @@ -1,3 +1,7 @@ +2011-07-04 Wang Diancheng (tiny change) + + * progmodes/gdb-mi.el (gdb): Use completion-at-point. + 2011-07-04 Stefan Monnier * files.el (find-file): Use pop-to-buffer-same-window (bug#8911). === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-05-23 17:57:17 +0000 +++ lisp/progmodes/gdb-mi.el 2011-07-04 17:50:55 +0000 @@ -786,7 +786,10 @@ (define-key gud-minor-mode-map [left-margin C-mouse-3] 'gdb-mouse-jump) - (local-set-key "\C-i" 'gud-gdb-complete-command) + (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point + nil 'local) + (local-set-key "\C-i" 'completion-at-point) + (setq gdb-first-prompt t) (setq gud-running nil) ------------------------------------------------------------ revno: 104947 committer: Paul Eggert branch nick: trunk timestamp: Mon 2011-07-04 10:50:12 -0700 message: * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR. This is more efficient than Ffile_directory_p and avoids a minor race. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 15:32:22 +0000 +++ src/ChangeLog 2011-07-04 17:50:12 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Paul Eggert + + * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR. + This is more efficient than Ffile_directory_p and avoids a minor race. + 2011-07-04 Lars Magne Ingebrigtsen * buffer.c (Foverlay_put): Say what the return value is === modified file 'src/fileio.c' --- src/fileio.c 2011-07-04 14:34:31 +0000 +++ src/fileio.c 2011-07-04 17:50:12 +0000 @@ -1755,7 +1755,7 @@ regardless of what access permissions it has. */ if (lstat (SSDATA (encoded_filename), &statbuf) >= 0) { - if (Ffile_directory_p (absname)) + if (S_ISDIR (statbuf.st_mode)) xsignal2 (Qfile_error, build_string ("File is a directory"), absname); ------------------------------------------------------------ revno: 104946 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8911 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-07-04 12:08:16 -0400 message: * lisp/files.el (find-file): Use pop-to-buffer-same-window. * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): Add switch-to-buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 12:15:16 +0000 +++ lisp/ChangeLog 2011-07-04 16:08:16 +0000 @@ -1,3 +1,9 @@ +2011-07-04 Stefan Monnier + + * files.el (find-file): Use pop-to-buffer-same-window (bug#8911). + * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): + Add switch-to-buffer. + 2011-07-04 Lars Magne Ingebrigtsen * isearch.el (isearch-search-fun-function): Clarify further the @@ -28,7 +34,7 @@ 2011-07-04 Lars Magne Ingebrigtsen - * play/animate.el (animation-buffer-name): Renamed from *animate*. + * play/animate.el (animation-buffer-name): Rename from *animate*. 2011-07-04 Paul Eggert @@ -61,7 +67,7 @@ 2011-07-03 Chong Yidong * frame.el (frame-background-mode, frame-set-background-mode): - Moved from faces.el. + Move from faces.el. (frame-default-terminal-background): New function. * custom.el (custom-push-theme): Don't record faces in `changed' @@ -71,7 +77,7 @@ 2011-07-03 Lars Magne Ingebrigtsen - * dired.el (dired-flagging-regexp): Removed unused variable + * dired.el (dired-flagging-regexp): Remove unused variable (bug#8769). 2011-03-29 Kevin Ryde @@ -158,8 +164,8 @@ * info-look.el (info-lookup-add-help): Clarify that ARGS is a list of keyword/argument pairs (bug#6904). - * replace.el (multi-occur): Mention - `multi-occur-in-matching-buffers' in the doc string (bug#7566). + * replace.el (multi-occur): + Mention `multi-occur-in-matching-buffers' in the doc string (bug#7566). 2011-07-02 Drew Adams === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2011-06-21 01:43:56 +0000 +++ lisp/emacs-lisp/bytecomp.el 2011-07-04 16:08:16 +0000 @@ -355,7 +355,7 @@ (defvar byte-compile-interactive-only-functions '(beginning-of-buffer end-of-buffer replace-string replace-regexp insert-file insert-buffer insert-file-literally previous-line next-line - goto-line comint-run delete-backward-char) + goto-line comint-run delete-backward-char switch-to-buffer) "List of commands that are not meant to be called from Lisp.") (defvar byte-compile-not-obsolete-vars nil === modified file 'lisp/files.el' --- lisp/files.el 2011-07-03 01:48:07 +0000 +++ lisp/files.el 2011-07-04 16:08:16 +0000 @@ -1341,8 +1341,8 @@ (confirm-nonexistent-file-or-buffer))) (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) - (mapcar 'switch-to-buffer (nreverse value)) - (switch-to-buffer value)))) + (mapcar #'pop-to-buffer-same-window (nreverse value)) + (pop-to-buffer-same-window value)))) (defun find-file-other-window (filename &optional wildcards) "Edit file FILENAME, in another window. ------------------------------------------------------------ revno: 104945 fixes bug(s): http://debbugs.gnu.org/8092 author: Darren Hoo committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 17:36:38 +0200 message: * semantic/db.el (semanticdb-file-table-object): Don't bug out on unconfigured projects if `global-ede-mode' is on. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2011-07-01 00:24:48 +0000 +++ lisp/cedet/ChangeLog 2011-07-04 15:36:38 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Darren Hoo (tiny change) + + * semantic/db.el (semanticdb-file-table-object): Don't bug out on + unconfigured projects if `global-ede-mode' is on (bug#8092). + 2011-07-01 Paul Eggert * semantic.el (semantic-elapsed-time): Rewrite using === modified file 'lisp/cedet/semantic/db.el' --- lisp/cedet/semantic/db.el 2011-01-25 04:08:28 +0000 +++ lisp/cedet/semantic/db.el 2011-07-04 15:36:38 +0000 @@ -880,7 +880,7 @@ then load the tags for FILE, and create a new table object for it. DONTLOAD does not affect the creation of new database objects." ;; (message "Object Translate: %s" file) - (when (file-exists-p file) + (when (and file (file-exists-p file)) (let* ((default-directory (file-name-directory file)) (tab (semanticdb-file-table-object-from-hash file)) (fullfile nil)) ------------------------------------------------------------ revno: 104944 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 17:32:22 +0200 message: * buffer.c (Foverlay_put): Say what the return value is (bug#7835). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 14:34:31 +0000 +++ src/ChangeLog 2011-07-04 15:32:22 +0000 @@ -1,5 +1,8 @@ 2011-07-04 Lars Magne Ingebrigtsen + * buffer.c (Foverlay_put): Say what the return value is + (bug#7835). + * fileio.c (barf_or_query_if_file_exists): Check first if the file is a directory before asking whether to use the file name (bug#7564). === modified file 'src/buffer.c' --- src/buffer.c 2011-07-02 10:36:48 +0000 +++ src/buffer.c 2011-07-04 15:32:22 +0000 @@ -4056,7 +4056,8 @@ } DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0, - doc: /* Set one property of overlay OVERLAY: give property PROP value VALUE. */) + doc: /* Set one property of overlay OVERLAY: give property PROP value VALUE. +VALUE will be returned.*/) (Lisp_Object overlay, Lisp_Object prop, Lisp_Object value) { Lisp_Object tail, buffer; ------------------------------------------------------------ revno: 104943 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 16:34:31 +0200 message: (barf_or_query_if_file_exists): Make the "File is a directory" error be more correct. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 13:44:52 +0000 +++ src/ChangeLog 2011-07-04 14:34:31 +0000 @@ -3,6 +3,8 @@ * fileio.c (barf_or_query_if_file_exists): Check first if the file is a directory before asking whether to use the file name (bug#7564). + (barf_or_query_if_file_exists): Make the "File is a directory" + error be more correct. * fns.c (Frequire): Remove the mention of the .gz files, since that's installation-specific, but keep the mention of === modified file 'src/fileio.c' --- src/fileio.c 2011-07-04 13:44:52 +0000 +++ src/fileio.c 2011-07-04 14:34:31 +0000 @@ -1757,7 +1757,7 @@ { if (Ffile_directory_p (absname)) xsignal2 (Qfile_error, - build_string ("File name is a directory"), absname); + build_string ("File is a directory"), absname); if (! interactive) xsignal2 (Qfile_already_exists, ------------------------------------------------------------ revno: 104942 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 15:44:52 +0200 message: * fileio.c (barf_or_query_if_file_exists): Check first if the file is a directory before asking whether to use the file name (bug#7564). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 12:22:39 +0000 +++ src/ChangeLog 2011-07-04 13:44:52 +0000 @@ -1,5 +1,9 @@ 2011-07-04 Lars Magne Ingebrigtsen + * fileio.c (barf_or_query_if_file_exists): Check first if the file + is a directory before asking whether to use the file name + (bug#7564). + * fns.c (Frequire): Remove the mention of the .gz files, since that's installation-specific, but keep the mention of `get-load-suffixes'. === modified file 'src/fileio.c' --- src/fileio.c 2011-06-24 21:25:22 +0000 +++ src/fileio.c 2011-07-04 13:44:52 +0000 @@ -1755,6 +1755,10 @@ regardless of what access permissions it has. */ if (lstat (SSDATA (encoded_filename), &statbuf) >= 0) { + if (Ffile_directory_p (absname)) + xsignal2 (Qfile_error, + build_string ("File name is a directory"), absname); + if (! interactive) xsignal2 (Qfile_already_exists, build_string ("File already exists"), absname); ------------------------------------------------------------ revno: 104941 fixes bug(s): http://debbugs.gnu.org/5563 author: Vivek Dasmohapatra committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 15:23:04 +0200 message: * erc.el (erc-generate-new-buffer-name): Reuse old buffer names when reconnecting. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2011-06-23 00:17:41 +0000 +++ lisp/erc/ChangeLog 2011-07-04 13:23:04 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Vivek Dasmohapatra + + * erc.el (erc-generate-new-buffer-name): Reuse old buffer names + when reconnecting (bug#5563). + 2011-06-23 Lars Magne Ingebrigtsen * erc.el (erc-ssl): Made into a synonym for erc-tls, which === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2011-07-01 01:29:04 +0000 +++ lisp/erc/erc.el 2011-07-04 13:23:04 +0000 @@ -1555,26 +1555,33 @@ (defun erc-generate-new-buffer-name (server port target &optional proc) "Create a new buffer name based on the arguments." (when (numberp port) (setq port (number-to-string port))) - (let* ((buf-name (or target - (or (let ((name (concat server ":" port))) - (when (> (length name) 1) - name)) - ; This fallback should in fact never happen - "*erc-server-buffer*")))) + (let ((buf-name (or target + (or (let ((name (concat server ":" port))) + (when (> (length name) 1) + name)) + ;; This fallback should in fact never happen + "*erc-server-buffer*"))) + buffer-name) ;; Reuse existing buffers, but not if the buffer is a connected server ;; buffer and not if its associated with a different server than the ;; current ERC buffer. - (if (and erc-reuse-buffers - (get-buffer buf-name) - (or target - (with-current-buffer (get-buffer buf-name) - (and (erc-server-buffer-p) - (not (erc-server-process-alive))))) - (with-current-buffer (get-buffer buf-name) - (and (string= erc-session-server server) - (erc-port-equal erc-session-port port)))) - buf-name - (generate-new-buffer-name buf-name)))) + ;; if buf-name is taken by a different connection (or by something !erc) + ;; then see if "buf-name/server" meets the same criteria + (dolist (candidate (list buf-name (concat buf-name "/" server))) + (if (and (not buffer-name) + erc-reuse-buffers + (get-buffer candidate) + (or target + (with-current-buffer (get-buffer candidate) + (and (erc-server-buffer-p) + (not (erc-server-process-alive))))) + (with-current-buffer (get-buffer candidate) + (and (string= erc-session-server server) + (erc-port-equal erc-session-port port)))) + (setq buffer-name candidate))) + ;; if buffer-name is unset, neither candidate worked out for us, + ;; fallback to the old uniquification method: + (or buffer-name (generate-new-buffer-name buf-name)) )) (defun erc-get-buffer-create (server port target &optional proc) "Create a new buffer based on the arguments." ------------------------------------------------------------ revno: 104940 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-07-04 13:11:52 +0000 message: nnimap.el (nnimap-request-scan): Say that splitting has finished. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-07-04 06:40:46 +0000 +++ lisp/gnus/ChangeLog 2011-07-04 13:11:52 +0000 @@ -1,3 +1,7 @@ +2011-07-04 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-request-scan): Say that splitting has finished. + 2011-07-04 Katsumi Yamaoka * nndraft.el: Require gnus-group. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-06-30 10:04:56 +0000 +++ lisp/gnus/nnimap.el 2011-07-04 13:11:52 +0000 @@ -956,7 +956,8 @@ nnimap-inbox nnimap-split-methods) (nnheader-message 7 "nnimap %s splitting mail..." server) - (nnimap-split-incoming-mail))) + (nnimap-split-incoming-mail) + (nnheader-message 7 "nnimap %s splitting mail...done" server))) (defun nnimap-marks-to-flags (marks) (let (flags flag) ------------------------------------------------------------ revno: 104939 committer: Michael Albinus branch nick: trunk timestamp: Mon 2011-07-04 14:31:55 +0200 message: * tramp.texi (Cleanup remote connections): Add `tramp-cleanup-this-connection'. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-07-04 00:33:48 +0000 +++ doc/misc/ChangeLog 2011-07-04 12:31:55 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Michael Albinus + + * tramp.texi (Cleanup remote connections): Add + `tramp-cleanup-this-connection'. + 2011-07-03 Lars Magne Ingebrigtsen * gnus.texi (Subscription Methods): Link to "Group Levels" to explain === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2011-06-12 19:23:29 +0000 +++ doc/misc/tramp.texi 2011-07-04 12:31:55 +0000 @@ -2680,6 +2680,12 @@ connection buffers. @end deffn +@deffn Command tramp-cleanup-this-connection +This command flushes all objects of the current buffer's remote +connection. The same objects are removed as in +@code{tramp-cleanup-connection}. +@end deffn + @deffn Command tramp-cleanup-all-connections This command flushes objects for all active remote connections. The same objects are removed as in @code{tramp-cleanup-connection}. ------------------------------------------------------------ revno: 104938 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 14:22:39 +0200 message: * fns.c (Frequire): Remove the mention of the .gz files, since that's installation-specific, but keep the mention of `get-load-suffixes'. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 07:44:38 +0000 +++ src/ChangeLog 2011-07-04 12:22:39 +0000 @@ -1,3 +1,9 @@ +2011-07-04 Lars Magne Ingebrigtsen + + * fns.c (Frequire): Remove the mention of the .gz files, since + that's installation-specific, but keep the mention of + `get-load-suffixes'. + 2011-07-04 Paul Eggert * editfns.c (Fformat_time_string): Don't assume strlen fits in int. === modified file 'src/fns.c' --- src/fns.c 2011-07-02 14:34:45 +0000 +++ src/fns.c 2011-07-04 12:22:39 +0000 @@ -2613,8 +2613,7 @@ If FILENAME is omitted, the printname of FEATURE is used as the file name, and `load' will try to load this name appended with the suffix `.elc' or `.el', in that order. The name without appended suffix will not be used. -If your system supports it, `.elc.gz' and `.el.gz' files will also be -considered. See `get-load-suffixes' for the complete list of suffixes. +See `get-load-suffixes' for the complete list of suffixes. If the optional third argument NOERROR is non-nil, then return nil if the file is not found instead of signaling an error. Normally the return value is FEATURE. ------------------------------------------------------------ revno: 104937 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 14:15:16 +0200 message: * isearch.el (isearch-search-fun-function): Clarify further the meaning of the function returned. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 12:12:38 +0000 +++ lisp/ChangeLog 2011-07-04 12:15:16 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Lars Magne Ingebrigtsen + + * isearch.el (isearch-search-fun-function): Clarify further the + meaning of the function returned. + 2011-07-04 Michael Albinus * net/tramp-cmds.el (tramp-cleanup-this-connection): New command. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2011-07-03 20:02:14 +0000 +++ lisp/isearch.el 2011-07-04 12:15:16 +0000 @@ -2227,9 +2227,12 @@ (defvar isearch-search-fun-function nil "Overrides the default `isearch-search-fun' behaviour. -This variable should be a function, which will be called with no -arguments, and should return a function that takes the same three -arguments as `isearch-search-string' requires.") +This variable's value should be a function, which will be called +with no arguments, and should return a function that takes three +arguments: STRING, BOUND, and NOERROR. + +This returned function will be used by `isearch-search-string' to +search for the first occurrence of STRING or its translation.") (defun isearch-search-fun () "Return the function to use for the search. ------------------------------------------------------------ revno: 104936 committer: Michael Albinus branch nick: trunk timestamp: Mon 2011-07-04 14:12:38 +0200 message: * net/tramp-cmds.el (tramp-cleanup-this-connection): New command. * net/tramp-sh.el (tramp-color-escape-sequence-regexp): New defconst. (tramp-sh-handle-insert-directory, tramp-convert-file-attributes): Use it. (tramp-remote-path): Add "/bin" and "/usr/bin". On busyboxes, `tramp-default-remote-path' does not exist. (tramp-send-command-and-read): New optional argument NOERROR. (tramp-open-connection-setup-interactive-shell) (tramp-get-remote-path, tramp-get-remote-stat): Use it. (tramp-get-remote-readlink): Do not mask with `ignore-errors'. (tramp-process-sentinel): Flush also process' connection property. (tramp-sh-handle-start-file-process): Do not set process sentinel. It is done now ... (tramp-maybe-open-connection): ... here. (Bug#8929) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 11:44:36 +0000 +++ lisp/ChangeLog 2011-07-04 12:12:38 +0000 @@ -1,3 +1,21 @@ +2011-07-04 Michael Albinus + + * net/tramp-cmds.el (tramp-cleanup-this-connection): New command. + + * net/tramp-sh.el (tramp-color-escape-sequence-regexp): New defconst. + (tramp-sh-handle-insert-directory, tramp-convert-file-attributes): + Use it. + (tramp-remote-path): Add "/bin" and "/usr/bin". On busyboxes, + `tramp-default-remote-path' does not exist. + (tramp-send-command-and-read): New optional argument NOERROR. + (tramp-open-connection-setup-interactive-shell) + (tramp-get-remote-path, tramp-get-remote-stat): Use it. + (tramp-get-remote-readlink): Do not mask with `ignore-errors'. + (tramp-process-sentinel): Flush also process' connection property. + (tramp-sh-handle-start-file-process): Do not set process + sentinel. It is done now ... + (tramp-maybe-open-connection): ... here. (Bug#8929) + 2011-07-04 MON KEY * play/animate.el (animate-string): Doc fixes and allow changing === modified file 'lisp/net/tramp-cmds.el' --- lisp/net/tramp-cmds.el 2011-05-23 17:57:17 +0000 +++ lisp/net/tramp-cmds.el 2011-07-04 12:12:38 +0000 @@ -100,6 +100,15 @@ (when (bufferp buf) (kill-buffer buf))))) ;;;###tramp-autoload +(defun tramp-cleanup-this-connection () + "Flush all connection related objects of the current buffer's connection." + (interactive) + (and (stringp default-directory) + (file-remote-p default-directory) + (tramp-cleanup-connection + (tramp-dissect-file-name default-directory 'noexpand)))) + +;;;###tramp-autoload (defun tramp-cleanup-all-connections () "Flush all Tramp internal objects. This includes password cache, file cache, connection cache, buffers." === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2011-07-01 09:14:31 +0000 +++ lisp/net/tramp-sh.el 2011-07-04 12:12:38 +0000 @@ -66,6 +66,9 @@ :group 'tramp :type 'string) +(defconst tramp-color-escape-sequence-regexp "\e[[;0-9]+m" + "Escape sequences produced by the \"ls\" command.") + ;; ksh on OpenBSD 4.5 requires that $PS1 contains a `#' character for ;; root users. It uses the `$' character for other users. In order ;; to guarantee a proper prompt, we use "#$ " for the prompt. @@ -484,7 +487,7 @@ ;; FreeBSD: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"! ;; IRIX64: /usr/bin (defcustom tramp-remote-path - '(tramp-default-remote-path "/usr/sbin" "/usr/local/bin" + '(tramp-default-remote-path "/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin") "*List of directories to search for executables on remote host. @@ -2582,6 +2585,12 @@ (forward-line 1) (delete-region (match-beginning 0) (point))) + ;; Some busyboxes are reluctant to discard colors. + (unless (string-match "color" (tramp-get-connection-property v "ls" "")) + (goto-char beg) + (while (re-search-forward tramp-color-escape-sequence-regexp nil t) + (replace-match ""))) + ;; The inserted file could be from somewhere else. (when (and (not wildcard) (not full-directory-p)) (goto-char (point-max)) @@ -2669,6 +2678,7 @@ (let ((vec (tramp-get-connection-property proc "vector" nil))) (when vec (tramp-message vec 5 "Sentinel called: `%s' `%s'" proc event) + (tramp-flush-connection-property proc) (tramp-flush-directory-property vec ""))))) ;; We use BUFFER also as connection buffer during setup. Because of @@ -2721,9 +2731,7 @@ v 'file-error "pty association is not supported for `%s'" name))))) (let ((p (tramp-get-connection-process v))) - ;; Set sentinel and query flag for this process. - (tramp-set-connection-property p "vector" v) - (set-process-sentinel p 'tramp-process-sentinel) + ;; Set query flag for this process. (tramp-compat-set-process-query-on-exit-flag p t) ;; Return process. p))) @@ -3834,10 +3842,9 @@ (tramp-send-command vec "stty -oxtabs" t)) ;; Set `remote-tty' process property. - (ignore-errors - (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\""))) - (unless (zerop (length tty)) - (tramp-compat-process-put proc 'remote-tty tty)))) + (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 'noerror))) + (unless (zerop (length tty)) + (tramp-compat-process-put proc 'remote-tty tty))) ;; Dump stty settings in the traces. (when (>= tramp-verbose 9) @@ -4300,11 +4307,15 @@ tramp-encoding-command-interactive) (list tramp-encoding-shell)))))) + ;; Set sentinel and query flag. + (tramp-set-connection-property p "vector" vec) + (set-process-sentinel p 'tramp-process-sentinel) + (tramp-compat-set-process-query-on-exit-flag p nil) + (tramp-message vec 6 "%s" (mapconcat 'identity (process-command p) " ")) ;; Check whether process is alive. - (tramp-compat-set-process-query-on-exit-flag p nil) (tramp-barf-if-no-shell-prompt p 60 "Couldn't find local shell prompt %s" tramp-encoding-shell) @@ -4492,9 +4503,10 @@ (unless (tramp-send-command-and-check vec command) (apply 'tramp-error vec 'file-error fmt args))) -(defun tramp-send-command-and-read (vec command) +(defun tramp-send-command-and-read (vec command &optional noerror) "Run COMMAND and return the output, which must be a Lisp expression. -In case there is no valid Lisp expression, it raises an error" +In case there is no valid Lisp expression and NOERROR is nil, it +raises an error." (tramp-barf-unless-okay vec command "`%s' returns with error" command) (with-current-buffer (tramp-get-connection-buffer vec) ;; Read the expression. @@ -4504,16 +4516,21 @@ ;; Error handling. (when (re-search-forward "\\S-" (point-at-eol) t) (error nil))) - (error (tramp-error - vec 'file-error - "`%s' does not return a valid Lisp expression: `%s'" - command (buffer-string)))))) + (error (unless noerror + (tramp-error + vec 'file-error + "`%s' does not return a valid Lisp expression: `%s'" + command (buffer-string))))))) (defun tramp-convert-file-attributes (vec attr) "Convert file-attributes ATTR generated by perl script, stat or ls. Convert file mode bits to string and set virtual device number. Return ATTR." (when attr + ;; Remove color escape sequences from symlink. + (when (stringp (car attr)) + (while (string-match tramp-color-escape-sequence-regexp (car attr)) + (setcar attr (replace-match "" nil nil (car attr))))) ;; Convert last access time. (unless (listp (nth 4 attr)) (setcar (nthcdr 4 attr) @@ -4691,8 +4708,7 @@ (when elt1 (or (tramp-send-command-and-read - vec - "x=`getconf PATH 2>/dev/null` && echo \\\"$x\\\" || echo nil") + vec "echo \\\"`getconf PATH 2>/dev/null`\\\"" 'noerror) ;; Default if "getconf" is not available. (progn (tramp-message @@ -4854,15 +4870,12 @@ (let ((result (tramp-find-executable vec "stat" (tramp-get-remote-path vec))) tmp) - ;; Check whether stat(1) returns usable syntax. %s does not + ;; Check whether stat(1) returns usable syntax. "%s" does not ;; work on older AIX systems. (when result (setq tmp - ;; We don't want to display an error message. - (tramp-compat-with-temp-message (or (current-message) "") - (ignore-errors - (tramp-send-command-and-read - vec (format "%s -c '(\"%%N\" %%s)' /" result))))) + (tramp-send-command-and-read + vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror)) (unless (and (listp tmp) (stringp (car tmp)) (string-match "^./.$" (car tmp)) (integerp (cadr tmp))) @@ -4875,11 +4888,8 @@ (let ((result (tramp-find-executable vec "readlink" (tramp-get-remote-path vec)))) (when (and result - ;; We don't want to display an error message. - (tramp-compat-with-temp-message (or (current-message) "") - (ignore-errors - (tramp-send-command-and-check - vec (format "%s --canonicalize-missing /" result))))) + (tramp-send-command-and-check + vec (format "%s --canonicalize-missing /" result))) result)))) (defun tramp-get-remote-trash (vec) ------------------------------------------------------------ revno: 104935 fixes bug(s): http://debbugs.gnu.org/5417 author: MON KEY committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 13:44:36 +0200 message: * play/animate.el (animate-string): Doc fixes and allow changing the buffer name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 06:31:40 +0000 +++ lisp/ChangeLog 2011-07-04 11:44:36 +0000 @@ -1,3 +1,12 @@ +2011-07-04 MON KEY + + * play/animate.el (animate-string): Doc fixes and allow changing + the buffer name (bug#5417). + +2011-07-04 Lars Magne Ingebrigtsen + + * play/animate.el (animation-buffer-name): Renamed from *animate*. + 2011-07-04 Paul Eggert * emacs-lisp/timer.el: Use time-date fns rather than rolling our own. === modified file 'lisp/play/animate.el' --- lisp/play/animate.el 2011-01-25 04:08:28 +0000 +++ lisp/play/animate.el 2011-07-04 11:44:36 +0000 @@ -89,11 +89,15 @@ (insert-char char 1)) (defvar animate-n-steps 10 - "Number of steps to use `animate-string'.") +"*Number of steps `animate-string' will place a char before its last position.") + +(defvar animation-buffer-name nil + "*String naming the default buffer for animations. +When nil animations dipslayed in the buffer named *Animation*.") ;;;###autoload (defun animate-string (string vpos &optional hpos) - "Display STRING starting at position VPOS, HPOS, using animation. + "Display STRING animations starting at position VPOS, HPOS. The characters start at randomly chosen places, and all slide in parallel to their final positions, passing through `animate-n-steps' positions before the final ones. @@ -138,14 +142,19 @@ ;;;###autoload (defun animate-sequence (list-of-strings space) - "Display strings from LIST-OF-STRING with animation in a new buffer. -Strings will be separated from each other by SPACE lines." + "Display animation strings from LIST-OF-STRING with buffer *Animation*. +Strings will be separated from each other by SPACE lines. + When the variable `animation-buffer-name' is non-nil display +animation in the buffer named by variable's value, creating the +buffer if one does not exist." (let ((vpos (/ (- (window-height) 1 ;; For the mode-line (* (1- (length list-of-strings)) space) (length list-of-strings)) 2))) - (switch-to-buffer (get-buffer-create "*Animation*")) + (switch-to-buffer (get-buffer-create + (or animation-buffer-name + "*Animation*"))) (erase-buffer) (sit-for 0) (while list-of-strings @@ -155,19 +164,25 @@ ;;;###autoload (defun animate-birthday-present (&optional name) - "Display one's birthday present in a new buffer. -You can specify the one's name by NAME; the default value is \"Sarah\"." - (interactive (list (read-string "Name (default Sarah): " - nil nil "Sarah"))) + "Return a birthday present in the buffer *Birthday-Present*. +When optional arg NAME is non-nil or called-interactively, prompt for +NAME of birthday present receiver and return a birthday present in +the buffer *Birthday-Present-for-Name*." + (interactive (list (read-string "Birthday present for: " + nil nil))) ;; Make a suitable buffer to display the birthday present in. - (switch-to-buffer (get-buffer-create (format "*%s*" name))) + (switch-to-buffer (get-buffer-create + (if name + (concat "*A-Present-for-" (capitalize name) "*") + "*Birthday-Present*"))) (erase-buffer) ;; Display the empty buffer. (sit-for 0) - (animate-string "Happy Birthday," 6) - (animate-string (format "%s" name) 7) - + (if name + (animate-string "Happy Birthday," 6) + (animate-string "Happy Birthday" 6)) + (when name (animate-string (format "%s" (capitalize name)) 7)) (sit-for 1) (animate-string "You are my sunshine," 10 30) ------------------------------------------------------------ revno: 104934 committer: Paul Eggert branch nick: trunk timestamp: Mon 2011-07-04 00:44:38 -0700 message: * editfns.c (Fformat_time_string): Don't assume strlen fits in int. Report string overflow if the output is too long. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 02:47:04 +0000 +++ src/ChangeLog 2011-07-04 07:44:38 +0000 @@ -1,3 +1,8 @@ +2011-07-04 Paul Eggert + + * editfns.c (Fformat_time_string): Don't assume strlen fits in int. + Report string overflow if the output is too long. + 2011-07-04 Juanma Barranquero * gnutls.c (Fgnutls_boot): Don't mention :verify-error. === modified file 'src/editfns.c' --- src/editfns.c 2011-07-03 13:02:43 +0000 +++ src/editfns.c 2011-07-04 07:44:38 +0000 @@ -1700,7 +1700,7 @@ (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal) { time_t value; - int size; + ptrdiff_t size; int usec; int ns; struct tm *tm; @@ -1717,7 +1717,9 @@ Vlocale_coding_system, 1); /* This is probably enough. */ - size = SBYTES (format_string) * 6 + 50; + size = SBYTES (format_string); + if (size <= (STRING_BYTES_BOUND - 50) / 6) + size = size * 6 + 50; BLOCK_INPUT; tm = ut ? gmtime (&value) : localtime (&value); @@ -1730,7 +1732,7 @@ while (1) { char *buf = (char *) alloca (size + 1); - int result; + size_t result; buf[0] = '\1'; BLOCK_INPUT; @@ -1749,6 +1751,8 @@ SBYTES (format_string), tm, ut, ns); UNBLOCK_INPUT; + if (STRING_BYTES_BOUND <= result) + string_overflow (); size = result + 1; } } ------------------------------------------------------------ revno: 104933 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-07-04 06:40:46 +0000 message: nndraft.el: Require gnus-group. (nndraft-request-list): Declare. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-07-04 02:19:08 +0000 +++ lisp/gnus/ChangeLog 2011-07-04 06:40:46 +0000 @@ -1,5 +1,8 @@ 2011-07-04 Katsumi Yamaoka + * nndraft.el: Require gnus-group. + (nndraft-request-list): Declare. + * nndraft.el (nndraft-update-unread-articles): Don't show group having no unread article unless it matches gnus-permanently-visible-groups. === modified file 'lisp/gnus/nndraft.el' --- lisp/gnus/nndraft.el 2011-07-04 02:19:08 +0000 +++ lisp/gnus/nndraft.el 2011-07-04 06:40:46 +0000 @@ -24,14 +24,21 @@ ;;; Code: +;; For Emacs <22.2 and XEmacs. +(eval-and-compile + (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) + (require 'nnheader) (require 'nnmail) (require 'gnus-start) +(require 'gnus-group) (require 'nnmh) (require 'nnoo) (require 'mm-util) (eval-when-compile (require 'cl)) +(declare-function nndraft-request-list "nnmh" (&rest args)) + (nnoo-declare nndraft nnmh) ------------------------------------------------------------ revno: 104932 [merge] committer: Paul Eggert branch nick: trunk timestamp: Sun 2011-07-03 23:31:40 -0700 message: Merge: timer.el: Use time-date fns rather than rolling our own. This is simpler and helps future-proof the code. * emacs-lisp/timer.el (timer-until): Use time-subtract and float-time. (timer--time-less-p): Use time-less-p. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 01:06:33 +0000 +++ lisp/ChangeLog 2011-07-04 06:31:40 +0000 @@ -1,3 +1,10 @@ +2011-07-04 Paul Eggert + + * emacs-lisp/timer.el: Use time-date fns rather than rolling our own. + This is simpler and helps future-proof the code. + (timer-until): Use time-subtract and float-time. + (timer--time-less-p): Use time-less-p. + 2011-07-04 Juanma Barranquero * type-break.el (timep): Use the value of `float-time' to avoid a === modified file 'lisp/emacs-lisp/timer.el' --- lisp/emacs-lisp/timer.el 2011-07-01 01:27:40 +0000 +++ lisp/emacs-lisp/timer.el 2011-07-04 06:25:23 +0000 @@ -119,14 +119,7 @@ (defun timer--time-less-p (t1 t2) "Say whether time value T1 is less than time value T2." - ;; FIXME just use time-less-p. - (destructuring-bind (high1 low1 micro1) (timer--time t1) - (destructuring-bind (high2 low2 micro2) (timer--time t2) - (or (< high1 high2) - (and (= high1 high2) - (or (< low1 low2) - (and (= low1 low2) - (< micro1 micro2)))))))) + (time-less-p (timer--time t1) (timer--time t2))) (defun timer-inc-time (timer secs &optional usecs) "Increment the time set in TIMER by SECS seconds and USECS microseconds. @@ -258,10 +251,7 @@ "Calculate number of seconds from when TIMER will run, until TIME. TIMER is a timer, and stands for the time when its next repeat is scheduled. TIME is a time-list." - ;; FIXME: (float-time (time-subtract (timer--time timer) time)) - (let ((high (- (car time) (timer--high-seconds timer))) - (low (- (nth 1 time) (timer--low-seconds timer)))) - (+ low (* high 65536)))) + (float-time (time-subtract time (timer--time timer)))) (defun timer-event-handler (timer) "Call the handler for the timer TIMER. ------------------------------------------------------------ revno: 104931 [merge] committer: Bill Wohler branch nick: trunk timestamp: Sun 2011-07-03 20:11:28 -0700 message: Fix XEmacs compilation warnings and errors in MH-E. * mh-e.el: Just require mh-loaddefs since loading it in an eval-and-compile block causes compilation errors in XEmacs. * mh-acros.el, mh-comp.el, mh-e.el, mh-folder.el, mh-letter.el: * mh-mime.el, mh-search.el, mh-seq.el: Shush XEmacs compiler in mh-do-in-xemacs block. * mh-compat.el (mh-window-full-height-p): Add compatibility function for XEmacs. * mh-show.el (mh-show-msg): Use it, and avoid compiler warning on XEmacs. * mh-letter.el (mh-letter-mode-map, mh-letter-complete) (mh-complete-word): Remove FIXME comments since these functions are still needed in other Emacsen. However, they can probably stand to be generalized like completion-at-point. (mh-letter-complete-or-space): Remove unused variable. * mh-compat.el (mh-test-completion): Add compatibility function for XEmacs. * mh-alias.el (mh-alias-letter-expand-alias): Use it, and avoid compiler warning on XEmacs. * mh-utils.el: * mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block. * mh-folder.el: Use boundp instead of fboundp when testing existence of desktop-buffer-mode-handlers. diff: === modified file 'lisp/mh-e/ChangeLog' --- lisp/mh-e/ChangeLog 2011-05-12 16:30:17 +0000 +++ lisp/mh-e/ChangeLog 2011-07-04 02:53:16 +0000 @@ -1,3 +1,36 @@ +2011-07-04 Bill Wohler + + * mh-e.el: Just require mh-loaddefs since loading it in an + eval-and-compile block causes compilation errors in XEmacs. + + * mh-acros.el, mh-comp.el, mh-e.el, mh-folder.el, mh-letter.el: + * mh-mime.el, mh-search.el, mh-seq.el: Shush XEmacs compiler in + mh-do-in-xemacs block. + + * mh-compat.el (mh-window-full-height-p): Add compatibility + function for XEmacs. + * mh-show.el (mh-show-msg): Use it, and avoid compiler warning on + XEmacs. + + * mh-letter.el (mh-letter-mode-map, mh-letter-complete) + (mh-complete-word): Remove FIXME comments since these functions + are still needed in other Emacsen. However, they can probably + stand to be generalized like completion-at-point. + (mh-letter-complete-or-space): Remove unused variable. + +2011-07-03 Bill Wohler + + * mh-compat.el (mh-test-completion): Add compatibility function + for XEmacs. + * mh-alias.el (mh-alias-letter-expand-alias): Use it, and avoid + compiler warning on XEmacs. + + * mh-utils.el: + * mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block. + + * mh-folder.el: Use boundp instead of fboundp when testing + existence of desktop-buffer-mode-handlers. + 2011-05-10 Jim Meyering Fix doubled-word typos. === modified file 'lisp/mh-e/mh-acros.el' --- lisp/mh-e/mh-acros.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-acros.el 2011-07-04 02:17:42 +0000 @@ -132,9 +132,10 @@ (boundp 'mark-active) mark-active)))) ;; Shush compiler. -(defvar struct) ; XEmacs -(defvar x) ; XEmacs -(defvar y) ; XEmacs +(mh-do-in-xemacs + (defvar struct) + (defvar x) + (defvar y)) ;;;###mh-autoload (defmacro mh-defstruct (name-spec &rest fields) === modified file 'lisp/mh-e/mh-alias.el' --- lisp/mh-e/mh-alias.el 2011-05-23 17:57:17 +0000 +++ lisp/mh-e/mh-alias.el 2011-07-03 22:27:19 +0000 @@ -316,8 +316,7 @@ res) res))) ((t) (all-completions string mh-alias-alist pred)) - ((lambda) (if (fboundp 'test-completion) - (test-completion string mh-alias-alist pred)))))))))) + ((lambda) (mh-test-completion string mh-alias-alist pred))))))))) ;;; Alias File Updating === modified file 'lisp/mh-e/mh-comp.el' --- lisp/mh-e/mh-comp.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-comp.el 2011-07-04 02:17:42 +0000 @@ -223,7 +223,8 @@ (setq other-headers (cdr other-headers))))) ;; Shush compiler. -(defvar sendmail-coding-system) ; XEmacs +(mh-do-in-xemacs + (defvar sendmail-coding-system)) ;;;###autoload (defun mh-send-letter (&optional arg) === modified file 'lisp/mh-e/mh-compat.el' --- lisp/mh-e/mh-compat.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-compat.el 2011-07-04 00:27:22 +0000 @@ -122,6 +122,16 @@ "XEmacs does not have `font-lock-add-keywords'. This function returns nil on that system.") +(defun-mh mh-window-full-height-p + window-full-height-p (&optional WINDOW) + "Return non-nil if WINDOW is not the result of a vertical split. +This function is defined in XEmacs as it lacks +`window-full-height-p'. The values of the functions +`window-height' and `frame-height' are compared instead. The +argument WINDOW is ignored." + (= (1+ (window-height)) + (frame-height))) + (defun-mh mh-image-load-path-for-library image-load-path-for-library (library image &optional path no-error) "Return a suitable search path for images used by LIBRARY. @@ -260,6 +270,12 @@ `replace-in-string' are ignored." (replace-in-string string regexp rep literal)) +(defun-mh mh-test-completion + test-completion (string collection &optional predicate) + "Return non-nil if STRING is a valid completion. +XEmacs does not have `test-completion'. This function returns nil +on that system." nil) + ;; Copy of constant from url-util.el in Emacs 22; needed by Emacs 21. (if (not (boundp 'url-unreserved-chars)) (defconst mh-url-unreserved-chars === modified file 'lisp/mh-e/mh-e.el' --- lisp/mh-e/mh-e.el 2011-05-23 17:57:17 +0000 +++ lisp/mh-e/mh-e.el 2011-07-04 02:53:16 +0000 @@ -90,10 +90,7 @@ ;; Provide functions to the rest of MH-E. However, mh-e.el must not ;; use any definitions in files that require mh-e from mh-loaddefs, ;; for if it does it will introduce a require loop. -(eval-and-compile - ;; Load it during compilation as well, since it defines the macro - ;; mh-require-cl. - (load "mh-loaddefs" nil 'nomessage)) +(require 'mh-loaddefs) (mh-require-cl) @@ -616,7 +613,8 @@ (mh-exchange-point-and-mark-preserving-active-mark)) ;; Shush compiler. -(defvar mark-active) ; XEmacs +(mh-do-in-xemacs + (defvar mark-active)) (defun mh-exchange-point-and-mark-preserving-active-mark () "Put the mark where point is now, and point where the mark is now. === modified file 'lisp/mh-e/mh-folder.el' --- lisp/mh-e/mh-folder.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-folder.el 2011-07-04 02:17:42 +0000 @@ -77,7 +77,7 @@ ;;; Desktop Integration ;; desktop-buffer-mode-handlers appeared in Emacs 22. -(if (fboundp 'desktop-buffer-mode-handlers) +(if (boundp 'desktop-buffer-mode-handlers) (add-to-list 'desktop-buffer-mode-handlers '(mh-folder-mode . mh-restore-desktop-buffer))) @@ -526,7 +526,8 @@ ;; Shush compiler. (defvar desktop-save-buffer) (defvar font-lock-auto-fontify) -(defvar font-lock-defaults) ; XEmacs +(mh-do-in-xemacs + (defvar font-lock-defaults)) ;; Ensure new buffers won't get this mode if default major-mode is nil. (put 'mh-folder-mode 'mode-class 'special) === modified file 'lisp/mh-e/mh-letter.el' --- lisp/mh-e/mh-letter.el 2011-04-28 15:32:28 +0000 +++ lisp/mh-e/mh-letter.el 2011-07-04 02:17:42 +0000 @@ -185,7 +185,7 @@ "\C-c\C-w" mh-check-whom "\C-c\C-y" mh-yank-cur-msg "\C-c\M-d" mh-insert-auto-fields - "\M-\t" mh-letter-complete ;; FIXME: completion-at-point + "\M-\t" mh-letter-complete "\t" mh-letter-next-header-field-or-indent [backtab] mh-letter-previous-header-field) @@ -273,7 +273,8 @@ ;;; MH-Letter Mode ;; Shush compiler. -(defvar font-lock-defaults) ; XEmacs +(mh-do-in-xemacs + (defvar font-lock-defaults)) ;; Ensure new buffers won't get this mode if default major-mode is nil. (put 'mh-letter-mode 'mode-class 'special) @@ -502,10 +503,13 @@ (or (funcall func) #'ignore) mh-letter-complete-function))) -(defalias 'mh-letter-complete - (if (fboundp 'completion-at-point) #'completion-at-point - (lambda () - "Perform completion on header field or word preceding point. +;; TODO Now that completion-at-point performs the task of +;; mh-letter-complete, perhaps mh-letter-complete along with +;; mh-complete-word should be rewritten as a more general function for +;; XEmacs, renamed to mh-completion-at-point, and moved to +;; mh-compat.el. +(defun-mh mh-letter-complete completion-at-point () + "Perform completion on header field or word preceding point. If the field contains addresses (for example, \"To:\" or \"Cc:\") or folders (for example, \"Fcc:\") then this command will provide @@ -521,7 +525,7 @@ (end (nth 1 data)) (table (nth 2 data))) (mh-complete-word (buffer-substring-no-properties start end) - table start end)))))))) + table start end)))))) (defun mh-letter-complete-or-space (arg) "Perform completion or insert space. @@ -531,8 +535,7 @@ space is inserted; use a prefix argument ARG to specify more than one space." (interactive "p") - (let ((func nil) - (end-of-prev (save-excursion + (let ((end-of-prev (save-excursion (goto-char (mh-beginning-of-word)) (mh-beginning-of-word -1)))) (cond ((not mh-compose-space-does-completion-flag) @@ -889,7 +892,6 @@ ;;;###mh-autoload (defun mh-complete-word (word choices begin end) - ;; FIXME: Only needed when completion-at-point doesn't exist. "Complete WORD from CHOICES. Any match found replaces the text from BEGIN to END." (let ((completion (try-completion word choices)) === modified file 'lisp/mh-e/mh-mime.el' --- lisp/mh-e/mh-mime.el 2011-05-23 17:57:17 +0000 +++ lisp/mh-e/mh-mime.el 2011-07-04 02:17:42 +0000 @@ -835,7 +835,7 @@ ;;; Button Display ;; Shush compiler. -(when (featurep 'xemacs) +(mh-do-in-xemacs (defvar dots) (defvar type) (defvar ov)) @@ -885,7 +885,8 @@ ;; Shush compiler. (defvar mm-verify-function-alist) ; < Emacs 22 (defvar mm-decrypt-function-alist) ; < Emacs 22 -(defvar pressed-details) ; XEmacs +(mh-do-in-xemacs + (defvar pressed-details)) (defun mh-insert-mime-security-button (handle) "Display buttons for PGP message, HANDLE." === modified file 'lisp/mh-e/mh-search.el' --- lisp/mh-e/mh-search.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-search.el 2011-07-04 02:17:42 +0000 @@ -321,7 +321,8 @@ count (> (hash-table-count msg-hash) 0))))))) ;; Shush compiler. -(defvar pick-folder) ; XEmacs +(mh-do-in-xemacs + (defvar pick-folder)) (defun mh-search-folder (folder window-config) "Search FOLDER for messages matching a pattern. @@ -401,8 +402,9 @@ (mh-index-sequenced-messages folders mh-tick-seq)) ;; Shush compiler. -(defvar mh-mairix-folder) ; XEmacs -(defvar mh-flists-search-folders) ; XEmacs +(mh-do-in-xemacs + (defvar mh-mairix-folder) + (defvar mh-flists-search-folders)) ;;;###mh-autoload (defun mh-index-sequenced-messages (folders sequence) @@ -1442,7 +1444,8 @@ mh-index-data) ;; Shush compiler -(defvar mh-speed-flists-inhibit-flag) ; XEmacs +(mh-do-in-xemacs + (defvar mh-speed-flists-inhibit-flag)) ;;;###mh-autoload (defun mh-index-execute-commands () === modified file 'lisp/mh-e/mh-seq.el' --- lisp/mh-e/mh-seq.el 2011-01-25 04:08:28 +0000 +++ lisp/mh-e/mh-seq.el 2011-07-04 02:17:42 +0000 @@ -198,7 +198,8 @@ " ")))) ;; Shush compiler. -(defvar tool-bar-mode) ; XEmacs +(mh-do-in-xemacs + (defvar tool-bar-mode)) (defvar tool-bar-map) ;;;###mh-autoload === modified file 'lisp/mh-e/mh-show.el' --- lisp/mh-e/mh-show.el 2011-01-26 08:36:39 +0000 +++ lisp/mh-e/mh-show.el 2011-07-04 00:35:48 +0000 @@ -146,9 +146,7 @@ (if (not clean-message-header) (mh-start-of-uncleaned-message))) (mh-display-msg msg folder))) - (unless (if (fboundp 'window-full-height-p) - (window-full-height-p) - (= (1+ (window-height)) (frame-height))) ; not vertically split + (unless (mh-window-full-height-p) ; not vertically split (shrink-window (- (window-height) (or mh-summary-height (mh-summary-height))))) (mh-recenter nil) === modified file 'lisp/mh-e/mh-utils.el' --- lisp/mh-e/mh-utils.el 2011-04-28 15:32:28 +0000 +++ lisp/mh-e/mh-utils.el 2011-07-03 21:30:28 +0000 @@ -732,8 +732,9 @@ (t (file-directory-p path)))))))) ;; Shush compiler. -(defvar completion-root-regexp) ; XEmacs -(defvar minibuffer-completing-file-name) ; XEmacs +(mh-do-in-xemacs + (defvar completion-root-regexp) + (defvar minibuffer-completing-file-name)) (defun mh-folder-completing-read (prompt default allow-root-folder-flag) "Read folder name with PROMPT and default result DEFAULT. ------------------------------------------------------------ revno: 104930 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2011-07-04 04:47:04 +0200 message: src/gnutls.c: Remove bogus references to :verify-error. * gnutls.c (Fgnutls_boot): Don't mention :verify-error. (syms_of_gnutls): Remove duplicate DEFSYM for Qgnutls_bootprop_verify_hostname_error, an error for Qgnutls_bootprop_verify_error (which is no longer used). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-04 02:14:42 +0000 +++ src/ChangeLog 2011-07-04 02:47:04 +0000 @@ -1,5 +1,10 @@ 2011-07-04 Juanma Barranquero + * gnutls.c (Fgnutls_boot): Don't mention :verify-error. + (syms_of_gnutls): Remove duplicate DEFSYM for + Qgnutls_bootprop_verify_hostname_error, an error for + Qgnutls_bootprop_verify_error (which is no longer used). + * eval.c (find_handler_clause): Remove parameters `sig' and `data', unused since revno:102982 (2011-01-26). All callers changed. Also (re)move comments that are misplaced or no longer relevant. === modified file 'src/gnutls.c' --- src/gnutls.c 2011-06-28 16:03:59 +0000 +++ src/gnutls.c 2011-07-04 02:47:04 +0000 @@ -638,9 +638,6 @@ :verify-flags is a bitset as per GnuTLS' gnutls_certificate_set_verify_flags. -:verify-error, if non-nil, makes failure of the certificate validation -an error. Otherwise it will be just a series of warnings. - :verify-hostname-error, if non-nil, makes a hostname mismatch an error. Otherwise it will be just a warning. @@ -1100,36 +1097,35 @@ { gnutls_global_initialized = 0; - DEFSYM(Qgnutls_dll, "gnutls"); - DEFSYM(Qgnutls_log_level, "gnutls-log-level"); - DEFSYM(Qgnutls_code, "gnutls-code"); - DEFSYM(Qgnutls_anon, "gnutls-anon"); - DEFSYM(Qgnutls_x509pki, "gnutls-x509pki"); - DEFSYM(Qgnutls_bootprop_hostname, ":hostname"); - DEFSYM(Qgnutls_bootprop_priority, ":priority"); - DEFSYM(Qgnutls_bootprop_trustfiles, ":trustfiles"); - DEFSYM(Qgnutls_bootprop_keylist, ":keylist"); - DEFSYM(Qgnutls_bootprop_crlfiles, ":crlfiles"); - DEFSYM(Qgnutls_bootprop_callbacks, ":callbacks"); - DEFSYM(Qgnutls_bootprop_callbacks_verify, "verify"); - DEFSYM(Qgnutls_bootprop_loglevel, ":loglevel"); - DEFSYM(Qgnutls_bootprop_verify_flags, ":verify-flags"); - DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-error"); - DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error"); + DEFSYM (Qgnutls_dll, "gnutls"); + DEFSYM (Qgnutls_log_level, "gnutls-log-level"); + DEFSYM (Qgnutls_code, "gnutls-code"); + DEFSYM (Qgnutls_anon, "gnutls-anon"); + DEFSYM (Qgnutls_x509pki, "gnutls-x509pki"); + DEFSYM (Qgnutls_bootprop_hostname, ":hostname"); + DEFSYM (Qgnutls_bootprop_priority, ":priority"); + DEFSYM (Qgnutls_bootprop_trustfiles, ":trustfiles"); + DEFSYM (Qgnutls_bootprop_keylist, ":keylist"); + DEFSYM (Qgnutls_bootprop_crlfiles, ":crlfiles"); + DEFSYM (Qgnutls_bootprop_callbacks, ":callbacks"); + DEFSYM (Qgnutls_bootprop_callbacks_verify, "verify"); + DEFSYM (Qgnutls_bootprop_loglevel, ":loglevel"); + DEFSYM (Qgnutls_bootprop_verify_flags, ":verify-flags"); + DEFSYM (Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error"); - DEFSYM(Qgnutls_e_interrupted, "gnutls-e-interrupted"); + DEFSYM (Qgnutls_e_interrupted, "gnutls-e-interrupted"); Fput (Qgnutls_e_interrupted, Qgnutls_code, make_number (GNUTLS_E_INTERRUPTED)); - DEFSYM(Qgnutls_e_again, "gnutls-e-again"); + DEFSYM (Qgnutls_e_again, "gnutls-e-again"); Fput (Qgnutls_e_again, Qgnutls_code, make_number (GNUTLS_E_AGAIN)); - DEFSYM(Qgnutls_e_invalid_session, "gnutls-e-invalid-session"); + DEFSYM (Qgnutls_e_invalid_session, "gnutls-e-invalid-session"); Fput (Qgnutls_e_invalid_session, Qgnutls_code, make_number (GNUTLS_E_INVALID_SESSION)); - DEFSYM(Qgnutls_e_not_ready_for_handshake, "gnutls-e-not-ready-for-handshake"); + DEFSYM (Qgnutls_e_not_ready_for_handshake, "gnutls-e-not-ready-for-handshake"); Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code, make_number (GNUTLS_E_APPLICATION_ERROR_MIN)); ------------------------------------------------------------ revno: 104929 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-07-04 02:19:08 +0000 message: nndraft.el (nndraft-update-unread-articles): Don't show group having no unread article unless it matches gnus-permanently-visible-groups. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-07-04 01:14:10 +0000 +++ lisp/gnus/ChangeLog 2011-07-04 02:19:08 +0000 @@ -1,5 +1,8 @@ 2011-07-04 Katsumi Yamaoka + * nndraft.el (nndraft-update-unread-articles): Don't show group having + no unread article unless it matches gnus-permanently-visible-groups. + * nndraft.el (nndraft-update-unread-articles): New function. (nndraft-request-associate-buffer): Use it to update the number of unread articles for the nndraft groups in the group buffer when saving === modified file 'lisp/gnus/nndraft.el' --- lisp/gnus/nndraft.el 2011-07-04 01:14:10 +0000 +++ lisp/gnus/nndraft.el 2011-07-04 02:19:08 +0000 @@ -165,11 +165,20 @@ "Update groups' unread articles in the group buffer." (nndraft-request-list) (with-current-buffer gnus-group-buffer - (let ((gnus-group-marked - (mapcar (lambda (elem) - (gnus-group-prefixed-name (car elem) (list 'nndraft ""))) - (nnmail-get-active)))) - (gnus-group-get-new-news-this-group nil t)))) + (let* ((groups (mapcar (lambda (elem) + (gnus-group-prefixed-name (car elem) + (list 'nndraft ""))) + (nnmail-get-active))) + (gnus-group-marked (copy-sequence groups)) + (inhibit-read-only t)) + (gnus-group-get-new-news-this-group nil t) + (dolist (group groups) + (unless (and gnus-permanently-visible-groups + (string-match gnus-permanently-visible-groups + group)) + (gnus-group-goto-group group) + (when (zerop (gnus-group-group-unread)) + (gnus-delete-line))))))) (deffoo nndraft-request-associate-buffer (group) "Associate the current buffer with some article in the draft group." ------------------------------------------------------------ revno: 104928 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2011-07-04 04:14:42 +0200 message: src/eval.c (find_handler_clause): Remove unused parameters. * eval.c (find_handler_clause): Remove parameters `sig' and `data', unused since revno:102982 (2011-01-26). All callers changed. Also (re)move comments that are misplaced or no longer relevant. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-03 23:21:45 +0000 +++ src/ChangeLog 2011-07-04 02:14:42 +0000 @@ -1,3 +1,9 @@ +2011-07-04 Juanma Barranquero + + * eval.c (find_handler_clause): Remove parameters `sig' and `data', + unused since revno:102982 (2011-01-26). All callers changed. + Also (re)move comments that are misplaced or no longer relevant. + 2011-07-03 Lars Magne Ingebrigtsen * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813). === modified file 'src/eval.c' --- src/eval.c 2011-07-01 05:12:00 +0000 +++ src/eval.c 2011-07-04 02:14:42 +0000 @@ -1640,8 +1640,7 @@ } -static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object, - Lisp_Object, Lisp_Object); +static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object); static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data); @@ -1717,8 +1716,7 @@ for (h = handlerlist; h; h = h->next) { - clause = find_handler_clause (h->handler, conditions, - error_symbol, data); + clause = find_handler_clause (h->handler, conditions); if (!NILP (clause)) break; } @@ -1889,8 +1887,10 @@ } /* Call the debugger if calling it is currently enabled for CONDITIONS. - SIG and DATA describe the signal, as in find_handler_clause. */ - + SIG and DATA describe the signal. There are two ways to pass them: + = SIG is the error symbol, and DATA is the rest of the data. + = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA). + This is for memory-full errors only. */ static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) { @@ -1917,19 +1917,8 @@ return 0; } -/* Value of Qlambda means we have called debugger and user has continued. - There are two ways to pass SIG and DATA: - = SIG is the error symbol, and DATA is the rest of the data. - = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA). - This is for memory-full errors only. - - We need to increase max_specpdl_size temporarily around - anything we do that can push on the specpdl, so as not to get - a second error here in case we're handling specpdl overflow. */ - static Lisp_Object -find_handler_clause (Lisp_Object handlers, Lisp_Object conditions, - Lisp_Object sig, Lisp_Object data) +find_handler_clause (Lisp_Object handlers, Lisp_Object conditions) { register Lisp_Object h; ------------------------------------------------------------ revno: 104927 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-07-04 01:14:10 +0000 message: nndraft.el (nndraft-update-unread-articles): New function. (nndraft-request-associate-buffer): Use it to update the number of unread articles for the nndraft groups in the group buffer when saving or killing a draft message. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-07-03 22:17:49 +0000 +++ lisp/gnus/ChangeLog 2011-07-04 01:14:10 +0000 @@ -1,3 +1,10 @@ +2011-07-04 Katsumi Yamaoka + + * nndraft.el (nndraft-update-unread-articles): New function. + (nndraft-request-associate-buffer): Use it to update the number of + unread articles for the nndraft groups in the group buffer when saving + or killing a draft message. + 2011-07-03 Lars Magne Ingebrigtsen * gnus-group.el (gnus-read-ephemeral-bug-group): Bind the coding === modified file 'lisp/gnus/nndraft.el' --- lisp/gnus/nndraft.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/nndraft.el 2011-07-04 01:14:10 +0000 @@ -161,6 +161,16 @@ (message-headers-to-generate nndraft-required-headers message-draft-headers nil)))) +(defun nndraft-update-unread-articles () + "Update groups' unread articles in the group buffer." + (nndraft-request-list) + (with-current-buffer gnus-group-buffer + (let ((gnus-group-marked + (mapcar (lambda (elem) + (gnus-group-prefixed-name (car elem) (list 'nndraft ""))) + (nnmail-get-active)))) + (gnus-group-get-new-news-this-group nil t)))) + (deffoo nndraft-request-associate-buffer (group) "Associate the current buffer with some article in the draft group." (nndraft-open-server "") @@ -182,6 +192,10 @@ 'write-contents-hooks))) (gnus-make-local-hook hook) (add-hook hook 'nndraft-generate-headers nil t)) + (gnus-make-local-hook 'after-save-hook) + (add-hook 'after-save-hook 'nndraft-update-unread-articles nil t) + (message-add-action '(nndraft-update-unread-articles) + 'exit 'postpone 'kill) article)) (deffoo nndraft-request-group (group &optional server dont-check info) ------------------------------------------------------------ revno: 104926 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2011-07-04 03:06:33 +0200 message: lisp/type-break.el (timep): Avoid a byte-compiler warning. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-04 01:04:29 +0000 +++ lisp/ChangeLog 2011-07-04 01:06:33 +0000 @@ -1,5 +1,8 @@ 2011-07-04 Juanma Barranquero + * type-break.el (timep): Use the value of `float-time' to avoid a + byte-compiler warning. + * server.el (server-eval-and-print): Return any result, even nil. 2011-07-03 Paul Eggert === modified file 'lisp/type-break.el' --- lisp/type-break.el 2011-07-03 23:51:42 +0000 +++ lisp/type-break.el 2011-07-04 01:06:33 +0000 @@ -502,7 +502,7 @@ "If TIME is in the format returned by `current-time' then return TIME, else return nil." (condition-case nil - (progn (float-time time) time) + (and (float-time time) time) (error nil))) (defun type-break-choose-file () ------------------------------------------------------------ revno: 104925 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2011-07-04 03:04:29 +0200 message: lisp/server.el (server-eval-and-print): Return any result, even nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 23:51:42 +0000 +++ lisp/ChangeLog 2011-07-04 01:04:29 +0000 @@ -1,3 +1,7 @@ +2011-07-04 Juanma Barranquero + + * server.el (server-eval-and-print): Return any result, even nil. + 2011-07-03 Paul Eggert * type-break.el: Accept time formats that the builtins accept. @@ -42,7 +46,7 @@ * isearch.el (isearch-search-fun-function): Clarify the doc string (bug#8101). -2011-07-03 Richard Kim (tiny change) +2011-07-03 Richard Kim (tiny change) * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert unnecessary spaces (bug#8987). @@ -508,7 +512,7 @@ (ses-cell-symbol): Set macro as safe, so that it can be used in formulas. - * ses.el: Update cycle detection algorithm. + * ses.el: Update cycle detection algorithm. (ses-localvars): Add ses--Dijkstra-attempt-nb and ses--Dijkstra-weight-bound, and initial values thereof when applicable. (ses-set-localvars): New function. === modified file 'lisp/server.el' --- lisp/server.el 2011-06-25 18:05:48 +0000 +++ lisp/server.el 2011-07-04 01:04:29 +0000 @@ -679,7 +679,7 @@ (defun server-eval-and-print (expr proc) "Eval EXPR and send the result back to client PROC." (let ((v (eval (car (read-from-string expr))))) - (when (and v proc) + (when proc (with-temp-buffer (let ((standard-output (current-buffer))) (pp v) @@ -1200,12 +1200,12 @@ (add-to-history 'file-name-history filen) (if (null obuf) (progn - (run-hooks 'pre-command-hook) + (run-hooks 'pre-command-hook) (set-buffer (find-file-noselect filen))) (set-buffer obuf) ;; separately for each file, in sync with post-command hooks, ;; with the new buffer current: - (run-hooks 'pre-command-hook) + (run-hooks 'pre-command-hook) (cond ((file-exists-p filen) (when (not (verify-visited-file-modtime obuf)) (revert-buffer t nil))) @@ -1219,7 +1219,7 @@ (server-goto-line-column (cdr file)) (run-hooks 'server-visit-hook) ;; hooks may be specific to current buffer: - (run-hooks 'post-command-hook)) + (run-hooks 'post-command-hook)) (unless nowait ;; When the buffer is killed, inform the clients. (add-hook 'kill-buffer-hook 'server-kill-buffer nil t) ------------------------------------------------------------ revno: 104924 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-07-04 00:33:48 +0000 message: gnus.texi (Checking New Groups): Moved the reference to the right place. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-07-03 22:17:49 +0000 +++ doc/misc/ChangeLog 2011-07-04 00:33:48 +0000 @@ -3,6 +3,7 @@ * gnus.texi (Subscription Methods): Link to "Group Levels" to explain zombies. (Checking New Groups): Ditto (bug#8974). + (Checking New Groups): Moved the reference to the right place. 2011-07-03 Dave Abrahams (tiny change) === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-07-03 22:17:49 +0000 +++ doc/misc/gnus.texi 2011-07-04 00:33:48 +0000 @@ -1168,12 +1168,12 @@ @subsection Checking New Groups Gnus normally determines whether a group is new or not by comparing -the list of groups (@pxref{Group Levels}) from the active file(s) with -the lists of subscribed and dead groups. This isn't a particularly -fast method. If @code{gnus-check-new-newsgroups} is -@code{ask-server}, Gnus will ask the server for new groups since the -last time. This is both faster and cheaper. This also means that you -can get rid of the list of killed groups altogether, so you may set +the list of groups from the active file(s) with the lists of +subscribed and dead groups. This isn't a particularly fast method. +If @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will +ask the server for new groups since the last time. This is both +faster and cheaper. This also means that you can get rid of the list +of killed groups (@pxref{Group Levels}) altogether, so you may set @code{gnus-save-killed-list} to @code{nil}, which will save time both at startup, at exit, and all over. Saves disk space, too. Why isn't this the default, then? Unfortunately, not all servers support this ------------------------------------------------------------ revno: 104923 committer: Paul Eggert branch nick: trunk timestamp: Sun 2011-07-03 16:51:42 -0700 message: * type-break.el: Accept time formats that the builtins accept. (timep, type-break-time-difference): Accept any format that float-time accepts, rather than insisting on (HIGH LOW USECS) format. This is simpler and helps future-proof the code. (type-break-time-difference): Round rather than ignoring subseconds components. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 22:43:50 +0000 +++ lisp/ChangeLog 2011-07-03 23:51:42 +0000 @@ -1,3 +1,12 @@ +2011-07-03 Paul Eggert + + * type-break.el: Accept time formats that the builtins accept. + (timep, type-break-time-difference): Accept any format that + float-time accepts, rather than insisting on (HIGH LOW USECS) format. + This is simpler and helps future-proof the code. + (type-break-time-difference): Round rather than ignoring + subseconds components. + 2011-07-03 Lars Magne Ingebrigtsen * info.el (Info-apropos-matches): Make non-interactive, since it === modified file 'lisp/type-break.el' --- lisp/type-break.el 2011-07-01 18:21:09 +0000 +++ lisp/type-break.el 2011-07-03 23:51:42 +0000 @@ -47,7 +47,7 @@ ;; or set the variable of the same name to `t'. ;; This program can truly cons up a storm because of all the calls to -;; `current-time' (which always returns 3 fresh conses). I'm dismayed by +;; `current-time' (which always returns fresh conses). I'm dismayed by ;; this, but I think the health of my hands is far more important than a ;; few pages of virtual memory. @@ -501,12 +501,9 @@ (defun timep (time) "If TIME is in the format returned by `current-time' then return TIME, else return nil." - (and (listp time) - (eq (length time) 3) - (integerp (car time)) - (integerp (nth 1 time)) - (integerp (nth 2 time)) - time)) + (condition-case nil + (progn (float-time time) time) + (error nil))) (defun type-break-choose-file () "Return file to read from." @@ -993,12 +990,8 @@ ;; Compute the difference, in seconds, between a and b, two structures ;; similar to those returned by `current-time'. -;; Use addition rather than logand since that is more robust; the low 16 -;; bits of the seconds might have been incremented, making it more than 16 -;; bits wide. (defun type-break-time-difference (a b) - (+ (lsh (- (car b) (car a)) 16) - (- (car (cdr b)) (car (cdr a))))) + (round (float-time (time-subtract b a)))) ;; Return (in a new list the same in structure to that returned by ;; `current-time') the sum of the arguments. Each argument may be a time ------------------------------------------------------------ revno: 104922 fixes bug(s): http://debbugs.gnu.org/8813 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 01:21:45 +0200 message: * callint.c (Finteractive): Clarify the meaning of "@". diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-03 22:16:07 +0000 +++ src/ChangeLog 2011-07-03 23:21:45 +0000 @@ -1,3 +1,7 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813). + 2011-07-03 Chong Yidong * xfaces.c (Finternal_merge_in_global_face): Modify the foreground === modified file 'src/callint.c' --- src/callint.c 2011-06-24 21:25:22 +0000 +++ src/callint.c 2011-07-03 23:21:45 +0000 @@ -105,9 +105,10 @@ In addition, if the string begins with `*', an error is signaled if the buffer is read-only. -If the string begins with `@', Emacs searches the key sequence which - invoked the command for its first mouse click (or any other event - which specifies a window). +If `@' appears at the beginning of the string, and if the key sequence + used to invoke the command includes any mouse events, then the window + associated with the first of those events is selected before the + command is run. If the string begins with `^' and `shift-select-mode' is non-nil, Emacs first calls the function `handle-shift-selection'. You may use `@', `*', and `^' together. They are processed in the ------------------------------------------------------------ revno: 104921 fixes bug(s): http://debbugs.gnu.org/8829 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 00:43:50 +0200 message: * info.el (Info-apropos-matches): Make non-interactive, since it doesn't seem to do anything useful as a command. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 22:16:07 +0000 +++ lisp/ChangeLog 2011-07-03 22:43:50 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * info.el (Info-apropos-matches): Make non-interactive, since it + doesn't seem to do anything useful as a command (bug#8829). + 2011-07-03 Chong Yidong * frame.el (frame-background-mode, frame-set-background-mode): === modified file 'lisp/info.el' --- lisp/info.el 2011-06-19 18:42:06 +0000 +++ lisp/info.el 2011-07-03 22:43:50 +0000 @@ -3281,7 +3281,6 @@ "Collect STRING matches from all known Info files on your system. Return a list of matches where each element is in the format \((FILENAME INDEXTEXT NODENAME LINENUMBER))." - (interactive "sIndex apropos: ") (unless (string= string "") (let ((pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^\n]+\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?" (regexp-quote string))) ------------------------------------------------------------ revno: 104920 committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-07-03 22:24:12 +0000 message: auth-source.el (eieio): Fix last commit. diff: === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-07-02 23:53:45 +0000 +++ lisp/gnus/auth-source.el 2011-07-03 22:24:12 +0000 @@ -45,17 +45,7 @@ (require 'assoc) (eval-when-compile (require 'cl)) -(eval-and-compile - (or (ignore-errors (require 'eieio)) - ;; gnus-fallback-lib/ from gnus/lisp/gnus-fallback-lib - (ignore-errors - (let ((load-path (cons (expand-file-name - "gnus-fallback-lib/eieio" - (file-name-directory (locate-library "gnus"))) - load-path))) - (require 'eieio))) - (error - "eieio not found in `load-path' or gnus-fallback-lib/ directory."))) +(require 'eieio) (autoload 'secrets-create-item "secrets") (autoload 'secrets-delete-item "secrets") ------------------------------------------------------------ revno: 104919 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-07-03 22:17:49 +0000 message: Merge changes made in Gnus trunk. gnus.texi (Subscription Methods): Link to "Group Levels" to explain zombies. (Checking New Groups): Ditto (bug#8974). gnus.texi (Startup Files): Clarify that we're talking about numbered backups, and not actual vc (bug#8975). gnus-group.el (gnus-read-ephemeral-bug-group): Bind the coding systems to binary before writing and reading the mbox files. gnus.el (gnus-summary-line-format): Link to the info node for %U instead of trying to list them all (bug#8978). pop3.el (pop3-open-server): Use :end-of-capability. gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Make sure that the id is always a number. gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Hook into debbugs mode, if possible. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-07-03 12:40:59 +0000 +++ doc/misc/ChangeLog 2011-07-03 22:17:49 +0000 @@ -1,3 +1,14 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * gnus.texi (Subscription Methods): Link to "Group Levels" to explain + zombies. + (Checking New Groups): Ditto (bug#8974). + +2011-07-03 Dave Abrahams (tiny change) + + * gnus.texi (Startup Files): Clarify that we're talking about numbered + backups, and not actual vc (bug#8975). + 2011-07-03 Kevin Ryde * cl.texi (For Clauses): @items for hash-values and key-bindings === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-06-26 12:41:14 +0000 +++ doc/misc/gnus.texi 2011-07-03 22:17:49 +0000 @@ -1167,16 +1167,17 @@ @node Checking New Groups @subsection Checking New Groups -Gnus normally determines whether a group is new or not by comparing the -list of groups from the active file(s) with the lists of subscribed and -dead groups. This isn't a particularly fast method. If -@code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the -server for new groups since the last time. This is both faster and -cheaper. This also means that you can get rid of the list of killed -groups altogether, so you may set @code{gnus-save-killed-list} to -@code{nil}, which will save time both at startup, at exit, and all over. -Saves disk space, too. Why isn't this the default, then? -Unfortunately, not all servers support this command. +Gnus normally determines whether a group is new or not by comparing +the list of groups (@pxref{Group Levels}) from the active file(s) with +the lists of subscribed and dead groups. This isn't a particularly +fast method. If @code{gnus-check-new-newsgroups} is +@code{ask-server}, Gnus will ask the server for new groups since the +last time. This is both faster and cheaper. This also means that you +can get rid of the list of killed groups altogether, so you may set +@code{gnus-save-killed-list} to @code{nil}, which will save time both +at startup, at exit, and all over. Saves disk space, too. Why isn't +this the default, then? Unfortunately, not all servers support this +command. I bet I know what you're thinking now: How do I find out whether my server supports @code{ask-server}? No? Good, because I don't have a @@ -1214,9 +1215,10 @@ @item gnus-subscribe-zombies @vindex gnus-subscribe-zombies -Make all new groups zombies. This is the default. You can browse the -zombies later (with @kbd{A z}) and either kill them all off properly -(with @kbd{S z}), or subscribe to them (with @kbd{u}). +Make all new groups zombies (@pxref{Group Levels}). This is the +default. You can browse the zombies later (with @kbd{A z}) and either +kill them all off properly (with @kbd{S z}), or subscribe to them +(with @kbd{u}). @item gnus-subscribe-randomly @vindex gnus-subscribe-randomly @@ -1430,7 +1432,7 @@ The @code{gnus-startup-file} variable says where the startup files are. The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup file being whatever that one is, with a @samp{.eld} appended. -If you want version control for this file, set +If you want to keep multiple numbered backups of this file, set @code{gnus-backup-startup-file}. It respects the same values as the @code{version-control} variable. @@ -2360,6 +2362,7 @@ go back to showing nonempty subscribed groups again. Thus, unsubscribed groups are hidden, in a way. +@cindex zombie groups Zombie and killed groups are similar to unsubscribed groups in that they are hidden by default. But they are different from subscribed and unsubscribed groups in that Gnus doesn't ask the news server for === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-07-03 00:24:28 +0000 +++ lisp/gnus/ChangeLog 2011-07-03 22:17:49 +0000 @@ -1,3 +1,23 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-read-ephemeral-bug-group): Bind the coding + systems to binary before writing and reading the mbox files. + + * gnus.el (gnus-summary-line-format): Link to the info node for %U + instead of trying to list them all (bug#8978). + +2011-07-03 Wolfgang Jenkner (tiny change) + + * pop3.el (pop3-open-server): Use :end-of-capability. + +2011-07-03 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Make sure that + the id is always a number. + + * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Hook into + debbugs mode, if possible. + 2011-07-02 Daiki Ueno * auth-source.el (auth-source-token-passphrase-callback-function): === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2011-07-03 00:24:28 +0000 +++ lisp/gnus/gnus-group.el 2011-07-03 22:17:49 +0000 @@ -2437,7 +2437,9 @@ (cdr (assoc 'emacs gnus-bug-group-download-format-alist)))) (when (stringp number) (setq number (string-to-number number))) - (let ((tmpfile (mm-make-temp-file "gnus-temp-group-"))) + (let ((tmpfile (mm-make-temp-file "gnus-temp-group-")) + (coding-system-for-write 'binary) + (coding-system-for-read 'binary)) (with-temp-file tmpfile (url-insert-file-contents (format mbox-url number)) (goto-char (point-min)) @@ -2466,12 +2468,17 @@ (defun gnus-read-ephemeral-emacs-bug-group (number &optional window-conf) "Browse Emacs bug NUMBER as ephemeral group." - (interactive (list (read-string "Enter bug number: " - (thing-at-point 'word) nil))) + (interactive (list (string-to-number + (read-string "Enter bug number: " + (thing-at-point 'word) nil)))) (gnus-read-ephemeral-bug-group number (cdr (assoc 'emacs gnus-bug-group-download-format-alist)) - window-conf)) + window-conf) + (when (boundp 'debbugs-summary-mode) + (with-current-buffer (window-buffer (selected-window)) + (debbugs-summary-mode 1) + (set (make-local-variable 'debbugs-bug-number) number)))) (defun gnus-group-jump-to-group (group &optional prompt) "Jump to newsgroup GROUP. === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2011-07-03 00:24:28 +0000 +++ lisp/gnus/gnus.el 2011-07-03 22:17:49 +0000 @@ -2966,8 +2966,8 @@ on level one %R \"A\" if this article has been replied to, \" \" otherwise (character) -%U Status of this article (character, \"R\", \"K\", - \"-\" or \" \") +%U \"Read\" status of this article. + See Info node `(gnus)Read Articles' %[ Opening bracket (character, \"[\" or \"<\") %] Closing bracket (character, \"]\" or \">\") %> Spaces of length thread-level (string) === modified file 'lisp/gnus/pop3.el' --- lisp/gnus/pop3.el 2011-05-30 22:11:52 +0000 +++ lisp/gnus/pop3.el 2011-07-03 22:17:49 +0000 @@ -306,7 +306,8 @@ (t (or pop3-stream-type 'network))) :capability-command "CAPA\r\n" - :end-of-command "^\\.\r?\n\\|^\\(-ERR\\|+OK \\).*\n" + :end-of-command "^\\(-ERR\\|+OK \\).*\n" + :end-of-capability "^\\.\r?\n" :success "^\\+OK.*\n" :return-list t :starttls-function ------------------------------------------------------------ revno: 104918 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-07-03 18:16:07 -0400 message: Fix how custom themes handle faces, so the multi-tty/multi-frame case works. * lisp/custom.el (custom-push-theme): Don't record faces in `changed' theme; this doesn't work correctly for per-frame face settings. (disable-theme): Use face-set-after-frame-default to reset faces. (custom--frame-color-default): New function. * lisp/frame.el (frame-background-mode, frame-set-background-mode): Moved from faces.el. (frame-default-terminal-background): New function. * src/xfaces.c (Finternal_merge_in_global_face): Modify the foreground and background color parameters if they have been changed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 22:14:08 +0000 +++ lisp/ChangeLog 2011-07-03 22:16:07 +0000 @@ -1,3 +1,14 @@ +2011-07-03 Chong Yidong + + * frame.el (frame-background-mode, frame-set-background-mode): + Moved from faces.el. + (frame-default-terminal-background): New function. + + * custom.el (custom-push-theme): Don't record faces in `changed' + theme; this doesn't work correctly for per-frame face settings. + (disable-theme): Use face-set-after-frame-default to reset faces. + (custom--frame-color-default): New function. + 2011-07-03 Lars Magne Ingebrigtsen * dired.el (dired-flagging-regexp): Removed unused variable === modified file 'lisp/custom.el' --- lisp/custom.el 2011-07-02 23:52:35 +0000 +++ lisp/custom.el 2011-07-03 22:16:07 +0000 @@ -855,25 +855,18 @@ ;; Add a new setting: (t (unless old - ;; If the user changed the value outside of Customize, we - ;; first save the current value to a fake theme, `changed'. - ;; This ensures that the user-set value comes back if the - ;; theme is later disabled. - (cond ((and (eq prop 'theme-value) - (boundp symbol)) - (let ((sv (get symbol 'standard-value)) - (val (symbol-value symbol))) - (unless (and sv (equal (eval (car sv)) val)) - (setq old `((changed ,(custom-quote val))))))) - ((and (facep symbol) - (not (face-attr-match-p - symbol - (custom-fix-face-spec - (face-spec-choose - (get symbol 'face-defface-spec)))))) - (setq old `((changed - (,(append '(t) (custom-face-attributes-get - symbol nil))))))))) + ;; If the user changed a variable outside of Customize, save + ;; the value to a fake theme, `changed'. If the theme is + ;; later disabled, we use this to bring back the old value. + ;; + ;; For faces, we just use `face-new-frame-defaults' to + ;; recompute when the theme is disabled. + (when (and (eq prop 'theme-value) + (boundp symbol)) + (let ((sv (get symbol 'standard-value)) + (val (symbol-value symbol))) + (unless (and sv (equal (eval (car sv)) val)) + (setq old `((changed ,(custom-quote val)))))))) (put symbol prop (cons (list theme value) old)) (put theme 'theme-settings (cons (list prop symbol theme value) theme-settings)))))) @@ -1356,11 +1349,33 @@ ;; If the face spec specified by this theme is in the ;; saved-face property, reset that property. (when (equal (nth 3 s) (get symbol 'saved-face)) - (put symbol 'saved-face (and val (cadr (car val))))) - (custom-theme-recalc-face symbol))))) + (put symbol 'saved-face (and val (cadr (car val))))))))) + ;; Recompute faces on all frames. + (dolist (frame (frame-list)) + ;; We must reset the fg and bg color frame parameters, or + ;; `face-set-after-frame-default' will use the existing + ;; parameters, which could be from the disabled theme. + (set-frame-parameter frame 'background-color + (custom--frame-color-default + frame :background "background" "Background" + "unspecified-bg" "white")) + (set-frame-parameter frame 'foreground-color + (custom--frame-color-default + frame :foreground "foreground" "Foreground" + "unspecified-fg" "black")) + (face-set-after-frame-default frame)) (setq custom-enabled-themes (delq theme custom-enabled-themes))))) +(defun custom--frame-color-default (frame attribute resource-attr resource-class + tty-default x-default) + (let ((col (face-attribute 'default attribute t))) + (cond + ((and col (not (eq col 'unspecified))) col) + ((null (window-system frame)) tty-default) + ((setq col (x-get-resource resource-attr resource-class)) col) + (t x-default)))) + (defun custom-variable-theme-value (variable) "Return (list VALUE) indicating the custom theme value of VARIABLE. That is to say, it specifies what the value should be according to === modified file 'lisp/faces.el' --- lisp/faces.el 2011-06-27 00:29:55 +0000 +++ lisp/faces.el 2011-07-03 22:16:07 +0000 @@ -1821,109 +1821,6 @@ (cond ((memq 'background-color face) (cdr (memq 'background-color face))) ((memq ':background face) (cadr (memq ':background face))))) (t nil)))) ; Invalid face value. - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Background mode. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(defcustom frame-background-mode nil - "The brightness of the background. -Set this to the symbol `dark' if your background color is dark, -`light' if your background is light, or nil (automatic by default) -if you want Emacs to examine the brightness for you. Don't set this -variable with `setq'; this won't have the expected effect." - :group 'faces - :set #'(lambda (var value) - (set-default var value) - (mapc 'frame-set-background-mode (frame-list))) - :initialize 'custom-initialize-changed - :type '(choice (const dark) - (const light) - (const :tag "automatic" nil))) - - -(declare-function x-get-resource "frame.c" - (attribute class &optional component subclass)) - -(defvar inhibit-frame-set-background-mode nil) - -(defun frame-set-background-mode (frame &optional keep-face-specs) - "Set up display-dependent faces on FRAME. -Display-dependent faces are those which have different definitions -according to the `background-mode' and `display-type' frame parameters. - -If optional arg KEEP-FACE-SPECS is non-nil, don't recalculate -face specs for the new background mode." - (unless inhibit-frame-set-background-mode - (let* ((bg-resource - (and (window-system frame) - (x-get-resource "backgroundMode" "BackgroundMode"))) - (bg-color (frame-parameter frame 'background-color)) - (terminal-bg-mode (terminal-parameter frame 'background-mode)) - (tty-type (tty-type frame)) - (default-bg-mode - (if (or (window-system frame) - (and tty-type - (string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)" - tty-type))) - 'light - 'dark)) - (non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light)) - (bg-mode - (cond (frame-background-mode) - (bg-resource (intern (downcase bg-resource))) - (terminal-bg-mode) - ((equal bg-color "unspecified-fg") ; inverted colors - non-default-bg-mode) - ((not (color-values bg-color frame)) - default-bg-mode) - ((>= (apply '+ (color-values bg-color frame)) - ;; Just looking at the screen, colors whose - ;; values add up to .6 of the white total - ;; still look dark to me. - (* (apply '+ (color-values "white" frame)) .6)) - 'light) - (t 'dark))) - (display-type - (cond ((null (window-system frame)) - (if (tty-display-color-p frame) 'color 'mono)) - ((display-color-p frame) - 'color) - ((x-display-grayscale-p frame) - 'grayscale) - (t 'mono))) - (old-bg-mode - (frame-parameter frame 'background-mode)) - (old-display-type - (frame-parameter frame 'display-type))) - - (unless (and (eq bg-mode old-bg-mode) (eq display-type old-display-type)) - (let ((locally-modified-faces nil) - ;; Prevent face-spec-recalc from calling this function - ;; again, resulting in a loop (bug#911). - (inhibit-frame-set-background-mode t) - (params (list (cons 'background-mode bg-mode) - (cons 'display-type display-type)))) - (if keep-face-specs - (modify-frame-parameters frame params) - ;; If we are recomputing face specs, first collect a list - ;; of faces that don't match their face-specs. These are - ;; the faces modified on FRAME, and we avoid changing them - ;; below. Use a negative list to avoid consing (we assume - ;; most faces are unmodified). - (dolist (face (face-list)) - (and (not (get face 'face-override-spec)) - (not (face-spec-match-p face - (face-user-default-spec face) - (selected-frame))) - (push face locally-modified-faces))) - ;; Now change to the new frame parameters - (modify-frame-parameters frame params) - ;; For all unmodified named faces, choose face specs - ;; matching the new frame parameters. - (dolist (face (face-list)) - (unless (memq face locally-modified-faces) - (face-spec-recalc face frame))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2020,7 +1917,8 @@ Finally, apply any relevant face attributes found amongst the frame parameters in PARAMETERS." (let ((window-system-p (memq (window-system frame) '(x w32)))) - (dolist (face (nreverse (face-list))) ;Why reverse? --Stef + ;; The `reverse' is so that `default' goes first. + (dolist (face (nreverse (face-list))) (condition-case () (progn ;; Initialize faces from face spec and custom theme. === modified file 'lisp/frame.el' --- lisp/frame.el 2011-06-22 07:12:18 +0000 +++ lisp/frame.el 2011-07-03 22:16:07 +0000 @@ -847,6 +847,116 @@ (if frame (select-frame-set-input-focus frame) (error "There is no frame named `%s'" name)))) + + +;;;; Background mode. + +(defcustom frame-background-mode nil + "The brightness of the background. +Set this to the symbol `dark' if your background color is dark, +`light' if your background is light, or nil (automatic by default) +if you want Emacs to examine the brightness for you. Don't set this +variable with `setq'; this won't have the expected effect." + :group 'faces + :set #'(lambda (var value) + (set-default var value) + (mapc 'frame-set-background-mode (frame-list))) + :initialize 'custom-initialize-changed + :type '(choice (const dark) + (const light) + (const :tag "automatic" nil))) + +(declare-function x-get-resource "frame.c" + (attribute class &optional component subclass)) + +(defvar inhibit-frame-set-background-mode nil) + +(defun frame-set-background-mode (frame &optional keep-face-specs) + "Set up display-dependent faces on FRAME. +Display-dependent faces are those which have different definitions +according to the `background-mode' and `display-type' frame parameters. + +If optional arg KEEP-FACE-SPECS is non-nil, don't recalculate +face specs for the new background mode." + (unless inhibit-frame-set-background-mode + (let* ((frame-default-bg-mode (frame-terminal-default-bg-mode frame)) + (bg-color (frame-parameter frame 'background-color)) + (tty-type (tty-type frame)) + (default-bg-mode + (if (or (window-system frame) + (and tty-type + (string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)" + tty-type))) + 'light + 'dark)) + (non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light)) + (bg-mode + (cond (frame-default-bg-mode) + ((equal bg-color "unspecified-fg") ; inverted colors + non-default-bg-mode) + ((not (color-values bg-color frame)) + default-bg-mode) + ((>= (apply '+ (color-values bg-color frame)) + ;; Just looking at the screen, colors whose + ;; values add up to .6 of the white total + ;; still look dark to me. + (* (apply '+ (color-values "white" frame)) .6)) + 'light) + (t 'dark))) + (display-type + (cond ((null (window-system frame)) + (if (tty-display-color-p frame) 'color 'mono)) + ((display-color-p frame) + 'color) + ((x-display-grayscale-p frame) + 'grayscale) + (t 'mono))) + (old-bg-mode + (frame-parameter frame 'background-mode)) + (old-display-type + (frame-parameter frame 'display-type))) + + (unless (and (eq bg-mode old-bg-mode) (eq display-type old-display-type)) + (let ((locally-modified-faces nil) + ;; Prevent face-spec-recalc from calling this function + ;; again, resulting in a loop (bug#911). + (inhibit-frame-set-background-mode t) + (params (list (cons 'background-mode bg-mode) + (cons 'display-type display-type)))) + (if keep-face-specs + (modify-frame-parameters frame params) + ;; If we are recomputing face specs, first collect a list + ;; of faces that don't match their face-specs. These are + ;; the faces modified on FRAME, and we avoid changing them + ;; below. Use a negative list to avoid consing (we assume + ;; most faces are unmodified). + (dolist (face (face-list)) + (and (not (get face 'face-override-spec)) + (not (face-spec-match-p face + (face-user-default-spec face) + (selected-frame))) + (push face locally-modified-faces))) + ;; Now change to the new frame parameters + (modify-frame-parameters frame params) + ;; For all unmodified named faces, choose face specs + ;; matching the new frame parameters. + (dolist (face (face-list)) + (unless (memq face locally-modified-faces) + (face-spec-recalc face frame))))))))) + +(defun frame-terminal-default-bg-mode (frame) + "Return the default background mode of FRAME. +This checks the `frame-background-mode' variable, the X resource +named \"backgroundMode\" (if FRAME is an X frame), and finally +the `background-mode' terminal parameter." + (or frame-background-mode + (let ((bg-resource + (and (window-system frame) + (x-get-resource "backgroundMode" "BackgroundMode")))) + (if bg-resource + (intern (downcase bg-resource)))) + (terminal-parameter frame 'background-mode))) + ;;;; Frame configurations === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-03 13:02:43 +0000 +++ src/ChangeLog 2011-07-03 22:16:07 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Chong Yidong + + * xfaces.c (Finternal_merge_in_global_face): Modify the foreground + and background color parameters if they have been changed. + 2011-07-03 Lars Magne Ingebrigtsen * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659). === modified file 'src/xfaces.c' --- src/xfaces.c 2011-06-24 21:25:22 +0000 +++ src/xfaces.c 2011-07-03 22:16:07 +0000 @@ -3813,6 +3813,18 @@ Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, name), Qnil)); } + + if (STRINGP (gvec[LFACE_FOREGROUND_INDEX])) + Fmodify_frame_parameters (frame, + Fcons (Fcons (Qforeground_color, + gvec[LFACE_FOREGROUND_INDEX]), + Qnil)); + + if (STRINGP (gvec[LFACE_BACKGROUND_INDEX])) + Fmodify_frame_parameters (frame, + Fcons (Fcons (Qbackground_color, + gvec[LFACE_BACKGROUND_INDEX]), + Qnil)); } } ------------------------------------------------------------ revno: 104917 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2011-07-04 00:14:08 +0200 message: * dired.el (dired-flagging-regexp): Removed unused variable (bug#8769). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 21:39:49 +0000 +++ lisp/ChangeLog 2011-07-03 22:14:08 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * dired.el (dired-flagging-regexp): Removed unused variable + (bug#8769). + 2011-03-29 Kevin Ryde * progmodes/compile.el (compilation-error-regexp-alist-alist): === modified file 'lisp/dired.el' --- lisp/dired.el 2011-07-03 13:25:18 +0000 +++ lisp/dired.el 2011-07-03 22:14:08 +0000 @@ -238,8 +238,6 @@ ;; (> baud-rate search-slow-speed) "Non-nil means Dired shrinks the display buffer to fit the marked files.") -(defvar dired-flagging-regexp nil);; Last regexp used to flag files. - (defvar dired-file-version-alist) ;;;###autoload ------------------------------------------------------------ revno: 104916 author: Kevin Ryde committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 23:39:49 +0200 message: * progmodes/compile.el (compilation-error-regexp-alist-alist): `perl-Test2' extend to match possible "fail #N" rep count (bug#8377). diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-07-03 01:05:49 +0000 +++ etc/ChangeLog 2011-07-03 21:39:49 +0000 @@ -1,3 +1,7 @@ +2011-03-29 Kevin Ryde + + * compilation.txt (perl-Test2): New samples. + 2011-07-03 Lars Magne Ingebrigtsen * tutorials/TUTORIAL.zh: Remove spurious ")" character on the === modified file 'etc/compilation.txt' --- etc/compilation.txt 2011-05-09 01:25:35 +0000 +++ etc/compilation.txt 2011-07-03 21:39:49 +0000 @@ -496,6 +496,16 @@ # Failed test 1 in foo.t at line 6 +* Perl Test.pm module error messages comparing two values + +symbol: perl--Test2 + +# Test 3 got: "99" (d-compilation-perl.t at line 29) +# Expected: "88" (my test name) +# d-compilation-perl.t line 29 is: ok(99,88,'my test name'); + +# Test 6 got: "xx" (foo.t at line 33 fail #2) +# Expected: "yy" * Perl Test::Harness output === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 20:09:38 +0000 +++ lisp/ChangeLog 2011-07-03 21:39:49 +0000 @@ -1,3 +1,9 @@ +2011-03-29 Kevin Ryde + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + `perl-Test2' extend to match possible "fail #N" rep count + (bug#8377). + 2011-07-03 Lars Magne Ingebrigtsen * mail/feedmail.el (feedmail-buffer-to-smtpmail): === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-06-21 02:10:10 +0000 +++ lisp/progmodes/compile.el 2011-07-03 21:39:49 +0000 @@ -400,15 +400,16 @@ "^# Failed test [0-9]+ in \\([^ \t\r\n]+\\) at line \\([0-9]+\\)" 1 2) (perl--Test2 - ;; Or when comparing got/want values, + ;; Or when comparing got/want values, with a "fail #n" if repeated ;; # Test 2 got: "xx" (t-compilation-perl-2.t at line 10) + ;; # Test 3 got: "xx" (t-compilation-perl-2.t at line 10 fail #2) ;; ;; And under Test::Harness they're preceded by progress stuff with ;; \r and "NOK", ;; ... NOK 1# Test 1 got: "1234" (t/foo.t at line 46) ;; "^\\(.*NOK.*\\)?# Test [0-9]+ got:.* (\\([^ \t\r\n]+\\) at line \ -\\([0-9]+\\))" +\\([0-9]+\\)\\( fail #[0-9]+\\)?)" 2 3) (perl--Test::Harness ;; perl Test::Harness output, eg. ------------------------------------------------------------ revno: 104915 fixes bug(s): http://debbugs.gnu.org/8349 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 23:33:54 +0200 message: * display.texi (Scrolling): `C-v' (etc) are now bound to `scroll-*-command'. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-07-02 15:43:04 +0000 +++ doc/emacs/ChangeLog 2011-07-03 21:33:54 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * display.texi (Scrolling): `C-v' (etc) are now bound to + `scroll-*-command' (bug#8349). + 2011-07-02 Lars Magne Ingebrigtsen * dired.texi (Subdirectories in Dired): Clarify that `C-u k' === modified file 'doc/emacs/display.texi' --- doc/emacs/display.texi 2011-05-17 02:26:56 +0000 +++ doc/emacs/display.texi 2011-07-03 21:33:54 +0000 @@ -61,11 +61,11 @@ @item C-v @itemx @key{next} @itemx @key{PageDown} -Scroll forward by nearly a full window (@code{scroll-up}). +Scroll forward by nearly a full window (@code{scroll-up-command}). @item M-v @itemx @key{prior} @itemx @key{PageUp} -Scroll backward (@code{scroll-down}). +Scroll backward (@code{scroll-down-command}). @item C-M-l Scroll heuristically to bring useful information onto the screen (@code{reposition-window}). ------------------------------------------------------------ revno: 104914 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 22:09:38 +0200 message: * mail/feedmail.el (feedmail-buffer-to-smtpmail): `smtpmail-via-smtp' now returns the error instead of nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 20:02:14 +0000 +++ lisp/ChangeLog 2011-07-03 20:09:38 +0000 @@ -1,5 +1,8 @@ 2011-07-03 Lars Magne Ingebrigtsen + * mail/feedmail.el (feedmail-buffer-to-smtpmail): + `smtpmail-via-smtp' now returns the error instead of nil. + * isearch.el (isearch-search-fun-function): Clarify the doc string (bug#8101). === modified file 'lisp/mail/feedmail.el' --- lisp/mail/feedmail.el 2011-05-23 17:57:17 +0000 +++ lisp/mail/feedmail.el 2011-07-03 20:09:38 +0000 @@ -1633,22 +1633,21 @@ ;; no evil. (feedmail-say-debug ">in-> feedmail-buffer-to-smtpmail %s" addr-listoid) (require 'smtpmail) - (if (not (smtpmail-via-smtp addr-listoid prepped)) - (progn - (set-buffer errors-to) - (insert "Send via smtpmail failed. Probable SMTP protocol error.\n") - (insert "Look for details below or in the *Messages* buffer.\n\n") - (let ((case-fold-search t) - ;; don't be overconfident about the name of the trace buffer - (tracer (concat "trace.*smtp.*" (regexp-quote smtpmail-smtp-server)))) - (mapcar - (lambda (buffy) - (if (string-match tracer (buffer-name buffy)) - (progn - (insert "SMTP Trace from " (buffer-name buffy) "\n---------------") - (insert-buffer-substring buffy) - (insert "\n\n")))) - (buffer-list)))))) + (let ((result (smtpmail-via-smtp addr-listoid prepped))) + (when result + (set-buffer errors-to) + (insert "Send via smtpmail failed: %s" result) + (let ((case-fold-search t) + ;; don't be overconfident about the name of the trace buffer + (tracer (concat "trace.*smtp.*" (regexp-quote smtpmail-smtp-server)))) + (mapcar + (lambda (buffy) + (if (string-match tracer (buffer-name buffy)) + (progn + (insert "SMTP Trace from " (buffer-name buffy) "\n---------------") + (insert-buffer-substring buffy) + (insert "\n\n")))) + (buffer-list)))))) (declare-function smtp-via-smtp "ext:smtp" (sender recipients smtp-text-buffer)) (defvar smtp-server) ------------------------------------------------------------ revno: 104913 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 22:02:14 +0200 message: * isearch.el (isearch-search-fun-function): Clarify the doc string (bug#8101). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 19:30:01 +0000 +++ lisp/ChangeLog 2011-07-03 20:02:14 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * isearch.el (isearch-search-fun-function): Clarify the doc string + (bug#8101). + 2011-07-03 Richard Kim (tiny change) * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert === modified file 'lisp/isearch.el' --- lisp/isearch.el 2011-05-28 01:26:53 +0000 +++ lisp/isearch.el 2011-07-03 20:02:14 +0000 @@ -2226,10 +2226,10 @@ ;; Searching (defvar isearch-search-fun-function nil - "Override `isearch-search-fun'. -This function should return the search function for Isearch to use. -It will call this function with three arguments -as if it were `search-forward'.") + "Overrides the default `isearch-search-fun' behaviour. +This variable should be a function, which will be called with no +arguments, and should return a function that takes the same three +arguments as `isearch-search-string' requires.") (defun isearch-search-fun () "Return the function to use for the search. ------------------------------------------------------------ revno: 104912 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 21:30:01 +0200 message: Back out last commit since we do not have papers from the actual author. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 19:27:53 +0000 +++ lisp/ChangeLog 2011-07-03 19:30:01 +0000 @@ -1,8 +1,3 @@ -2011-07-03 Juanma Barranquero - - * play/fortune.el (fortune-compile): Make a new fortune dat file - compile time if the dat file does not exist (bug#5338). - 2011-07-03 Richard Kim (tiny change) * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert === modified file 'lisp/play/fortune.el' --- lisp/play/fortune.el 2011-07-03 19:27:53 +0000 +++ lisp/play/fortune.el 2011-07-03 19:30:01 +0000 @@ -244,21 +244,15 @@ (let* ((fortune-file (expand-file-name (substitute-in-file-name file))) (fortune-dat (expand-file-name (substitute-in-file-name - (concat fortune-file fortune-database-extension)))) - (fortune-file-exist (file-exists-p fortune-file)) - (fortune-dat-exist (file-exists-p fortune-dat)) - (fortune-file-newer (file-newer-than-file-p - fortune-file fortune-dat))) - (cond - (fortune-file-exist - (if (or (not fortune-dat-exist) - (and fortune-dat-exist - fortune-file-newer)) - (message "Compiling new fortune database %s" fortune-dat) - (shell-command - (concat fortune-strfile fortune-strfile-options - " " fortune-file fortune-quiet-strfile-options)))) - (t (error "Can't compile fortune file %s" fortune-file))))) + (concat fortune-file fortune-database-extension))))) + (cond ((file-exists-p fortune-file) + (if (file-exists-p fortune-dat) + (cond ((file-newer-than-file-p fortune-file fortune-dat) + (message "Compiling new fortune database %s" fortune-dat) + (shell-command + (concat fortune-strfile fortune-strfile-options + " " fortune-file fortune-quiet-strfile-options)))))) + (t (error "Can't compile fortune file %s" fortune-file))))) ;;; ************** ------------------------------------------------------------ revno: 104911 fixes bug(s): http://debbugs.gnu.org/5338 author: Juanma Barranquero committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 21:27:53 +0200 message: * play/fortune.el (fortune-compile): Make a new fortune dat file compile time if the dat file does not exist. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 16:11:37 +0000 +++ lisp/ChangeLog 2011-07-03 19:27:53 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Juanma Barranquero + + * play/fortune.el (fortune-compile): Make a new fortune dat file + compile time if the dat file does not exist (bug#5338). + 2011-07-03 Richard Kim (tiny change) * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert === modified file 'lisp/play/fortune.el' --- lisp/play/fortune.el 2011-05-23 17:57:17 +0000 +++ lisp/play/fortune.el 2011-07-03 19:27:53 +0000 @@ -244,15 +244,21 @@ (let* ((fortune-file (expand-file-name (substitute-in-file-name file))) (fortune-dat (expand-file-name (substitute-in-file-name - (concat fortune-file fortune-database-extension))))) - (cond ((file-exists-p fortune-file) - (if (file-exists-p fortune-dat) - (cond ((file-newer-than-file-p fortune-file fortune-dat) - (message "Compiling new fortune database %s" fortune-dat) - (shell-command - (concat fortune-strfile fortune-strfile-options - " " fortune-file fortune-quiet-strfile-options)))))) - (t (error "Can't compile fortune file %s" fortune-file))))) + (concat fortune-file fortune-database-extension)))) + (fortune-file-exist (file-exists-p fortune-file)) + (fortune-dat-exist (file-exists-p fortune-dat)) + (fortune-file-newer (file-newer-than-file-p + fortune-file fortune-dat))) + (cond + (fortune-file-exist + (if (or (not fortune-dat-exist) + (and fortune-dat-exist + fortune-file-newer)) + (message "Compiling new fortune database %s" fortune-dat) + (shell-command + (concat fortune-strfile fortune-strfile-options + " " fortune-file fortune-quiet-strfile-options)))) + (t (error "Can't compile fortune file %s" fortune-file))))) ;;; ************** ------------------------------------------------------------ revno: 104910 fixes bug(s): http://debbugs.gnu.org/2499 author: Tobias C. Rittweiler committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 20:44:53 +0200 message: * searching.texi (Match Data): Note that match data can be overwritten by most functions. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-07-03 13:02:43 +0000 +++ doc/lispref/ChangeLog 2011-07-03 18:44:53 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Tobias C. Rittweiler (tiny change) + + * searching.texi (Match Data): Note that match data can be + overwritten by most functions (bug#2499). + 2011-07-03 Lars Magne Ingebrigtsen * strings.texi (Formatting Strings): Clarify what the "-" and "0" === modified file 'doc/lispref/searching.texi' --- doc/lispref/searching.texi 2011-01-25 04:08:28 +0000 +++ doc/lispref/searching.texi 2011-07-03 18:44:53 +0000 @@ -1207,6 +1207,12 @@ can't avoid another intervening search, you must save and restore the match data around it, to prevent it from being overwritten. + Notice that all functions are allowed to overwrite the match data +unless they're explicitly documented not to do so. A consequence is +that functions that are run implictly in the background +(@pxref{Timers}, and @ref{Idle Timers}) should likely save and restore +the match data explicitly. + @menu * Replacing Match:: Replacing a substring that was matched. * Simple Match Data:: Accessing single items of match data, ------------------------------------------------------------ revno: 104909 fixes bug(s): http://debbugs.gnu.org/8987 author: Richard Kim committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 18:11:37 +0200 message: * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert unnecessary spaces. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 13:48:59 +0000 +++ lisp/ChangeLog 2011-07-03 16:11:37 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Richard Kim (tiny change) + + * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert + unnecessary spaces (bug#8987). + 2011-07-03 Lars Magne Ingebrigtsen * net/network-stream.el (open-network-stream): Use the === modified file 'lisp/textmodes/texnfo-upd.el' --- lisp/textmodes/texnfo-upd.el 2011-01-25 04:08:28 +0000 +++ lisp/textmodes/texnfo-upd.el 2011-07-03 16:11:37 +0000 @@ -687,7 +687,7 @@ (insert (format "%s: %s." (car node-part) (cdr node-part))))) ;; Insert the description, if present. - (when (cdr menu) + (when (> (length (cdr menu)) 0) ;; Move to right place. (indent-to texinfo-column-for-description 2) ;; Insert description. ------------------------------------------------------------ revno: 104908 fixes bug(s): http://debbugs.gnu.org/8931 author: Nicolas Avrutin committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 18:03:47 +0200 message: * url-http.el (url-http-create-request): Remove double carriage return and newline. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2011-07-03 13:08:40 +0000 +++ lisp/url/ChangeLog 2011-07-03 16:03:47 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Nicolas Avrutin (tiny change) + + * url-http.el (url-http-create-request): Remove double carriage + return and newline (bug#8931). + 2011-07-03 Lars Magne Ingebrigtsen * url-http.el (url-http-wait-for-headers-change-function): Remove === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2011-07-03 13:08:40 +0000 +++ lisp/url/url-http.el 2011-07-03 16:03:47 +0000 @@ -338,7 +338,7 @@ ;; End request "\r\n" ;; Any data - url-http-data "\r\n")) + url-http-data)) "")) (url-http-debug "Request is: \n%s" request) request)) ------------------------------------------------------------ revno: 104907 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 15:48:59 +0200 message: Add :end-of-capability keyword for use by pop3.el. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 13:25:18 +0000 +++ lisp/ChangeLog 2011-07-03 13:48:59 +0000 @@ -1,5 +1,15 @@ 2011-07-03 Lars Magne Ingebrigtsen + * net/network-stream.el (open-network-stream): Use the + :end-of-capability command thoughout. + +2011-07-03 Wolfgang Jenkner (tiny change) + + * net/network-stream.el (open-network-stream): Add the + :end-of-capability command parameter, used by pop3.el. + +2011-07-03 Lars Magne Ingebrigtsen + * dired.el (dired-map-over-marks): Refill the doc string (bug#6814). * fringe.el (fringe-query-style): Remove redundant text " (type ? === modified file 'lisp/net/network-stream.el' --- lisp/net/network-stream.el 2011-06-27 00:11:22 +0000 +++ lisp/net/network-stream.el 2011-07-03 13:48:59 +0000 @@ -98,6 +98,10 @@ :end-of-command specifies a regexp matching the end of a command. +:end-of-capability specifies a regexp matching the end of the + response to the command specified for :capability-command. + It defaults to the regexp specified for :end-of-command. + :success specifies a regexp matching a message indicating a successful STARTTLS negotiation. For instance, the default should be \"^3\" for an NNTP connection. @@ -203,11 +207,14 @@ (success-string (plist-get parameters :success)) (capability-command (plist-get parameters :capability-command)) (eoc (plist-get parameters :end-of-command)) + (eo-capa (or (plist-get parameters :end-of-capability) + eoc)) ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE) (stream (make-network-process :name name :buffer buffer :host host :service service)) (greeting (network-stream-get-response stream start eoc)) - (capabilities (network-stream-command stream capability-command eoc)) + (capabilities (network-stream-command stream capability-command + eo-capa)) (resulting-type 'plain) (builtin-starttls (and (fboundp 'gnutls-available-p) (gnutls-available-p))) @@ -250,7 +257,7 @@ ;; Requery capabilities for protocols that require it; i.e., ;; EHLO for SMTP. (when (plist-get parameters :always-query-capabilities) - (network-stream-command stream capability-command eoc))) + (network-stream-command stream capability-command eo-capa))) (when (string-match success-string (network-stream-command stream starttls-command eoc)) ;; The server said it was OK to begin STARTTLS negotiations. @@ -271,7 +278,7 @@ (network-stream-get-response stream start eoc))) ;; Re-get the capabilities, which may have now changed. (setq capabilities - (network-stream-command stream capability-command eoc)))) + (network-stream-command stream capability-command eo-capa)))) ;; If TLS is mandatory, close the connection if it's unencrypted. (when (and (or require-tls @@ -353,7 +360,9 @@ ?p service)))))) (list stream (network-stream-get-response stream start eoc) - (network-stream-command stream capability-command eoc) + (network-stream-command stream capability-command + (or (plist-get parameters :end-of-capability) + eoc)) 'plain))) (provide 'network-stream) ------------------------------------------------------------ revno: 104906 fixes bug(s): http://debbugs.gnu.org/6814 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 15:25:18 +0200 message: * dired.el (dired-map-over-marks): Refill the doc string (bug#6814). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-03 02:37:52 +0000 +++ lisp/ChangeLog 2011-07-03 13:25:18 +0000 @@ -1,5 +1,7 @@ 2011-07-03 Lars Magne Ingebrigtsen + * dired.el (dired-map-over-marks): Refill the doc string (bug#6814). + * fringe.el (fringe-query-style): Remove redundant text " (type ? for list)" (bug#6475). === modified file 'lisp/dired.el' --- lisp/dired.el 2011-07-02 13:28:19 +0000 +++ lisp/dired.el 2011-07-03 13:25:18 +0000 @@ -515,24 +515,31 @@ (defmacro dired-map-over-marks (body arg &optional show-progress distinguish-one-marked) "Eval BODY with point on each marked line. Return a list of BODY's results. -If no marked file could be found, execute BODY on the current line. -ARG, if non-nil, specifies the files to use instead of the marked files. - If ARG is an integer, use the next ARG (or previous -ARG, if - ARG<0) files. In that case, point is dragged along. This is - so that commands on the next ARG (instead of the marked) files - can be chained easily. - For any other non-nil value of ARG, use the current file. +If no marked file could be found, execute BODY on the current +line. ARG, if non-nil, specifies the files to use instead of the +marked files. + +If ARG is an integer, use the next ARG (or previous -ARG, if +ARG<0) files. In that case, point is dragged along. This is so +that commands on the next ARG (instead of the marked) files can +be chained easily. +For any other non-nil value of ARG, use the current file. + If optional third arg SHOW-PROGRESS evaluates to non-nil, - redisplay the dired buffer after each file is processed. -No guarantee is made about the position on the marked line. - BODY must ensure this itself if it depends on this. -Search starts at the beginning of the buffer, thus the car of the list - corresponds to the line nearest to the buffer's bottom. This - is also true for (positive and negative) integer values of ARG. +redisplay the dired buffer after each file is processed. + +No guarantee is made about the position on the marked line. BODY +must ensure this itself if it depends on this. + +Search starts at the beginning of the buffer, thus the car of the +list corresponds to the line nearest to the buffer's bottom. +This is also true for (positive and negative) integer values of +ARG. + BODY should not be too long as it is expanded four times. -If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file, -return (t FILENAME) instead of (FILENAME)." +If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one +marked file, return (t FILENAME) instead of (FILENAME)." ;; ;;Warning: BODY must not add new lines before point - this may cause an ;;endless loop. ------------------------------------------------------------ revno: 104905 fixes bug(s): http://debbugs.gnu.org/6735 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 15:08:40 +0200 message: * url-http.el (url-http-wait-for-headers-change-function): Remove pointless "HTTP/0.9 How I hate thee!" message. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2011-06-04 07:53:22 +0000 +++ lisp/url/ChangeLog 2011-07-03 13:08:40 +0000 @@ -1,3 +1,8 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * url-http.el (url-http-wait-for-headers-change-function): Remove + pointless "HTTP/0.9 How I hate thee!" message (bug#6735). + 2011-06-04 Andreas Schwab * url-future.el (url-future-test): Fix scope of `saver'. === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2011-04-16 13:59:54 +0000 +++ lisp/url/url-http.el 2011-07-03 13:08:40 +0000 @@ -1059,19 +1059,16 @@ ;; Haven't seen the end of the headers yet, need to wait ;; for more data to arrive. nil - (if old-http - (message "HTTP/0.9 How I hate thee!") - (progn - (url-http-parse-response) - (mail-narrow-to-head) - ;;(narrow-to-region (point-min) url-http-end-of-headers) - (setq url-http-transfer-encoding (mail-fetch-field - "transfer-encoding") - url-http-content-type (mail-fetch-field "content-type")) - (if (mail-fetch-field "content-length") - (setq url-http-content-length - (string-to-number (mail-fetch-field "content-length")))) - (widen))) + (unless old-http + (url-http-parse-response) + (mail-narrow-to-head) + (setq url-http-transfer-encoding (mail-fetch-field + "transfer-encoding") + url-http-content-type (mail-fetch-field "content-type")) + (if (mail-fetch-field "content-length") + (setq url-http-content-length + (string-to-number (mail-fetch-field "content-length")))) + (widen)) (when url-http-transfer-encoding (setq url-http-transfer-encoding (downcase url-http-transfer-encoding))) ------------------------------------------------------------ revno: 104904 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 15:02:43 +0200 message: Clarify what the "-" and "0" flags mean in the `format' function (bug#6659). diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-07-03 12:33:37 +0000 +++ doc/lispref/ChangeLog 2011-07-03 13:02:43 +0000 @@ -1,5 +1,8 @@ 2011-07-03 Lars Magne Ingebrigtsen + * strings.texi (Formatting Strings): Clarify what the "-" and "0" + flags mean (bug#6659). + * functions.texi (What Is a Function): Document the autoload object (bug#6496). === modified file 'doc/lispref/strings.texi' --- doc/lispref/strings.texi 2011-05-29 22:41:06 +0000 +++ doc/lispref/strings.texi 2011-07-03 13:02:43 +0000 @@ -856,14 +856,16 @@ the @samp{#} flag means include a decimal point even if the precision is zero. + The flag @samp{0} ensures that the padding consists of @samp{0} +characters instead of spaces. This flag is ignored for non-numerical +specification characters like @samp{%s}, @samp{%S} and @samp{%c}. +These specification characters accept the @samp{0} flag, but still pad +with @emph{spaces}. + The flag @samp{-} causes the padding inserted by the width specifier, if any, to be inserted on the right rather than the left. -The flag @samp{0} ensures that the padding consists of @samp{0} -characters instead of spaces, inserted on the left. These flags are -ignored for specification characters for which they do not make sense: -@samp{%s}, @samp{%S} and @samp{%c} accept the @samp{0} flag, but still -pad with @emph{spaces} on the left. If both @samp{-} and @samp{0} are -present and valid, @samp{-} takes precedence. +If both @samp{-} and @samp{0} are present, the @samp{0} flag is +ignored. @example @group === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-03 06:17:19 +0000 +++ src/ChangeLog 2011-07-03 13:02:43 +0000 @@ -1,3 +1,7 @@ +2011-07-03 Lars Magne Ingebrigtsen + + * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659). + 2011-07-03 Paul Eggert * xsettings.c (SYSTEM_FONT): Define only when used. === modified file 'src/editfns.c' --- src/editfns.c 2011-06-24 21:25:22 +0000 +++ src/editfns.c 2011-07-03 13:02:43 +0000 @@ -3557,7 +3557,8 @@ printed representation. The padding, if any, normally goes on the left, but it goes on the right if the - flag is present. The padding character is normally a space, but it is 0 if the 0 flag is present. -The - flag takes precedence over the 0 flag. +The 0 flag is ignored if the - flag is present, or the format sequence +is something other than %d, %e, %f, and %g. For %e, %f, and %g sequences, the number after the "." in the precision specifier says how many decimal places to show; if zero, the ------------------------------------------------------------ revno: 104903 fixes bug(s): http://debbugs.gnu.org/6599 author: Kevin Ryde committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-07-03 14:40:59 +0200 message: * cl.texi (For Clauses): @items for hash-values and key-bindings to make them more visible when skimming. Add examples of `using' clause to them, examples being clearer than a description in words. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-07-01 09:42:55 +0000 +++ doc/misc/ChangeLog 2011-07-03 12:40:59 +0000 @@ -1,3 +1,10 @@ +2011-07-03 Kevin Ryde + + * cl.texi (For Clauses): @items for hash-values and key-bindings + to make them more visible when skimming. Add examples of `using' + clause to them, examples being clearer than a description in + words (bug#6599). + 2011-07-01 Alan Mackenzie * cc-mode.texi (Guessing the Style): New page. === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2011-02-19 19:40:59 +0000 +++ doc/misc/cl.texi 2011-07-03 12:40:59 +0000 @@ -2449,22 +2449,33 @@ or @code{while}. @item for @var{var} being the hash-keys of @var{hash-table} -This clause iterates over the entries in @var{hash-table}. For each -hash table entry, @var{var} is bound to the entry's key. If you write -@samp{the hash-values} instead, @var{var} is bound to the values -of the entries. The clause may be followed by the additional -term @samp{using (hash-values @var{var2})} (where @code{hash-values} -is the opposite word of the word following @code{the}) to cause -@var{var} and @var{var2} to be bound to the two parts of each -hash table entry. +@itemx for @var{var} being the hash-values of @var{hash-table} +This clause iterates over the entries in @var{hash-table} with +@var{var} bound to each key, or value. A @samp{using} clause can bind +a second variable to the opposite part. + +@example +(loop for k being the hash-keys of h + using (hash-values v) + do + (message "key %S -> value %S" k v)) +@end example @item for @var{var} being the key-codes of @var{keymap} +@itemx for @var{var} being the key-bindings of @var{keymap} This clause iterates over the entries in @var{keymap}. The iteration does not enter nested keymaps but does enter inherited (parent) keymaps. -You can use @samp{the key-bindings} to access the commands bound to -the keys rather than the key codes, and you can add a @code{using} -clause to access both the codes and the bindings together. +A @code{using} clause can access both the codes and the bindings +together. + +@example +(loop for c being the key-codes of (current-local-map) + using (key-bindings b) + do + (message "key %S -> binding %S" c b)) +@end example + @item for @var{var} being the key-seqs of @var{keymap} This clause iterates over all key sequences defined by @var{keymap} ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.