GNU bug report logs - #4354
23.0.60; delphi-mode: TAB should indent region in Transient Mark mode (with patch)

Previous Next

Package: emacs;

Reported by: Simon South <ssouth <at> slowcomputing.org>

Date: Sun, 6 Sep 2009 04:20:03 UTC

Severity: normal

Done: Simon South <ssouth <at> slowcomputing.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4354 in the body.
You can then email your comments to 4354 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4354; Package emacs. (Sun, 06 Sep 2009 04:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simon South <ssouth <at> slowcomputing.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 04:20:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Simon South <ssouth <at> slowcomputing.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; delphi-mode: TAB should indent region in Transient Mark mode (with patch)
Date: Sun, 06 Sep 2009 00:13:32 -0400
The patch below makes delphi-mode indent the region when the TAB key
is pressed, whenever Transient Mark mode is enabled and the region is
active.  (This became standard behaviour with Emacs 23.1 but wasn't
automatically reflected by delphi-mode as it defines its own TAB-key
binding.)

I've tested this with different combinations of transient-mark-mode,
delphi-tab-always-indents and delphi-newline-always-indents and it
appears to work fine.

Changes:

(delphi-tab): Indent region when Transient Mark mode is enabled and
region is active; otherwise indent or insert TAB as usual.
(delphi-mode): Update description of TAB-key binding.


Index: lisp/progmodes/delphi.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/delphi.el,v
retrieving revision 3.33
diff -c -r3.33 delphi.el
*** lisp/progmodes/delphi.el	5 Jan 2009 03:23:27 -0000	3.33
--- lisp/progmodes/delphi.el	6 Sep 2009 03:33:09 -0000
***************
*** 1652,1665 ****
  
  
  (defun delphi-tab ()
!   "Indent the current line or insert a TAB, depending on the value of
! `delphi-tab-always-indents' and the current line position."
    (interactive)
!   (if (or delphi-tab-always-indents ; We are always indenting
!           ;; Or we are before the first non-space character on the line.
!           (save-excursion (skip-chars-backward delphi-space-chars) (bolp)))
!       (delphi-indent-line)
!     (insert "\t")))
  
  
  (defun delphi-is-directory (path)
--- 1652,1674 ----
  
  
  (defun delphi-tab ()
!   "Indent the region, when Transient Mark mode is enabled and the region is
! active. Otherwise, indent the current line or insert a TAB, depending on the
! value of `delphi-tab-always-indents' and the current line position."
    (interactive)
!   (cond ((use-region-p)
!          ;; If Transient Mark mode is enabled and the region is active, indent
!          ;; the entire region.
!          (indent-region (region-beginning) (region-end)))
!         ((or delphi-tab-always-indents
!              (save-excursion (skip-chars-backward delphi-space-chars) (bolp)))
!          ;; Otherwise, if we are configured always to indent (regardless of the
!          ;; point's position in the line) or we are before the first non-space
!          ;; character on the line, indent the line.
!          (delphi-indent-line))
!         (t
!          ;; Otherwise, insert a tab character.
!          (insert "\t"))))
  
  
  (defun delphi-is-directory (path)
***************
*** 1935,1941 ****
  ;;;###autoload
  (defun delphi-mode (&optional skip-initial-parsing)
    "Major mode for editing Delphi code. \\<delphi-mode-map>
! \\[delphi-tab]\t- Indents the current line for Delphi code.
  \\[delphi-find-unit]\t- Search for a Delphi source file.
  \\[delphi-fill-comment]\t- Fill the current comment.
  \\[delphi-new-comment-line]\t- If in a // comment, do a new comment line.
--- 1944,1951 ----
  ;;;###autoload
  (defun delphi-mode (&optional skip-initial-parsing)
    "Major mode for editing Delphi code. \\<delphi-mode-map>
! \\[delphi-tab]\t- Indents the current line (or region, if Transient Mark mode
! \t  is enabled and the region is active) of Delphi code.
  \\[delphi-find-unit]\t- Search for a Delphi source file.
  \\[delphi-fill-comment]\t- Fill the current comment.
  \\[delphi-new-comment-line]\t- If in a // comment, do a new comment line.



Reply sent to Simon South <ssouth <at> slowcomputing.org>:
You have taken responsibility. (Fri, 11 Sep 2009 02:50:04 GMT) Full text and rfc822 format available.

Notification sent to Simon South <ssouth <at> slowcomputing.org>:
bug acknowledged by developer. (Fri, 11 Sep 2009 02:50:04 GMT) Full text and rfc822 format available.

Message #10 received at 4354-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Simon South <ssouth <at> slowcomputing.org>
To: 4354-done <at> debbugs.gnu.org
Subject: Re: bug#4354: Acknowledgement (23.0.60; delphi-mode: TAB should
 indent region in Transient Mark mode (with patch))
Date: Thu, 10 Sep 2009 22:42:06 -0400
Checked in (revision 3.34).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 09 Oct 2009 14:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 316 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.