Your message dated Fri, 6 Jul 2012 16:43:19 +0100
with message-id
<capq4b8n+5zkqc3qpkrfpwhggxuuc9a5az1kgwy54unk0jq3...@mail.gmail.com>
and subject line Closing orphan/obsolete bugs (emacs21 with tag fixed-upstream)
has caused the Debian Bug report #82352,
regarding emacs20: backslash-region command for sh-mode
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
82352: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=82352
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: emacs20
Version: 20.7-2
Severity: wishlist
makefile-mode and c-mode define a "backslash-region" command, but
there is no such command for sh-mode. This patch adds one.
(I mostly just copied the relevant code over from c-mode.el, changing
"c-" to "sh-" where appropriate.)
- Jim Van Zandt
--- /usr/share/emacs/20.7/lisp/progmodes/sh-script.el Sat Jun 17 13:22:00 2000
+++ sh-script.el Sun Jan 14 20:31:37 2001
@@ -284,6 +284,7 @@
(define-key map "\C-c+" 'sh-add)
(define-key map "\C-\M-x" 'sh-execute-region)
(define-key map "\C-c\C-x" 'executable-interpret)
+ (define-key map "\C-c\C-\\" 'sh-backslash-region)
(define-key map "<" 'sh-maybe-here-document)
(define-key map "(" 'skeleton-pair-insert-maybe)
(define-key map "{" 'skeleton-pair-insert-maybe)
@@ -379,6 +380,12 @@
:group 'sh-script)
+(defcustom sh-backslash-column 48
+ "*Minimum column for end-of-line backslashes for line continuation."
+ :type 'integer
+ :group 'sh-script)
+
+
(defvar sh-header-marker nil
"When non-`nil' is the end of header for prepending by \\[sh-execute-region].
That command is also used for setting this variable.")
@@ -1524,6 +1531,71 @@
(interactive)
(if (re-search-forward sh-end-of-command nil t)
(goto-char (match-end 1))))
+
+(defun sh-backslash-region (from to delete-flag)
+ "Insert, align, or delete end-of-line backslashes on the lines in the region.
+With no argument, inserts backslashes and aligns existing backslashes.
+With an argument, deletes the backslashes.
+
+This function does not modify the last line of the region if the region ends
+right at the start of the following line; it does not modify blank lines
+at the start of the region. So you can put the region around an entire macro
+definition and conveniently use this command."
+ (interactive "r\nP")
+ (save-excursion
+ (goto-char from)
+ (let ((column sh-backslash-column)
+ (endmark (make-marker)))
+ (move-marker endmark to)
+ ;; Compute the smallest column number past the ends of all the lines.
+ (if (not delete-flag)
+ (while (< (point) to)
+ (end-of-line)
+ (if (= (preceding-char) ?\\)
+ (progn (forward-char -1)
+ (skip-chars-backward " \t")))
+ (setq column (max column (1+ (current-column))))
+ (forward-line 1)))
+ ;; Adjust upward to a tab column, if that doesn't push past the margin.
+ (if (> (% column tab-width) 0)
+ (let ((adjusted (* (/ (+ column tab-width -1) tab-width) tab-width)))
+ (if (< adjusted (window-width))
+ (setq column adjusted))))
+ ;; Don't modify blank lines at start of region.
+ (goto-char from)
+ (while (and (< (point) endmark) (eolp))
+ (forward-line 1))
+ ;; Add or remove backslashes on all the lines.
+ (while (and (< (point) endmark)
+ ;; Don't backslashify the last line
+ ;; if the region ends right at the start of the next line.
+ (save-excursion
+ (forward-line 1)
+ (< (point) endmark)))
+ (if (not delete-flag)
+ (sh-append-backslash column)
+ (sh-delete-backslash))
+ (forward-line 1))
+ (move-marker endmark nil))))
+
+(defun sh-append-backslash (column)
+ (end-of-line)
+ ;; Note that "\\\\" is needed to get one backslash.
+ (if (= (preceding-char) ?\\)
+ (progn (forward-char -1)
+ (delete-horizontal-space)
+ (indent-to column))
+ (indent-to column)
+ (insert "\\")))
+
+(defun sh-delete-backslash ()
+ (end-of-line)
+ (or (bolp)
+ (progn
+ (forward-char -1)
+ (if (looking-at "\\\\")
+ (delete-region (1+ (point))
+ (progn (skip-chars-backward " \t") (point)))))))
(provide 'sh-script)
-- System Information
Debian Release: 2.2
Kernel Version: Linux vanzandt 2.2.5 #8 Mon Jul 26 17:02:20 EDT 1999 i686
unknown
Versions of the packages emacs20 depends on:
ii emacsen-common 1.4.12 Common facilities for all emacsen.
ii libc6 2.1.3-10 GNU C Library: Shared libraries and Timezone
ii liblockfile1 1.01 Shared library with NFS-safe locking functio
ii libncurses5 5.0-6 Shared libraries for terminal handling
ii xlib6g 3.3.6-6 shared libraries required by X clients
--- End Message ---
--- Begin Message ---
Hello,
Thanks for your interest in improving Debian, and sorry that the bugs
were not fully resolved or closed in due time.
emacs21 packages have been removed from testing in 2009 [1], not
present even in the current stable. Consequently, these bugs are now
orphan (without maintainer assigned) so they probably will not be
attended/noticed further.
[1] http://packages.qa.debian.org/e/emacs21.html
The bugs deemed valid are going to be verified and reassigned, but the
current bugs that I'm closing now are very ancient (more than 10 years
sometimes) and marked as fixed-upstream years ago, with no recent
input, and are supposed to be fixed in emacs22 at the latest.
Please comment if you want think that some of the raised questions are
still pending and need to be addressed differently (e.g., reassigned
to other packages, etc.).
Cheers.
--- End Message ---