Now on revision 108222. ------------------------------------------------------------ revno: 108222 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11431 author: Wolfgang Jenkner committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-05-14 01:19:46 -0400 message: * lisp/image-mode.el: Fit to width/height for rotated images. (image-transform-scale, image-transform-right-angle-fudge): New vars. (image-transform-width, image-transform-fit-width): New functions. (image-transform-properties): Use them. (image-transform-check-size): New function. (image-toggle-display-image): Use it (for testing). (image-transform-set-rotation): Reduce angle mod 360. Delete obsolete comment. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-14 05:15:59 +0000 +++ lisp/ChangeLog 2012-05-14 05:19:46 +0000 @@ -1,5 +1,16 @@ 2012-05-14 Wolfgang Jenkner + * image-mode.el: Fit to width/height for rotated images (bug#11431). + (image-transform-scale, image-transform-right-angle-fudge): New vars. + (image-transform-width, image-transform-fit-width): New functions. + (image-transform-properties): Use them. + (image-transform-check-size): New function. + (image-toggle-display-image): Use it (for testing). + (image-transform-set-rotation): Reduce angle mod 360. + Delete obsolete comment. + +2012-05-14 Wolfgang Jenkner + * image-mode.el: Fix scaling (bug#11399). (image-transform-resize): Doc fix. (image-transform-properties): Default scale is 1 and height should === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2012-05-14 05:15:59 +0000 +++ lisp/image-mode.el 2012-05-14 05:19:46 +0000 @@ -532,6 +532,7 @@ (setq image-type type) (if (eq major-mode 'image-mode) (setq mode-name (format "Image[%s]" type))) + (image-transform-check-size) (if (called-interactively-p 'any) (message "Repeat this command to go back to displaying the file as text")))) @@ -636,9 +637,122 @@ - `fit-width', meaning to fit the image to the window width. - A number, which is a scale factor (the default size is 1).") +(defvar image-transform-scale 1.0 + "The scale factor of the image being displayed.") + (defvar image-transform-rotation 0.0 "Rotation angle for the image in the current Image mode buffer.") +(defvar image-transform-right-angle-fudge 0.0001 + "Snap distance to a multiple of a right angle. +There's no deep theory behind the default value, it should just +be somewhat larger than ImageMagick's MagickEpsilon.") + +(defsubst image-transform-width (width height) + "Return the bounding box width of a rotated WIDTH x HEIGHT rectangle. +The rotation angle is the value of `image-transform-rotation' in degrees." + (let ((angle (degrees-to-radians image-transform-rotation))) + ;; Assume, w.l.o.g., that the vertices of the rectangle have the + ;; coordinates (+-w/2, +-h/2) and that (0, 0) is the center of the + ;; rotation by the angle A. The projections onto the first axis + ;; of the vertices of the rotated rectangle are +- (w/2) cos A +- + ;; (h/2) sin A, and the difference between the largest and the + ;; smallest of the four values is the expression below. + (+ (* width (abs (cos angle))) (* height (abs (sin angle)))))) + +;; The following comment and code snippet are from +;; ImageMagick-6.7.4-4/magick/distort.c + +;; /* Set the output image geometry to calculated 'bestfit'. +;; Yes this tends to 'over do' the file image size, ON PURPOSE! +;; Do not do this for DePolar which needs to be exact for virtual tiling. +;; */ +;; if ( fix_bounds ) { +;; geometry.x = (ssize_t) floor(min.x-0.5); +;; geometry.y = (ssize_t) floor(min.y-0.5); +;; geometry.width=(size_t) ceil(max.x-geometry.x+0.5); +;; geometry.height=(size_t) ceil(max.y-geometry.y+0.5); +;; } + +;; Other parts of the same file show that here the origin is in the +;; left lower corner of the image rectangle, the center of the +;; rotation is the center of the rectangle and min.x and max.x +;; (resp. min.y and max.y) are the smallest and the largest of the +;; projections of the vertices onto the first (resp. second) axis. + +(defun image-transform-fit-width (width height length) + "Return (w . h) so that a rotated w x h image has exactly width LENGTH. +The rotation angle is the value of `image-transform-rotation'. +Write W for WIDTH and H for HEIGHT. Then the w x h rectangle is +an \"approximately uniformly\" scaled W x H rectangle, which +currently means that w is one of floor(s W) + {0, 1, -1} and h is +floor(s H), where s can be recovered as the value of `image-transform-scale'. +The value of `image-transform-rotation' may be replaced by +a slightly different angle. Currently this is done for values +close to a multiple of 90, see `image-transform-right-angle-fudge'." + (cond ((< (abs (- (mod (+ image-transform-rotation 90) 180) 90)) + image-transform-right-angle-fudge) + (assert (not (zerop width)) t) + (setq image-transform-rotation + (float (round image-transform-rotation)) + image-transform-scale (/ (float length) width)) + (cons length nil)) + ((< (abs (- (mod (+ image-transform-rotation 45) 90) 45)) + image-transform-right-angle-fudge) + (assert (not (zerop height)) t) + (setq image-transform-rotation + (float (round image-transform-rotation)) + image-transform-scale (/ (float length) height)) + (cons nil length)) + (t + (assert (not (and (zerop width) (zerop height))) t) + (setq image-transform-scale + (/ (float (1- length)) (image-transform-width width height))) + ;; Assume we have a w x h image and an angle A, and let l = + ;; l(w, h) = w |cos A| + h |sin A|, which is the actual width + ;; of the bounding box of the rotated image, as calculated by + ;; `image-transform-width'. The code snippet quoted above + ;; means that ImageMagick puts the rotated image in + ;; a bounding box of width L = 2 ceil((w+l+1)/2) - w. + ;; Elementary considerations show that this is equivalent to + ;; L - w being even and L-3 < l(w, h) <= L-1. In our case, L is + ;; the given `length' parameter and our job is to determine + ;; reasonable values for w and h which satisfy these + ;; conditions. + (let ((w (floor (* image-transform-scale width))) + (h (floor (* image-transform-scale height)))) + ;; Let w and h as bound above. Then l(w, h) <= l(s W, s H) + ;; = L-1 < l(w+1, h+1) = l(w, h) + l(1, 1) <= l(w, h) + 2, + ;; hence l(w, h) > (L-1) - 2 = L-3. + (cons + (cond ((= (mod w 2) (mod length 2)) + w) + ;; l(w+1, h) >= l(w, h) > L-3, but does l(w+1, h) <= + ;; L-1 hold? + ((<= (image-transform-width (1+ w) h) (1- length)) + (1+ w)) + ;; No, it doesn't, but this implies that l(w-1, h) = + ;; l(w+1, h) - l(2, 0) >= l(w+1, h) - 2 > (L-1) - + ;; 2 = L-3. Clearly, l(w-1, h) <= l(w, h) <= L-1. + (t + (1- w))) + h))))) + +(defun image-transform-check-size () + "Check that the image exactly fits the width/height of the window." + (unless (numberp image-transform-resize) + (let ((size (image-display-size (image-get-display-property) t))) + (cond ((eq image-transform-resize 'fit-width) + (assert (= (car size) + (- (nth 2 (window-inside-pixel-edges)) + (nth 0 (window-inside-pixel-edges)))) + t)) + ((eq image-transform-resize 'fit-height) + (assert (= (cdr size) + (- (nth 3 (window-inside-pixel-edges)) + (nth 1 (window-inside-pixel-edges)))) + t)))))) + (defun image-transform-properties (spec) "Return rescaling/rotation properties for image SPEC. These properties are determined by the Image mode variables @@ -647,27 +761,35 @@ Rescaling and rotation properties only take effect if Emacs is compiled with ImageMagick support." + (setq image-transform-scale 1.0) (when (or image-transform-resize - (not (equal image-transform-rotation 0.0))) + (/= image-transform-rotation 0.0)) ;; Note: `image-size' looks up and thus caches the untransformed ;; image. There's no easy way to prevent that. (let* ((size (image-size spec t)) - (height + (resized (cond ((numberp image-transform-resize) (unless (= image-transform-resize 1) - (floor (* image-transform-resize (cdr size))))) + (setq image-transform-scale image-transform-resize) + (cons nil (floor (* image-transform-resize (cdr size)))))) + ((eq image-transform-resize 'fit-width) + (image-transform-fit-width + (car size) (cdr size) + (- (nth 2 (window-inside-pixel-edges)) + (nth 0 (window-inside-pixel-edges))))) ((eq image-transform-resize 'fit-height) - (- (nth 3 (window-inside-pixel-edges)) - (nth 1 (window-inside-pixel-edges)))))) - (width (if (eq image-transform-resize 'fit-width) - (- (nth 2 (window-inside-pixel-edges)) - (nth 0 (window-inside-pixel-edges)))))) - ;;TODO fit-to-* should consider the rotation angle - `(,@(if height (list :height height)) - ,@(if width (list :width width)) - ,@(if (not (equal 0.0 image-transform-rotation)) - (list :rotation image-transform-rotation)))))) + (let ((res (image-transform-fit-width + (cdr size) (car size) + (- (nth 3 (window-inside-pixel-edges)) + (nth 1 (window-inside-pixel-edges)))))) + (cons (cdr res) (car res))))))) + `(,@(when (car resized) + (list :width (car resized))) + ,@(when (cdr resized) + (list :height (cdr resized))) + ,@(unless (= 0.0 image-transform-rotation) + (list :rotation image-transform-rotation)))))) (defun image-transform-set-scale (scale) "Prompt for a number, and resize the current image by that amount. @@ -698,9 +820,7 @@ ROTATION should be in degrees. This command has no effect unless Emacs is compiled with ImageMagick support." (interactive "nRotation angle (in degrees): ") - ;;TODO 0 90 180 270 degrees are the only reasonable angles here - ;;otherwise combining with rescaling will get very awkward - (setq image-transform-rotation (float rotation)) + (setq image-transform-rotation (float (mod rotation 360))) (image-toggle-display-image)) (provide 'image-mode) ------------------------------------------------------------ revno: 108221 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11399 author: Wolfgang Jenkner committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-05-14 01:15:59 -0400 message: * lisp/image-mode.el: Fix scaling. (image-transform-resize): Doc fix. (image-transform-properties): Default scale is 1 and height should be an integer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-13 16:04:37 +0000 +++ lisp/ChangeLog 2012-05-14 05:15:59 +0000 @@ -1,3 +1,10 @@ +2012-05-14 Wolfgang Jenkner + + * image-mode.el: Fix scaling (bug#11399). + (image-transform-resize): Doc fix. + (image-transform-properties): Default scale is 1 and height should + be an integer. + 2012-05-13 Johan Bockgård * emacs-lisp/smie.el (smie-next-sexp): Use accessor `op-forw' rather === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2012-02-08 03:45:27 +0000 +++ lisp/image-mode.el 2012-05-14 05:15:59 +0000 @@ -608,23 +608,23 @@ ;; Not yet implemented. -;;; (defvar image-transform-minor-mode-map -;;; (let ((map (make-sparse-keymap))) -;;; ;; (define-key map [(control ?+)] 'image-scale-in) -;;; ;; (define-key map [(control ?-)] 'image-scale-out) -;;; ;; (define-key map [(control ?=)] 'image-scale-none) -;;; ;; (define-key map "c f h" 'image-scale-fit-height) -;;; ;; (define-key map "c ]" 'image-rotate-right) -;;; map) -;;; "Minor mode keymap `image-transform-mode'.") -;;; -;;; (define-minor-mode image-transform-mode -;;; "Minor mode for scaling and rotating images. -;;; With a prefix argument ARG, enable the mode if ARG is positive, -;;; and disable it otherwise. If called from Lisp, enable the mode -;;; if ARG is omitted or nil. This minor mode requires Emacs to have -;;; been compiled with ImageMagick support." -;;; nil "image-transform" image-transform-minor-mode-map) +;; (defvar image-transform-minor-mode-map +;; (let ((map (make-sparse-keymap))) +;; ;; (define-key map [(control ?+)] 'image-scale-in) +;; ;; (define-key map [(control ?-)] 'image-scale-out) +;; ;; (define-key map [(control ?=)] 'image-scale-none) +;; ;; (define-key map "c f h" 'image-scale-fit-height) +;; ;; (define-key map "c ]" 'image-rotate-right) +;; map) +;; "Minor mode keymap `image-transform-mode'.") +;; +;; (define-minor-mode image-transform-mode +;; "Minor mode for scaling and rotating images. +;; With a prefix argument ARG, enable the mode if ARG is positive, +;; and disable it otherwise. If called from Lisp, enable the mode +;; if ARG is omitted or nil. This minor mode requires Emacs to have +;; been compiled with ImageMagick support." +;; nil "image-transform" image-transform-minor-mode-map) ;; FIXME this doesn't seem mature yet. Document in manual when it is. @@ -634,7 +634,7 @@ - nil, meaning no resizing. - `fit-height', meaning to fit the image to the window height. - `fit-width', meaning to fit the image to the window width. - - A number, which is a scale factor (the default size is 100).") + - A number, which is a scale factor (the default size is 1).") (defvar image-transform-rotation 0.0 "Rotation angle for the image in the current Image mode buffer.") @@ -655,8 +655,8 @@ (height (cond ((numberp image-transform-resize) - (unless (= image-transform-resize 100) - (* image-transform-resize (cdr size)))) + (unless (= image-transform-resize 1) + (floor (* image-transform-resize (cdr size))))) ((eq image-transform-resize 'fit-height) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))))) @@ -669,7 +669,6 @@ ,@(if (not (equal 0.0 image-transform-rotation)) (list :rotation image-transform-rotation)))))) -;; FIXME 2 works, but eg 1.9 or 0.5 don't? (defun image-transform-set-scale (scale) "Prompt for a number, and resize the current image by that amount. This command has no effect unless Emacs is compiled with ------------------------------------------------------------ revno: 108220 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-05-13 17:27:21 -0700 message: New defcustoms need :version tags. They don't need "*" in the doc. diff: === modified file 'lisp/erc/erc-backend.el' --- lisp/erc/erc-backend.el 2012-05-13 18:51:14 +0000 +++ lisp/erc/erc-backend.el 2012-05-14 00:27:21 +0000 @@ -394,8 +394,9 @@ :group 'erc-server) (defcustom erc-server-timestamp-format "%Y-%m-%d %T" - "*Timestamp format used with server response messages. + "Timestamp format used with server response messages. This string is processed using `format-time-string'." + :version "24.2" :type 'string :group 'erc-server) ------------------------------------------------------------ revno: 108219 fixes bug(s): http://debbugs.gnu.org/10779 author: Teemu Likonen committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2012-05-13 20:51:14 +0200 message: Allow specifying the erc timestamp format * erc-backend.el (erc-server-timestamp-format): New variable to allow specifying the timestamp format. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2012-04-11 13:43:03 +0000 +++ lisp/erc/ChangeLog 2012-05-13 18:51:14 +0000 @@ -1,3 +1,8 @@ +2012-05-13 Teemu Likonen + + * erc-backend.el (erc-server-timestamp-format): New variable to + allow specifying the timestamp format (bug#10779). + 2012-04-11 Vivek Dasmohapatra * erc-services.el (erc-nickserv-passwords): Don't display the === modified file 'lisp/erc/erc-backend.el' --- lisp/erc/erc-backend.el 2012-04-09 13:05:48 +0000 +++ lisp/erc/erc-backend.el 2012-05-13 18:51:14 +0000 @@ -393,6 +393,12 @@ :type 'integer :group 'erc-server) +(defcustom erc-server-timestamp-format "%Y-%m-%d %T" + "*Timestamp format used with server response messages. +This string is processed using `format-time-string'." + :type 'string + :group 'erc-server) + ;;; Flood-related ;; Most of this is courtesy of Jorgen Schaefer and Circe @@ -1454,7 +1460,8 @@ "The channel topic has changed." nil (let* ((ch (first (erc-response.command-args parsed))) (topic (erc-trim-string (erc-response.contents parsed))) - (time (format-time-string "%T %m/%d/%y" (current-time)))) + (time (format-time-string erc-server-timestamp-format + (current-time)))) (multiple-value-bind (nick login host) (values-list (erc-parse-user (erc-response.sender parsed))) (erc-update-channel-member ch nick nick nil nil nil host login) @@ -1647,7 +1654,7 @@ (multiple-value-bind (nick seconds-idle on-since time) (values-list (cdr (erc-response.command-args parsed))) (setq time (when on-since - (format-time-string "%T %Y/%m/%d" + (format-time-string erc-server-timestamp-format (erc-string-to-emacs-time on-since)))) (erc-update-user-nick nick nick nil nil nil (and time (format "on since %s" time))) @@ -1724,7 +1731,8 @@ (third (erc-response.command-args parsed))))) (erc-display-message parsed 'notice (erc-get-buffer channel proc) - 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time)))) + 's329 ?c channel ?t (format-time-string erc-server-timestamp-format + time)))) (define-erc-response-handler (330) "Nick is authed as (on Quakenet network)." nil @@ -1761,7 +1769,7 @@ "Who set the topic, and when." nil (multiple-value-bind (channel nick time) (values-list (cdr (erc-response.command-args parsed))) - (setq time (format-time-string "%T %Y/%m/%d" + (setq time (format-time-string erc-server-timestamp-format (erc-string-to-emacs-time time))) (erc-update-channel-topic channel (format "\C-o (%s, %s)" nick time) ------------------------------------------------------------ revno: 108218 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-05-13 12:04:37 -0400 message: *** empty log message *** diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-13 14:23:45 +0000 +++ lisp/ChangeLog 2012-05-13 16:04:37 +0000 @@ -1,3 +1,8 @@ +2012-05-13 Johan Bockgård + + * emacs-lisp/smie.el (smie-next-sexp): Use accessor `op-forw' rather + than hard-coding `car', to fix misbehavior when moving forward. + 2012-05-13 Chong Yidong * emacs-lisp/tabulated-list.el (tabulated-list-format) === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2012-04-19 17:20:26 +0000 +++ lisp/emacs-lisp/smie.el 2012-05-13 16:04:37 +0000 @@ -728,7 +728,8 @@ (if (and halfsexp (numberp (funcall op-forw toklevels))) (push toklevels levels) (throw 'return - (prog1 (list (or (car toklevels) t) (point) token) + (prog1 (list (or (funcall op-forw toklevels) t) + (point) token) (goto-char pos))))) (t (let ((lastlevels levels)) @@ -773,7 +774,8 @@ ((and lastlevels (smie--associative-p (car lastlevels))) (throw 'return - (prog1 (list (or (car toklevels) t) (point) token) + (prog1 (list (or (funcall op-forw toklevels) t) + (point) token) (goto-char pos)))) ;; - it's an associative operator within a larger construct ;; (e.g. an "elsif"), so we should just ignore it and keep ------------------------------------------------------------ revno: 108217 fixes bug(s): http://debbugs.gnu.org/11455 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-05-13 22:23:45 +0800 message: Adapt Electric Buffer Menu to recent Buffer Menu changes. * lisp/ebuff-menu.el (electric-buffer-list): Put electric buffer menu command descriptions in this docstring, instead of the docstring of electric-buffer-menu-mode. Code cleanups. (electric-buffer-menu-mode): Use define-derived-mode. Rename from Electric-buffer-menu-mode. (electric-buffer-update-highlight): Minor code cleanup. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-format) (tabulated-list-entries, tabulated-list-padding) (tabulated-list-sort-key): Make permanent-local. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-13 09:05:04 +0000 +++ lisp/ChangeLog 2012-05-13 14:23:45 +0000 @@ -1,3 +1,17 @@ +2012-05-13 Chong Yidong + + * emacs-lisp/tabulated-list.el (tabulated-list-format) + (tabulated-list-entries, tabulated-list-padding) + (tabulated-list-sort-key): Make permanent-local. + + * ebuff-menu.el: Adapt to Buffer Menu changes (Bug#11455). + (electric-buffer-list): Put electric buffer menu + command descriptions in this docstring, instead of the docstring + of electric-buffer-menu-mode. Code cleanups. + (electric-buffer-menu-mode): Use define-derived-mode. Rename from + Electric-buffer-menu-mode. + (electric-buffer-update-highlight): Minor code cleanup. + 2012-05-13 Michael Albinus * net/dbus.el (dbus-call-method): Restore events not from D-Bus. === modified file 'lisp/ebuff-menu.el' --- lisp/ebuff-menu.el 2012-05-06 08:43:46 +0000 +++ lisp/ebuff-menu.el 2012-05-13 14:23:45 +0000 @@ -31,9 +31,6 @@ (require 'electric) -;; this depends on the format of list-buffers (from src/buffer.c) and -;; on stuff in lisp/buff-menu.el - (defvar electric-buffer-menu-mode-map (let ((map (make-keymap))) (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) @@ -91,25 +88,33 @@ (put 'Helper-describe-bindings :advertised-binding "?") (defvar electric-buffer-menu-mode-hook nil - "Normal hook run by `electric-buffer-list'.") + "Normal hook run by `electric-buffer-menu-mode'.") ;;;###autoload (defun electric-buffer-list (arg) - "Pop up a buffer describing the set of Emacs buffers. -Vaguely like ITS lunar select buffer; combining typeoutoid buffer -listing with menuoid buffer selection. - -If the very next character typed is a space then the buffer list -window disappears. Otherwise, one may move around in the buffer list -window, marking buffers to be selected, saved or deleted. - -To exit and select a new buffer, type a space when the cursor is on -the appropriate line of the buffer-list window. Other commands are -much like those of `Buffer-menu-mode'. + "Pop up the Buffer Menu in an \"electric\" window. +If you type SPC or RET (`Electric-buffer-menu-select'), that +selects the buffer at point and quits the \"electric\" window. +Otherwise, you can move around in the Buffer Menu, marking +buffers to be selected, saved or deleted; these other commands +are much like those of `Buffer-menu-mode'. Run hooks in `electric-buffer-menu-mode-hook' on entry. -\\{electric-buffer-menu-mode-map}" +\\ +\\[keyboard-quit] or \\[Electric-buffer-menu-quit] -- exit buffer menu, returning to previous window and buffer + configuration. If the very first character typed is a space, it + also has this effect. +\\[Electric-buffer-menu-select] -- select buffer of line point is on. + Also show buffers marked with m in other windows, + deletes buffers marked with \"D\", and saves those marked with \"S\". +\\[Buffer-menu-mark] -- mark buffer to be displayed. +\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer. +\\[Buffer-menu-save] -- mark that buffer to be saved. +\\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted. +\\[Buffer-menu-unmark] -- remove all kinds of marks from current line. +\\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done. +\\[Buffer-menu-backup-unmark] -- back up a line and remove marks." (interactive "P") (let (select buffer) (save-window-excursion @@ -118,15 +123,15 @@ (unwind-protect (progn (set-buffer buffer) - (Electric-buffer-menu-mode) + (electric-buffer-menu-mode) + (goto-char (point-min)) + (if (search-forward "\n." nil t) + (forward-char -1)) (electric-buffer-update-highlight) (setq select (catch 'electric-buffer-menu-select - (message "<<< Press Return to bury the buffer list >>>") - (if (eq (setq unread-command-events (list (read-event))) - ?\s) - (progn (setq unread-command-events nil) - (throw 'electric-buffer-menu-select nil))) + (message "<<< Type SPC or RET to bury the buffer list >>>") + (setq unread-command-events (list (read-event))) (let ((start-point (point)) (first (progn (goto-char (point-min)) (unless Buffer-menu-use-header-line @@ -150,15 +155,16 @@ (Buffer-menu-mode) (bury-buffer) ;Get rid of window, if dedicated. (message ""))) - (if select - (progn (set-buffer buffer) - (let ((opoint (point-marker))) - (Buffer-menu-execute) - (goto-char (point-min)) - (if (prog1 (search-forward "\n>" nil t) - (goto-char opoint) (set-marker opoint nil)) - (Buffer-menu-select) - (switch-to-buffer (Buffer-menu-buffer t)))))))) + (when select + (set-buffer buffer) + (let ((opoint (point-marker))) + (Buffer-menu-execute) + (goto-char (point-min)) + (if (prog1 (search-forward "\n>" nil t) + (goto-char opoint) + (set-marker opoint nil)) + (Buffer-menu-select) + (switch-to-buffer (Buffer-menu-buffer t))))))) (defun electric-buffer-menu-looper (state condition) (cond ((and condition @@ -179,50 +185,27 @@ (defvar Helper-return-blurb) -(put 'Electric-buffer-menu-mode 'mode-class 'special) -(defun Electric-buffer-menu-mode () - "Major mode for editing a list of buffers. -Each line describes one of the buffers in Emacs. -Letters do not insert themselves; instead, they are commands. -\\ -\\[keyboard-quit] or \\[Electric-buffer-menu-quit] -- exit buffer menu, returning to previous window and buffer - configuration. If the very first character typed is a space, it - also has this effect. -\\[Electric-buffer-menu-select] -- select buffer of line point is on. - Also show buffers marked with m in other windows, - deletes buffers marked with \"D\", and saves those marked with \"S\". -\\[Buffer-menu-mark] -- mark buffer to be displayed. -\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer. -\\[Buffer-menu-save] -- mark that buffer to be saved. -\\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted. -\\[Buffer-menu-unmark] -- remove all kinds of marks from current line. -\\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done. -\\[Buffer-menu-backup-unmark] -- back up a line and remove marks. - -\\{electric-buffer-menu-mode-map} - -Entry to this mode via command `electric-buffer-list' calls the value of -`electric-buffer-menu-mode-hook'." - (let ((saved header-line-format)) - (kill-all-local-variables) - (setq header-line-format saved)) - (use-local-map electric-buffer-menu-mode-map) - (setq mode-name "Electric Buffer Menu") +(define-derived-mode electric-buffer-menu-mode Buffer-menu-mode + "Electric Buffer Menu" + "Toggle Electric Buffer Menu mode in this buffer. +With a prefix argument ARG, enable Long Lines mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil. + +Electric Buffer Menu mode is a minor mode which is automatically +enabled and disabled by the \\[electric-buffer-list] command. +See the documentation of `electric-buffer-list' for details." (setq mode-line-buffer-identification "Electric Buffer List") - (make-local-variable 'Helper-return-blurb) - (setq Helper-return-blurb "return to buffer editing") - (setq truncate-lines t) - (setq buffer-read-only t) - (setq major-mode 'Electric-buffer-menu-mode) - (goto-char (point-min)) - (if (search-forward "\n." nil t) (forward-char -1)) - (run-mode-hooks 'electric-buffer-menu-mode-hook)) + (set (make-local-variable 'Helper-return-blurb) + "return to buffer editing")) + +(define-obsolete-function-alias 'Electric-buffer-menu-mode + 'electric-buffer-menu-mode "24.2") ;; generally the same as Buffer-menu-mode-map ;; (except we don't indirect to global-map) (put 'Electric-buffer-menu-undefined 'suppress-keymap t) - (defun Electric-buffer-menu-exit () (interactive) (setq unread-command-events (listify-key-sequence (this-command-keys))) @@ -274,13 +257,13 @@ (sit-for 4)))) (defvar electric-buffer-overlay nil) + (defun electric-buffer-update-highlight () - (when (eq major-mode 'Electric-buffer-menu-mode) + (when (derived-mode-p 'electric-buffer-menu-mode) ;; Make sure we have an overlay to use. (or electric-buffer-overlay - (progn - (make-local-variable 'electric-buffer-overlay) - (setq electric-buffer-overlay (make-overlay (point) (point))))) + (set (make-local-variable 'electric-buffer-overlay) + (make-overlay (point) (point)))) (move-overlay electric-buffer-overlay (line-beginning-position) (line-end-position)) === modified file 'lisp/emacs-lisp/tabulated-list.el' --- lisp/emacs-lisp/tabulated-list.el 2012-05-07 16:29:55 +0000 +++ lisp/emacs-lisp/tabulated-list.el 2012-05-13 14:23:45 +0000 @@ -35,6 +35,11 @@ ;;; Code: +;; The reason `tabulated-list-format' and other variables are +;; permanent-local is to make it convenient to switch to a different +;; major mode, switch back, and have the original Tabulated List data +;; still valid. See, for example, ebuff-menu.el. + (defvar tabulated-list-format nil "The format of the current Tabulated List mode buffer. This should be a vector of elements (NAME WIDTH SORT . PROPS), @@ -56,6 +61,7 @@ - `:pad-right': Number of additional padding spaces to the right of the column (defaults to 1 if omitted).") (make-variable-buffer-local 'tabulated-list-format) +(put 'tabulated-list-format 'permanent-local t) (defvar tabulated-list-use-header-line t "Whether the Tabulated List buffer should use a header line.") @@ -80,12 +86,14 @@ If `tabulated-list-entries' is a function, it is called with no arguments and must return a list of the above form.") (make-variable-buffer-local 'tabulated-list-entries) +(put 'tabulated-list-entries 'permanent-local t) (defvar tabulated-list-padding 0 "Number of characters preceding each Tabulated List mode entry. By default, lines are padded with spaces, but you can use the function `tabulated-list-put-tag' to change this.") (make-variable-buffer-local 'tabulated-list-padding) +(put 'tabulated-list-padding 'permanent-local t) (defvar tabulated-list-revert-hook nil "Hook run before reverting a Tabulated List buffer. @@ -107,6 +115,7 @@ `tabulated-list-format' then specifies how to sort). FLIP, if non-nil, means to invert the resulting sort.") (make-variable-buffer-local 'tabulated-list-sort-key) +(put 'tabulated-list-sort-key 'permanent-local t) (defsubst tabulated-list-get-id (&optional pos) "Return the entry ID of the Tabulated List entry at POS. ------------------------------------------------------------ revno: 108216 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-05-13 06:23:39 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2012-04-26 12:43:28 +0000 +++ lisp/dired.el 2012-05-13 10:23:39 +0000 @@ -4200,7 +4200,7 @@ ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) -;;;;;; "dired-x" "dired-x.el" "2a39a8306a5541c304bc4ab602876f92") +;;;;;; "dired-x" "dired-x.el" "d09d49d54080e60ad6ecee5573b4e517") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ ------------------------------------------------------------ revno: 108215 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-05-13 06:18:50 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-05-12 10:17:24 +0000 +++ autogen/configure 2012-05-13 10:18:50 +0000 @@ -10326,13 +10326,13 @@ if test "${opsys}" = darwin; then NS_IMPL_COCOA=yes ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir}/Contents/MacOS/ + ns_appbindir=${ns_appdir}/Contents/MacOS ns_appresdir=${ns_appdir}/Contents/Resources ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base elif test -f $GNUSTEP_CONFIG_FILE; then NS_IMPL_GNUSTEP=yes ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir}/ + ns_appbindir=${ns_appdir} ns_appresdir=${ns_appdir}/Resources ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" ------------------------------------------------------------ revno: 108214 committer: Michael Albinus branch nick: trunk timestamp: Sun 2012-05-13 11:05:04 +0200 message: * net/dbus.el (dbus-call-method): Restore events not from D-Bus. (Bug#11447) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-13 03:05:06 +0000 +++ lisp/ChangeLog 2012-05-13 09:05:04 +0000 @@ -1,3 +1,8 @@ +2012-05-13 Michael Albinus + + * net/dbus.el (dbus-call-method): Restore events not from D-Bus. + (Bug#11447) + 2012-05-13 Stefan Monnier Move define-obsolete-variable-alias before the var's definition. === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2012-04-23 05:44:49 +0000 +++ lisp/net/dbus.el 2012-05-13 09:05:04 +0000 @@ -263,12 +263,16 @@ (apply 'dbus-message-internal dbus-message-type-method-call bus service path interface method 'dbus-call-method-handler args))) + ;; Wait until `dbus-call-method-handler' has put the result into ;; `dbus-return-values-table'. If no timeout is given, use the - ;; default 25". + ;; default 25". Events which are not from D-Bus must be restored. (with-timeout ((if timeout (/ timeout 1000.0) 25)) (while (eq (gethash key dbus-return-values-table :ignore) :ignore) - (read-event nil nil 0.1))) + (let ((event (let (unread-command-events) (read-event)))) + (when (and event (not (ignore-errors (dbus-check-event event)))) + (setq unread-command-events + (append unread-command-events (list event))))))) ;; Cleanup `dbus-return-values-table'. Return the result. (prog1 @@ -1089,9 +1093,7 @@ and PATH must be a valid object path. The last two parameters are strings. The result, the introspection data, is a string in XML format." - ;; We don't want to raise errors. `dbus-call-method-non-blocking' - ;; is used, because the handler can be registered in our Emacs - ;; instance; caller and callee would block each other. + ;; We don't want to raise errors. (dbus-ignore-errors (dbus-call-method bus service path dbus-interface-introspectable "Introspect" @@ -1534,7 +1536,7 @@ existing path name, and the list of available interface objects. An interface object is another cons, which car is the interface name, and the cdr is the list of properties as returned by -`dbus-get-all-properties' for that path and interface. Example: +`dbus-get-all-properties' for that path and interface. Example: \(dbus-get-all-managed-objects :session \"org.gnome.SettingsDaemon\" \"/\") ------------------------------------------------------------ revno: 108213 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-05-12 23:05:06 -0400 message: Move define-obsolete-variable-alias before the var's definition. * lisp/vc/log-edit.el (vc-comment-ring, vc-comment-ring-index): * lisp/tooltip.el (tooltip-hook): * lisp/textmodes/reftex-toc.el (reftex-toc-map): * lisp/textmodes/reftex-sel.el (reftex-select-label-map) (reftex-select-bib-map): * lisp/textmodes/reftex-index.el (reftex-index-map) (reftex-index-phrases-map): * lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map): * lisp/progmodes/meta-mode.el (meta-mode-map): * lisp/novice.el (disabled-command-hook): * lisp/loadhist.el (unload-hook-features-list): * lisp/frame.el (blink-cursor): * lisp/files.el (find-file-not-found-hooks, write-file-hooks) (write-contents-hooks): * lisp/emulation/tpu-edt.el (GOLD-map): * lisp/emacs-lock.el (emacs-lock-from-exiting): * lisp/emacs-lisp/generic.el (generic-font-lock-defaults): * lisp/emacs-lisp/chart.el (chart-map): * lisp/dos-fns.el (register-name-alist): * lisp/dired-x.el (dired-omit-files-p): * lisp/desktop.el (desktop-enable): * lisp/cus-edit.el (custom-mode-hook): * lisp/buff-menu.el (buffer-menu-mode-hook): * lisp/bookmark.el (bookmark-read-annotation-text-func) (bookmark-exit-hooks): * lisp/allout.el (allout-mode-deactivate-hook) (allout-exposure-change-hook, allout-structure-added-hook) (allout-structure-deleted-hook, allout-structure-shifted-hook): * lisp/dirtrack.el (dirtrack-toggle, dirtrackp, dirtrack-debug-toggle) (dirtrack-debug): Move call to define-obsolete-variable-alias so it comes before the corresponding variable's definition. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-12 15:04:11 +0000 +++ lisp/ChangeLog 2012-05-13 03:05:06 +0000 @@ -1,3 +1,38 @@ +2012-05-13 Stefan Monnier + + Move define-obsolete-variable-alias before the var's definition. + * vc/log-edit.el (vc-comment-ring, vc-comment-ring-index): + * tooltip.el (tooltip-hook): + * textmodes/reftex-toc.el (reftex-toc-map): + * textmodes/reftex-sel.el (reftex-select-label-map) + (reftex-select-bib-map): + * textmodes/reftex-index.el (reftex-index-map) + (reftex-index-phrases-map): + * speedbar.el (speedbar-syntax-table, speedbar-key-map): + * progmodes/meta-mode.el (meta-mode-map): + * novice.el (disabled-command-hook): + * loadhist.el (unload-hook-features-list): + * frame.el (blink-cursor): + * files.el (find-file-not-found-hooks, write-file-hooks) + (write-contents-hooks): + * emulation/tpu-edt.el (GOLD-map): + * emacs-lock.el (emacs-lock-from-exiting): + * emacs-lisp/generic.el (generic-font-lock-defaults): + * emacs-lisp/chart.el (chart-map): + * dos-fns.el (register-name-alist): + * dired-x.el (dired-omit-files-p): + * desktop.el (desktop-enable): + * cus-edit.el (custom-mode-hook): + * buff-menu.el (buffer-menu-mode-hook): + * bookmark.el (bookmark-read-annotation-text-func) + (bookmark-exit-hooks): + * allout.el (allout-mode-deactivate-hook) + (allout-exposure-change-hook, allout-structure-added-hook) + (allout-structure-deleted-hook, allout-structure-shifted-hook): + * dirtrack.el (dirtrack-toggle, dirtrackp, dirtrack-debug-toggle) + (dirtrack-debug): Move call to define-obsolete-variable-alias so it + comes before the corresponding variable's definition. + 2012-05-12 Chong Yidong * buff-menu.el (Buffer-menu-buffer+size-width): Doc fix (Bug#11454). === modified file 'lisp/allout.el' --- lisp/allout.el 2012-05-02 10:57:03 +0000 +++ lisp/allout.el 2012-05-13 03:05:06 +0000 @@ -1405,15 +1405,17 @@ (defvar allout-mode-hook nil "Hook run when allout mode starts.") ;;;_ = allout-mode-deactivate-hook +(define-obsolete-variable-alias 'allout-mode-deactivate-hook + 'allout-mode-off-hook "24.1") (defvar allout-mode-deactivate-hook nil "Hook run when allout mode ends.") -(define-obsolete-variable-alias 'allout-mode-deactivate-hook - 'allout-mode-off-hook "24.1") ;;;_ = allout-exposure-category (defvar allout-exposure-category nil "Symbol for use as allout invisible-text overlay category.") ;;;_ = allout-exposure-change-functions +(define-obsolete-variable-alias 'allout-exposure-change-hook + 'allout-exposure-change-functions "24.2") (defcustom allout-exposure-change-functions nil "Abnormal hook run after allout outline subtree exposure changes. It is run at the conclusion of `allout-flag-region'. @@ -1429,10 +1431,9 @@ :group 'allout :version "24.2") -(define-obsolete-variable-alias 'allout-exposure-change-hook - 'allout-exposure-change-functions "24.2") - ;;;_ = allout-structure-added-functions +(define-obsolete-variable-alias 'allout-structure-added-hook + 'allout-structure-added-functions "24.2") (defcustom allout-structure-added-functions nil "Abnormal hook run after adding items to an Allout outline. Functions on the hook should take two arguments: @@ -1445,10 +1446,9 @@ :group 'allout :version "24.2") -(define-obsolete-variable-alias 'allout-structure-added-hook - 'allout-structure-added-functions "24.2") - ;;;_ = allout-structure-deleted-functions +(define-obsolete-variable-alias 'allout-structure-deleted-hook + 'allout-structure-deleted-functions "24.2") (defcustom allout-structure-deleted-functions nil "Abnormal hook run after deleting subtrees from an Allout outline. Functions on the hook must take two arguments: @@ -1464,10 +1464,9 @@ :group 'allout :version "24.2") -(define-obsolete-variable-alias 'allout-structure-deleted-hook - 'allout-structure-deleted-functions "24.2") - ;;;_ = allout-structure-shifted-functions +(define-obsolete-variable-alias 'allout-structure-shifted-hook + 'allout-structure-shifted-functions "24.2") (defcustom allout-structure-shifted-functions nil "Abnormal hook run after shifting items in an Allout outline. Functions on the hook should take two arguments: @@ -1483,9 +1482,6 @@ :group 'allout :version "24.2") -(define-obsolete-variable-alias 'allout-structure-shifted-hook - 'allout-structure-shifted-functions "24.2") - ;;;_ = allout-after-copy-or-kill-hook (defcustom allout-after-copy-or-kill-hook nil "Normal hook run after copying outline text.." === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2012-02-28 08:17:21 +0000 +++ lisp/bookmark.el 2012-05-13 03:05:06 +0000 @@ -828,11 +828,11 @@ "# Date: " (current-time-string) "\n")) +(define-obsolete-variable-alias 'bookmark-read-annotation-text-func + 'bookmark-edit-annotation-text-func "23.1") (defvar bookmark-edit-annotation-text-func 'bookmark-default-annotation-text "Function to return default text to use for a bookmark annotation. It takes one argument, the name of the bookmark, as a string.") -(define-obsolete-variable-alias 'bookmark-read-annotation-text-func - 'bookmark-edit-annotation-text-func "23.1") (defvar bookmark-edit-annotation-mode-map (let ((map (make-sparse-keymap))) @@ -2164,11 +2164,11 @@ "Hook run at the end of loading library `bookmark.el'.") ;; Exit Hook, called from kill-emacs-hook +(define-obsolete-variable-alias 'bookmark-exit-hooks + 'bookmark-exit-hook "22.1") (defvar bookmark-exit-hook nil "Hook run when Emacs exits.") -(define-obsolete-variable-alias 'bookmark-exit-hooks 'bookmark-exit-hook "22.1") - (defun bookmark-exit-hook-internal () "Save bookmark state, if necessary, at Emacs exit time. This also runs `bookmark-exit-hook'." === modified file 'lisp/buff-menu.el' --- lisp/buff-menu.el 2012-05-12 15:04:11 +0000 +++ lisp/buff-menu.el 2012-05-13 03:05:06 +0000 @@ -199,6 +199,9 @@ map) "Local keymap for `Buffer-menu-mode' buffers.") +(define-obsolete-variable-alias 'buffer-menu-mode-hook + 'Buffer-menu-mode-hook "23.1") + (define-derived-mode Buffer-menu-mode tabulated-list-mode "Buffer Menu" "Major mode for Buffer Menu buffers. The Buffer Menu is invoked by the commands \\[list-buffers], \\[buffer-menu], and @@ -207,9 +210,6 @@ (lambda (&optional _noconfirm) 'fast)) (add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t)) -(define-obsolete-variable-alias 'buffer-menu-mode-hook - 'Buffer-menu-mode-hook "23.1") - (defun buffer-menu (&optional arg) "Switch to the Buffer Menu. By default, all buffers are listed except those whose names start === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2012-05-04 23:16:47 +0000 +++ lisp/cus-edit.el 2012-05-13 03:05:06 +0000 @@ -4825,6 +4825,7 @@ (set (make-local-variable 'widget-link-suffix) "")) (setq show-trailing-whitespace nil)) +(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") (define-derived-mode Custom-mode nil "Custom" "Major mode for editing customization buffers. @@ -4873,7 +4874,6 @@ (Custom-mode)) (make-obsolete 'custom-mode 'Custom-mode "23.1") (put 'custom-mode 'mode-class 'special) -(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") (add-to-list 'debug-ignored-errors "^Invalid face:? ") === modified file 'lisp/desktop.el' --- lisp/desktop.el 2012-02-10 15:59:29 +0000 +++ lisp/desktop.el 2012-05-13 03:05:06 +0000 @@ -145,6 +145,8 @@ "Save status of Emacs when you exit." :group 'frames) +;; Maintained for backward compatibility +(define-obsolete-variable-alias 'desktop-enable 'desktop-save-mode "22.1") ;;;###autoload (define-minor-mode desktop-save-mode "Toggle desktop saving (Desktop Save mode). @@ -158,10 +160,6 @@ :global t :group 'desktop) -;; Maintained for backward compatibility -(define-obsolete-variable-alias 'desktop-enable - 'desktop-save-mode "22.1") - (defun desktop-save-mode-off () "Disable `desktop-save-mode'. Provided for use in hooks." (desktop-save-mode 0)) === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2012-02-22 04:02:44 +0000 +++ lisp/dired-x.el 2012-05-13 03:05:06 +0000 @@ -132,6 +132,8 @@ :type '(choice (const :tag "no maximum" nil) integer) :group 'dired-x) +;; For backward compatibility +(define-obsolete-variable-alias 'dired-omit-files-p 'dired-omit-mode "22.1") (define-minor-mode dired-omit-mode "Toggle omission of uninteresting files in Dired (Dired-Omit mode). With a prefix argument ARG, enable Dired-Omit mode if ARG is @@ -157,9 +159,6 @@ (put 'dired-omit-mode 'safe-local-variable 'booleanp) -;; For backward compatibility -(define-obsolete-variable-alias 'dired-omit-files-p 'dired-omit-mode "22.1") - (defcustom dired-omit-files "^\\.?#\\|^\\.$\\|^\\.\\.$" "Filenames matching this regexp will not be displayed. This only has effect when `dired-omit-mode' is t. See interactive function === modified file 'lisp/dirtrack.el' --- lisp/dirtrack.el 2012-02-08 02:12:24 +0000 +++ lisp/dirtrack.el 2012-05-13 03:05:06 +0000 @@ -179,6 +179,8 @@ dir)) +(define-obsolete-function-alias 'dirtrack-toggle 'dirtrack-mode "23.1") +(define-obsolete-variable-alias 'dirtrackp 'dirtrack-mode "23.1") ;;;###autoload (define-minor-mode dirtrack-mode "Toggle directory tracking in shell buffers (Dirtrack mode). @@ -198,10 +200,10 @@ (add-hook 'comint-preoutput-filter-functions 'dirtrack nil t) (remove-hook 'comint-preoutput-filter-functions 'dirtrack t))) -(define-obsolete-function-alias 'dirtrack-toggle 'dirtrack-mode "23.1") -(define-obsolete-variable-alias 'dirtrackp 'dirtrack-mode "23.1") - - + +(define-obsolete-function-alias 'dirtrack-debug-toggle 'dirtrack-debug-mode + "23.1") +(define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1") (define-minor-mode dirtrack-debug-mode "Toggle Dirtrack debugging. With a prefix argument ARG, enable Dirtrack debugging if ARG is @@ -211,11 +213,6 @@ (if dirtrack-debug-mode (display-buffer (get-buffer-create dirtrack-debug-buffer)))) -(define-obsolete-function-alias 'dirtrack-debug-toggle 'dirtrack-debug-mode - "23.1") -(define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1") - - (defun dirtrack-debug-message (msg1 msg2) "Insert strings at the end of `dirtrack-debug-buffer'." (when dirtrack-debug-mode === modified file 'lisp/dos-fns.el' --- lisp/dos-fns.el 2012-01-19 07:21:25 +0000 +++ lisp/dos-fns.el 2012-05-13 03:05:06 +0000 @@ -233,15 +233,15 @@ (add-hook 'before-init-hook 'dos-reevaluate-defcustoms) +(define-obsolete-variable-alias + 'register-name-alist 'dos-register-name-alist "24.1") + (defvar dos-register-name-alist '((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5) (cflag . 6) (flags . 7) (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0)) (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1)))) -(define-obsolete-variable-alias - 'register-name-alist 'dos-register-name-alist "24.1") - (defun dos-make-register () (make-vector 8 0)) === modified file 'lisp/emacs-lisp/chart.el' --- lisp/emacs-lisp/chart.el 2012-04-09 13:05:48 +0000 +++ lisp/emacs-lisp/chart.el 2012-05-13 03:05:06 +0000 @@ -62,8 +62,8 @@ (require 'eieio) ;;; Code: +(define-obsolete-variable-alias 'chart-map 'chart-mode-map "24.1") (defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.") -(define-obsolete-variable-alias 'chart-map 'chart-mode-map "24.1") (defvar chart-local-object nil "Local variable containing the locally displayed chart object.") === modified file 'lisp/emacs-lisp/generic.el' --- lisp/emacs-lisp/generic.el 2012-01-19 07:21:25 +0000 +++ lisp/emacs-lisp/generic.el 2012-05-13 03:05:06 +0000 @@ -97,10 +97,11 @@ ;; Internal Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define-obsolete-variable-alias 'generic-font-lock-defaults + 'generic-font-lock-keywords "22.1") (defvar generic-font-lock-keywords nil "Keywords for `font-lock-defaults' in a generic mode.") (make-variable-buffer-local 'generic-font-lock-keywords) -(define-obsolete-variable-alias 'generic-font-lock-defaults 'generic-font-lock-keywords "22.1") ;;;###autoload (defvar generic-mode-list nil === modified file 'lisp/emacs-lock.el' --- lisp/emacs-lock.el 2012-04-14 03:11:18 +0000 +++ lisp/emacs-lock.el 2012-05-13 03:05:06 +0000 @@ -186,6 +186,8 @@ ;; anything else (turn off) mode)))) +(define-obsolete-variable-alias 'emacs-lock-from-exiting + 'emacs-lock-mode "24.1") ;;;###autoload (define-minor-mode emacs-lock-mode "Toggle Emacs Lock mode in the current buffer. @@ -245,8 +247,6 @@ ;;; 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) === modified file 'lisp/emulation/tpu-edt.el' --- lisp/emulation/tpu-edt.el 2012-02-28 08:17:21 +0000 +++ lisp/emulation/tpu-edt.el 2012-05-13 03:05:06 +0000 @@ -315,6 +315,7 @@ ;;; Global Keymaps ;;; +(define-obsolete-variable-alias 'GOLD-map 'tpu-gold-map "23.1") (defvar tpu-gold-map (let ((map (make-keymap))) ;; Previously we used escape sequences here. We now instead presume @@ -494,7 +495,6 @@ map) "Maps the function keys on the VT100 keyboard preceded by PF1. GOLD is the ASCII 7-bit escape sequence OP.") -(define-obsolete-variable-alias 'GOLD-map 'tpu-gold-map "23.1") (defvar tpu-global-map (let ((map (make-sparse-keymap))) === modified file 'lisp/files.el' --- lisp/files.el 2012-05-09 03:06:08 +0000 +++ lisp/files.el 2012-05-13 03:05:06 +0000 @@ -415,13 +415,13 @@ ;;;It is not useful to make this a local variable. ;;;(put 'find-file-not-found-hooks 'permanent-local t) +(define-obsolete-variable-alias 'find-file-not-found-hooks + 'find-file-not-found-functions "22.1") (defvar find-file-not-found-functions nil "List of functions to be called for `find-file' on nonexistent file. These functions are called as soon as the error is detected. Variable `buffer-file-name' is already set up. The functions are called in the order given until one of them returns non-nil.") -(define-obsolete-variable-alias 'find-file-not-found-hooks - 'find-file-not-found-functions "22.1") ;;;It is not useful to make this a local variable. ;;;(put 'find-file-hooks 'permanent-local t) @@ -435,6 +435,7 @@ :options '(auto-insert) :version "22.1") +(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1") (defvar write-file-functions nil "List of functions to be called before writing out a buffer to a file. If one of them returns non-nil, the file is considered already written @@ -451,13 +452,14 @@ node `(elisp)Saving Buffers'.) To perform various checks or updates before the buffer is saved, use `before-save-hook'.") (put 'write-file-functions 'permanent-local t) -(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1") (defvar local-write-file-hooks nil) (make-variable-buffer-local 'local-write-file-hooks) (put 'local-write-file-hooks 'permanent-local t) (make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1") +(define-obsolete-variable-alias 'write-contents-hooks + 'write-contents-functions "22.1") (defvar write-contents-functions nil "List of functions to be called before writing out a buffer to a file. If one of them returns non-nil, the file is considered already written @@ -475,8 +477,6 @@ To perform various checks or updates before the buffer is saved, use `before-save-hook'.") (make-variable-buffer-local 'write-contents-functions) -(define-obsolete-variable-alias 'write-contents-hooks - 'write-contents-functions "22.1") (defcustom enable-local-variables t "Control use of local variables in files you visit. === modified file 'lisp/frame.el' --- lisp/frame.el 2012-04-16 18:41:38 +0000 +++ lisp/frame.el 2012-05-13 03:05:06 +0000 @@ -1612,6 +1612,8 @@ (cancel-timer blink-cursor-timer) (setq blink-cursor-timer nil))) +(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1") + (define-minor-mode blink-cursor-mode "Toggle cursor blinking (Blink Cursor mode). With a prefix argument ARG, enable Blink Cursor mode if ARG is @@ -1638,8 +1640,6 @@ blink-cursor-delay 'blink-cursor-start)))) -(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1") - ;;;; Key bindings @@ -1652,7 +1652,8 @@ ;; Misc. ;; Only marked as obsolete in 24.2. -(define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1") +(define-obsolete-variable-alias 'automatic-hscrolling + 'auto-hscroll-mode "22.1") (make-variable-buffer-local 'show-trailing-whitespace) === modified file 'lisp/loadhist.el' --- lisp/loadhist.el 2012-01-19 07:21:25 +0000 +++ lisp/loadhist.el 2012-05-13 03:05:06 +0000 @@ -143,13 +143,13 @@ `-hook' or `-hooks', from which `unload-feature' should try to remove pertinent symbols.") +(define-obsolete-variable-alias 'unload-hook-features-list + 'unload-function-defs-list "22.2") (defvar unload-function-defs-list nil "List of definitions in the Lisp library being unloaded. This is meant to be used by `FEATURE-unload-function'; see the documentation of `unload-feature' for details.") -(define-obsolete-variable-alias 'unload-hook-features-list - 'unload-function-defs-list "22.2") (defun unload--set-major-mode () (save-current-buffer === modified file 'lisp/novice.el' --- lisp/novice.el 2012-01-19 07:21:25 +0000 +++ lisp/novice.el 2012-05-13 03:05:06 +0000 @@ -36,13 +36,13 @@ (eval-when-compile (require 'cl)) ;;;###autoload +(define-obsolete-variable-alias 'disabled-command-hook + 'disabled-command-function "22.1") +;;;###autoload (defvar disabled-command-function 'disabled-command-function "Function to call to handle disabled commands. If nil, the feature is disabled, i.e., all commands work normally.") -;;;###autoload -(define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1") - ;; It is ok here to assume that this-command is a symbol ;; because we won't get called otherwise. ;;;###autoload === modified file 'lisp/progmodes/meta-mode.el' --- lisp/progmodes/meta-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/meta-mode.el 2012-05-13 03:05:06 +0000 @@ -829,6 +829,7 @@ st) "Syntax table used in Metafont or MetaPost mode.") +(define-obsolete-variable-alias 'meta-mode-map 'meta-common-mode-map "24.1") (defvar meta-common-mode-map (let ((map (make-sparse-keymap))) ;; Comment Paragraphs: @@ -858,7 +859,6 @@ ;; (define-key map "\C-c\C-l" 'meta-recenter-output) map) "Keymap used in Metafont or MetaPost mode.") -(define-obsolete-variable-alias 'meta-mode-map 'meta-common-mode-map "24.1") (easy-menu-define meta-mode-menu meta-common-mode-map === modified file 'lisp/speedbar.el' --- lisp/speedbar.el 2012-04-28 21:59:08 +0000 +++ lisp/speedbar.el 2012-05-13 03:05:06 +0000 @@ -774,6 +774,8 @@ (defvar speedbar-update-flag-disable nil "Permanently disable changing of the update flag.") +(define-obsolete-variable-alias + 'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1") (defvar speedbar-mode-syntax-table (let ((st (make-syntax-table))) ;; Turn off paren matching around here. @@ -787,10 +789,9 @@ (modify-syntax-entry ?\] " " st) st) "Syntax-table used on the speedbar.") -(define-obsolete-variable-alias - 'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1") - - + + +(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1") (defvar speedbar-mode-map (let ((map (make-keymap))) (suppress-keymap map t) @@ -825,7 +826,6 @@ (dframe-update-keymap map) map) "Keymap used in speedbar buffer.") -(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1") (defun speedbar-make-specialized-keymap () "Create a keymap for use with a speedbar major or minor display mode. === modified file 'lisp/textmodes/reftex-index.el' --- lisp/textmodes/reftex-index.el 2012-01-19 07:21:25 +0000 +++ lisp/textmodes/reftex-index.el 2012-05-13 03:05:06 +0000 @@ -274,6 +274,8 @@ (and newtag (cdr cell) (not (member newtag (cdr cell))) (push newtag (cdr cell))))) +(define-obsolete-variable-alias + 'reftex-index-map 'reftex-index-mode-map "24.1") (defvar reftex-index-mode-map (let ((map (make-sparse-keymap))) ;; Index map @@ -377,8 +379,6 @@ map) "Keymap used for *Index* buffers.") -(define-obsolete-variable-alias - 'reftex-index-map 'reftex-index-mode-map "24.1") (defvar reftex-index-menu) @@ -1179,6 +1179,8 @@ "Font lock keywords for reftex-index-phrases-mode.") (defvar reftex-index-phrases-font-lock-defaults nil "Font lock defaults for reftex-index-phrases-mode.") +(define-obsolete-variable-alias + 'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1") (defvar reftex-index-phrases-mode-map (let ((map (make-sparse-keymap))) ;; Keybindings and Menu for phrases buffer @@ -1244,8 +1246,6 @@ map) "Keymap used for *toc* buffer.") -(define-obsolete-variable-alias - 'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1") (defun reftex-index-phrase-selection-or-word (arg) === modified file 'lisp/textmodes/reftex-sel.el' --- lisp/textmodes/reftex-sel.el 2012-01-19 07:21:25 +0000 +++ lisp/textmodes/reftex-sel.el 2012-05-13 03:05:06 +0000 @@ -71,6 +71,8 @@ (define-key map "-" 'negative-argument) map)) +(define-obsolete-variable-alias + 'reftex-select-label-map 'reftex-select-label-mode-map "24.1") (defvar reftex-select-label-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map reftex-select-shared-map) @@ -102,8 +104,6 @@ "Keymap used for *RefTeX Select* buffer, when selecting a label. This keymap can be used to configure the label selection process which is started with the command \\[reftex-reference].") -(define-obsolete-variable-alias - 'reftex-select-label-map 'reftex-select-label-mode-map "24.1") (define-derived-mode reftex-select-label-mode fundamental-mode "LSelect" "Major mode for selecting a label in a LaTeX document. @@ -126,6 +126,8 @@ ;; We do not set a local map - reftex-select-item does this. ) +(define-obsolete-variable-alias + 'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1") (defvar reftex-select-bib-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map reftex-select-shared-map) @@ -147,8 +149,6 @@ "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry. This keymap can be used to configure the BibTeX selection process which is started with the command \\[reftex-citation].") -(define-obsolete-variable-alias - 'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1") (define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect" "Major mode for selecting a citation key in a LaTeX document. === modified file 'lisp/textmodes/reftex-toc.el' --- lisp/textmodes/reftex-toc.el 2012-01-19 07:21:25 +0000 +++ lisp/textmodes/reftex-toc.el 2012-05-13 03:05:06 +0000 @@ -31,6 +31,7 @@ (require 'reftex) ;;; +(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1") (defvar reftex-toc-mode-map (let ((map (make-sparse-keymap))) @@ -122,7 +123,6 @@ map) "Keymap used for *toc* buffer.") -(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1") (defvar reftex-toc-menu) (defvar reftex-last-window-height nil) === modified file 'lisp/tooltip.el' --- lisp/tooltip.el 2012-02-08 02:12:24 +0000 +++ lisp/tooltip.el 2012-05-13 03:05:06 +0000 @@ -154,6 +154,8 @@ ;;; Variables that are not customizable. +(define-obsolete-variable-alias 'tooltip-hook 'tooltip-functions "23.1") + (defvar tooltip-functions nil "Functions to call to display tooltips. Each function is called with one argument EVENT which is a copy @@ -161,8 +163,6 @@ functions displays the tooltip, it should return non-nil and the rest are not called.") -(define-obsolete-variable-alias 'tooltip-hook 'tooltip-functions "23.1") - (defvar tooltip-timeout-id nil "The id of the timeout started when Emacs becomes idle.") === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2012-05-08 15:19:18 +0000 +++ lisp/vc/log-edit.el 2012-05-13 03:05:06 +0000 @@ -195,7 +195,10 @@ (defconst log-edit-maximum-comment-ring-size 32 "Maximum number of saved comments in the comment ring.") +(define-obsolete-variable-alias 'vc-comment-ring 'log-edit-comment-ring "22.1") (defvar log-edit-comment-ring (make-ring log-edit-maximum-comment-ring-size)) +(define-obsolete-variable-alias 'vc-comment-ring-index + 'log-edit-comment-ring-index "22.1") (defvar log-edit-comment-ring-index nil) (defvar log-edit-last-comment-match "") @@ -301,8 +304,6 @@ (insert "\n")))) ;; Compatibility with old names. -(define-obsolete-variable-alias 'vc-comment-ring 'log-edit-comment-ring "22.1") -(define-obsolete-variable-alias 'vc-comment-ring-index 'log-edit-comment-ring-index "22.1") (define-obsolete-function-alias 'vc-previous-comment 'log-edit-previous-comment "22.1") (define-obsolete-function-alias 'vc-next-comment 'log-edit-next-comment "22.1") (define-obsolete-function-alias 'vc-comment-search-reverse 'log-edit-comment-search-backward "22.1")