Now on revision 107612. ------------------------------------------------------------ revno: 107612 fixes bug(s): http://debbugs.gnu.org/10936 author: Kenichi Handa committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-03-15 21:45:29 -0400 message: * leim/quail/indian.el (telugu-inscript): Fix typo. diff: === modified file 'leim/ChangeLog' --- leim/ChangeLog 2012-03-13 07:21:15 +0000 +++ leim/ChangeLog 2012-03-16 01:45:29 +0000 @@ -1,3 +1,7 @@ +2012-03-16 Kenichi Handa + + * quail/indian.el (telugu-inscript): Fix typo. (Bug#10936) + 2012-03-13 Йордан Миладинов (tiny change) * quail/cyrillic.el (bulgarian-alt-phonetic): === modified file 'leim/quail/indian.el' --- leim/quail/indian.el 2012-01-19 07:21:25 +0000 +++ leim/quail/indian.el 2012-03-16 01:45:29 +0000 @@ -440,7 +440,7 @@ (if nil (quail-define-package "telugu-inscript" "Telugu" "TlgIS" t "Telugu keyboard Inscript")) (quail-define-inscript-package - indian-dev-base-table inscript-dev-keytable + indian-tlg-base-table inscript-dev-keytable "telugu-inscript" "Telugu" "TlgIS" "Telugu keyboard Inscript.") ------------------------------------------------------------ revno: 107611 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-03-15 21:40:20 -0400 message: Doc fixes for view-mode and special major-modes Ref: http://debbugs.gnu.org/10650 * doc/lispref/modes.texi (Major Mode Conventions): Mention the strange (IMO) relationship between View mode and special modes. * lisp/view.el (view-buffer, view-buffer-other-window) (view-buffer-other-frame): Doc fixes re special mode-class. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-03-11 16:27:36 +0000 +++ doc/lispref/ChangeLog 2012-03-16 01:40:20 +0000 @@ -1,3 +1,8 @@ +2012-03-16 Glenn Morris + + * modes.texi (Major Mode Conventions): Mention the strange + relationship between View mode and special modes. (Bug#10650) + 2012-03-11 Chong Yidong * windows.texi (Window Configurations): save-window-excursion is === modified file 'doc/lispref/modes.texi' --- doc/lispref/modes.texi 2012-03-02 02:52:40 +0000 +++ doc/lispref/modes.texi 2012-03-16 01:40:20 +0000 @@ -525,6 +525,10 @@ @code{special} modes, Fundamental mode is used instead. Modes such as Dired, Rmail, and Buffer List use this feature. +The function @code{view-buffer} does not enable View mode in buffers +whose mode-class is special, because such modes usually provide their +own View-like bindings. + The @code{define-derived-mode} macro automatically marks the derived mode as special if the parent mode is special. Special mode is a convenient parent for such modes to inherit from; @xref{Basic Major === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-16 01:27:23 +0000 +++ lisp/ChangeLog 2012-03-16 01:40:20 +0000 @@ -1,5 +1,8 @@ 2012-03-16 Glenn Morris + * view.el (view-buffer, view-buffer-other-window) + (view-buffer-other-frame): Doc fixes re special mode-class. + * subr.el (eval-after-load): If named feature is provided not from a file, run after-load forms. (Bug#10946) === modified file 'lisp/view.el' --- lisp/view.el 2012-02-01 08:31:29 +0000 +++ lisp/view.el 2012-03-16 01:40:20 +0000 @@ -309,7 +309,11 @@ Do not set EXIT-ACTION to `kill-buffer' when BUFFER visits a file: Users may suspend viewing in order to modify the buffer. Exiting View mode will then discard the user's edits. Setting -EXIT-ACTION to `kill-buffer-if-not-modified' avoids this." +EXIT-ACTION to `kill-buffer-if-not-modified' avoids this. + +This function does not enable View mode if the buffer's major-mode +has a `special' mode-class, because such modes usually have their +own View-like bindings." (interactive "bView buffer: ") (switch-to-buffer buffer) (if (eq (get major-mode 'mode-class) 'special) @@ -331,7 +335,11 @@ Optional argument EXIT-ACTION is either nil or a function with buffer as argument. This function is called when finished viewing buffer. Use -this argument instead of explicitly setting `view-exit-action'." +this argument instead of explicitly setting `view-exit-action'. + +This function does not enable View mode if the buffer's major-mode +has a `special' mode-class, because such modes usually have their +own View-like bindings." (interactive "bIn other window view buffer:\nP") (let ((pop-up-windows t)) (pop-to-buffer buffer t)) @@ -354,7 +362,11 @@ Optional argument EXIT-ACTION is either nil or a function with buffer as argument. This function is called when finished viewing buffer. Use -this argument instead of explicitly setting `view-exit-action'." +this argument instead of explicitly setting `view-exit-action'. + +This function does not enable View mode if the buffer's major-mode +has a `special' mode-class, because such modes usually have their +own View-like bindings." (interactive "bView buffer in other frame: \nP") (let ((pop-up-frames t)) (pop-to-buffer buffer t)) ------------------------------------------------------------ revno: 107610 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-03-15 21:27:23 -0400 message: eval-after-load fix for bug#10946 * lisp/subr.el (eval-after-load): If named feature is provided not from a file, run after-load forms. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-16 01:10:46 +0000 +++ lisp/ChangeLog 2012-03-16 01:27:23 +0000 @@ -1,5 +1,8 @@ 2012-03-16 Glenn Morris + * subr.el (eval-after-load): If named feature is provided not from + a file, run after-load forms. (Bug#10946) + * calendar/calendar.el (calendar-insert-at-column): Handle non-unit-width characters a bit better. (Bug#10978) === modified file 'lisp/subr.el' --- lisp/subr.el 2012-03-11 16:16:50 +0000 +++ lisp/subr.el 2012-03-16 01:27:23 +0000 @@ -1785,6 +1785,8 @@ Alternatively, FILE can be a feature (i.e. a symbol), in which case FORM is evaluated at the end of any file that `provide's this feature. +If the feature is provided when evaluating code not associated with a +file, FORM is evaluated immediately after the provide statement. Usually FILE is just a library name like \"font-lock\" or a feature name like 'font-lock. @@ -1814,14 +1816,16 @@ ;; make sure that `form' is really run "after-load" in case the provide ;; call happens early. (setq form - `(when load-file-name - (let ((fun (make-symbol "eval-after-load-helper"))) - (fset fun `(lambda (file) - (if (not (equal file ',load-file-name)) - nil - (remove-hook 'after-load-functions ',fun) - ,',form))) - (add-hook 'after-load-functions fun))))) + `(if load-file-name + (let ((fun (make-symbol "eval-after-load-helper"))) + (fset fun `(lambda (file) + (if (not (equal file ',load-file-name)) + nil + (remove-hook 'after-load-functions ',fun) + ,',form))) + (add-hook 'after-load-functions fun)) + ;; Not being provided from a file, run form right now. + ,form))) ;; Add FORM to the element unless it's already there. (unless (member form (cdr elt)) (nconc elt (purecopy (list form))))))) ------------------------------------------------------------ revno: 107609 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-03-15 21:10:46 -0400 message: calendar-insert-at-column small fix for bug#10978 * lisp/calendar/calendar.el (calendar-insert-at-column): Handle non-unit-width characters a bit better. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-15 08:00:43 +0000 +++ lisp/ChangeLog 2012-03-16 01:10:46 +0000 @@ -1,3 +1,8 @@ +2012-03-16 Glenn Morris + + * calendar/calendar.el (calendar-insert-at-column): + Handle non-unit-width characters a bit better. (Bug#10978) + 2012-03-15 Chong Yidong * emacs-lisp/ring.el (ring-extend): New function. === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2012-03-13 17:56:31 +0000 +++ lisp/calendar/calendar.el 2012-03-16 01:10:46 +0000 @@ -1424,16 +1424,24 @@ "Move to column INDENT, adding spaces as needed. Inserts STRING so that it ends at INDENT. STRING is either a literal string, or a sexp to evaluate to return such. Truncates -STRING to length TRUNCATE, ensure a trailing space." +STRING to length TRUNCATE, and ensures a trailing space." (if (not (ignore-errors (stringp (setq string (eval string))))) (calendar-move-to-column indent) - (if (> (length string) truncate) - (setq string (substring string 0 truncate))) + (if (> (string-width string) truncate) + (setq string (truncate-string-to-width string truncate))) (or (string-match " $" string) - (if (= (length string) truncate) - (aset string (1- truncate) ?\s) - (setq string (concat string " ")))) - (calendar-move-to-column (- indent (length string))) + (setq string (concat (if (= (string-width string) truncate) + (substring string 0 -1) + string) + ;; Avoid inserting text properties unless + ;; we have to (ie, non-unit-width chars). + ;; This is by no means essential. + (if (= (string-width string) (length string)) + " " + ;; Cribbed from buff-menu.el. + (propertize + " " 'display `(space :align-to ,indent)))))) + (calendar-move-to-column (- indent (string-width string))) (insert string))) (defun calendar-generate-month (month year indent) ------------------------------------------------------------ revno: 107608 committer: Glenn Morris branch nick: trunk timestamp: Thu 2012-03-15 20:57:00 -0400 message: NEWS diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-03-13 16:15:51 +0000 +++ etc/NEWS 2012-03-16 00:57:00 +0000 @@ -469,6 +469,11 @@ This is handy for minibuffer-only frames, and is also used for the feature where mouse-1 pops up *Messages*"', which can now easily be changed. +--- +** Minibuffers set `truncate-lines' to nil. +If you want to change the value to something else, you could use +for example minibuffer-setup-hook. + * Editing Changes in Emacs 24.1 ------------------------------------------------------------ revno: 107607 author: Dani Moncayo committer: Chong Yidong branch nick: trunk timestamp: Thu 2012-03-15 16:33:42 +0800 message: * doc/emacs/dired.texi (Shell Commands in Dired): Fix typo. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-03-04 06:50:18 +0000 +++ doc/emacs/ChangeLog 2012-03-15 08:33:42 +0000 @@ -1,3 +1,7 @@ +2012-03-15 Dani Moncayo (tiny change) + + * dired.texi (Shell Commands in Dired): Fix typo. + 2012-03-04 Chong Yidong * killing.texi (Clipboard): Document clipboard manager. === modified file 'doc/emacs/dired.texi' --- doc/emacs/dired.texi 2012-02-29 08:05:16 +0000 +++ doc/emacs/dired.texi 2012-03-15 08:33:42 +0000 @@ -823,9 +823,9 @@ @item If the command string contains neither @samp{*} nor @samp{?}, Emacs -runs the shell command once for each file, adding the file name is -added at the end. For example, @kbd{! uudecode @key{RET}} runs -@code{uudecode} on each file. +runs the shell command once for each file, adding the file name at the +end. For example, @kbd{! uudecode @key{RET}} runs @code{uudecode} on +each file. @end itemize To iterate over the file names in a more complicated fashion, use an ------------------------------------------------------------ revno: 107606 fixes bug(s): http://debbugs.gnu.org/11019 committer: Chong Yidong branch nick: trunk timestamp: Thu 2012-03-15 16:00:43 +0800 message: Fix ring extension code in ring.el, and tweak comint-input-ring handling. * lisp/emacs-lisp/ring.el (ring-extend): New function. (ring-insert+extend): Extend the ring correctly. * lisp/comint.el (comint-read-input-ring) (comint-add-to-input-history): Grow comint-input-ring lazily. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-15 03:09:26 +0000 +++ lisp/ChangeLog 2012-03-15 08:00:43 +0000 @@ -1,3 +1,11 @@ +2012-03-15 Chong Yidong + + * emacs-lisp/ring.el (ring-extend): New function. + (ring-insert+extend): Extend the ring correctly (Bug#11019). + + * comint.el (comint-read-input-ring) + (comint-add-to-input-history): Grow comint-input-ring lazily. + 2012-03-15 Stefan Monnier * progmodes/perl-mode.el (perl-syntax-propertize-special-constructs): === modified file 'lisp/comint.el' --- lisp/comint.el 2012-02-19 13:59:42 +0000 +++ lisp/comint.el 2012-03-15 08:00:43 +0000 @@ -922,15 +922,18 @@ (t (let* ((file comint-input-ring-file-name) (count 0) - (size comint-input-ring-size) - (ring (make-ring size))) + ;; Some users set HISTSIZE or `comint-input-ring-size' + ;; to huge numbers. Don't allocate a huge ring right + ;; away; there might not be that much history. + (ring-size (min 1500 comint-input-ring-size)) + (ring (make-ring ring-size))) (with-temp-buffer (insert-file-contents file) ;; Save restriction in case file is already visited... ;; Watch for those date stamps in history files! (goto-char (point-max)) (let (start end history) - (while (and (< count size) + (while (and (< count comint-input-ring-size) (re-search-backward comint-input-ring-separator nil t) (setq end (match-beginning 0))) @@ -941,15 +944,18 @@ (point-min))) (setq history (buffer-substring start end)) (goto-char start) - (if (and (not (string-match comint-input-history-ignore - history)) - (or (null comint-input-ignoredups) - (ring-empty-p ring) - (not (string-equal (ring-ref ring 0) - history)))) - (progn - (ring-insert-at-beginning ring history) - (setq count (1+ count))))))) + (when (and (not (string-match comint-input-history-ignore + history)) + (or (null comint-input-ignoredups) + (ring-empty-p ring) + (not (string-equal (ring-ref ring 0) + history)))) + (when (= count ring-size) + (ring-extend ring (min (- comint-input-ring-size ring-size) + ring-size)) + (setq ring-size (ring-size ring))) + (ring-insert-at-beginning ring history) + (setq count (1+ count)))))) (setq comint-input-ring ring comint-input-ring-index nil))))) @@ -1691,13 +1697,18 @@ (defun comint-add-to-input-history (cmd) "Add CMD to the input history. Ignore duplicates if `comint-input-ignoredups' is non-nil." - (if (and (funcall comint-input-filter cmd) - (or (null comint-input-ignoredups) - (not (ring-p comint-input-ring)) - (ring-empty-p comint-input-ring) - (not (string-equal (ring-ref comint-input-ring 0) - cmd)))) - (ring-insert comint-input-ring cmd))) + (when (and (funcall comint-input-filter cmd) + (or (null comint-input-ignoredups) + (not (ring-p comint-input-ring)) + (ring-empty-p comint-input-ring) + (not (string-equal (ring-ref comint-input-ring 0) cmd)))) + ;; If `comint-input-ring' is full, maybe grow it. + (let ((size (ring-size comint-input-ring))) + (and (= size (ring-length comint-input-ring)) + (< size comint-input-ring-size) + (ring-extend comint-input-ring + (min size (- comint-input-ring-size size))))) + (ring-insert comint-input-ring cmd))) (defun comint-send-input (&optional no-newline artificial) "Send input to process. === modified file 'lisp/emacs-lisp/ring.el' --- lisp/emacs-lisp/ring.el 2012-01-19 07:21:25 +0000 +++ lisp/emacs-lisp/ring.el 2012-03-15 08:00:43 +0000 @@ -185,26 +185,31 @@ (unless curr-index (error "Item is not in the ring: `%s'" item)) (ring-ref ring (ring-minus1 curr-index (ring-length ring))))) +(defun ring-extend (ring x) + "Increase the size of RING by X." + (when (and (integerp x) (> x 0)) + (let* ((hd (car ring)) + (length (ring-length ring)) + (size (ring-size ring)) + (old-vec (cddr ring)) + (new-vec (make-vector (+ size x) nil))) + (setcdr ring (cons length new-vec)) + ;; If the ring is wrapped, the existing elements must be written + ;; out in the right order. + (dotimes (j length) + (aset new-vec j (aref old-vec (mod (+ hd j) size)))) + (setcar ring 0)))) + (defun ring-insert+extend (ring item &optional grow-p) "Like `ring-insert', but if GROW-P is non-nil, then enlarge ring. Insert onto ring RING the item ITEM, as the newest (last) item. If the ring is full, behavior depends on GROW-P: If GROW-P is non-nil, enlarge the ring to accommodate the new item. If GROW-P is nil, dump the oldest item to make room for the new." - (let* ((vec (cddr ring)) - (veclen (length vec)) - (hd (car ring)) - (ringlen (ring-length ring))) - (prog1 - (cond ((and grow-p (= ringlen veclen)) ; Full ring. Enlarge it. - (setq veclen (1+ veclen)) - (setcdr ring (cons (setq ringlen (1+ ringlen)) - (setq vec (vconcat vec (vector item))))) - (setcar ring hd)) - (t (aset vec (mod (+ hd ringlen) veclen) item))) - (if (= ringlen veclen) - (setcar ring (ring-plus1 hd veclen)) - (setcar (cdr ring) (1+ ringlen)))))) + (and grow-p + (= (ring-length ring) (ring-size ring)) + (ring-extend ring 1)) + (ring-insert ring item)) (defun ring-remove+insert+extend (ring item &optional grow-p) "`ring-remove' ITEM from RING, then `ring-insert+extend' it. ------------------------------------------------------------ revno: 107605 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11014 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-14 23:09:26 -0400 message: * lisp/progmodes/perl-mode.el (perl-syntax-propertize-special-constructs): Fix up parsing of multiline twoarg non-paired elements. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-15 01:38:40 +0000 +++ lisp/ChangeLog 2012-03-15 03:09:26 +0000 @@ -1,5 +1,8 @@ 2012-03-15 Stefan Monnier + * progmodes/perl-mode.el (perl-syntax-propertize-special-constructs): + Fix up parsing of multiline twoarg non-paired elements (bug#11014). + * imenu.el: Fix multiple inheritance breakage (bug#9199). (imenu-add-to-menubar): Don't add a redundant index. (imenu-update-menubar): Handle a dynamically composed keymap. === modified file 'lisp/progmodes/perl-mode.el' --- lisp/progmodes/perl-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/perl-mode.el 2012-03-15 03:09:26 +0000 @@ -388,7 +388,11 @@ ;; In case of error, make sure we don't move backward. (scan-error (goto-char startpos) nil)) (not (or (nth 8 (parse-partial-sexp - (point) limit nil nil state 'syntax-table)) + ;; Since we don't know if point is within + ;; the first or the scond arg, we have to + ;; start from the beginning. + (if twoargs (1+ (nth 8 state)) (point)) + limit nil nil state 'syntax-table)) ;; If we have a self-paired opener and a twoargs ;; command, the form is s/../../ so we have to skip ;; a second time.