[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114653: * lisp/progmodes/sh-script.el (sh-mark-line
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r114653: * lisp/progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent): |
Date: |
Sun, 13 Oct 2013 23:22:01 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114653
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2013-10-13 16:21:56 -0700
message:
* lisp/progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent):
Occur buffers are read-only. http://bugs.debian.org/720775
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/sh-script.el shscript.el-20091113204419-o5vbwnq5f7feedwu-727
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-10-13 23:01:20 +0000
+++ b/lisp/ChangeLog 2013-10-13 23:21:56 +0000
@@ -1,5 +1,8 @@
2013-10-13 Glenn Morris <address@hidden>
+ * progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent):
+ Occur buffers are read-only. http://bugs.debian.org/720775
+
* emacs-lisp/authors.el (authors-fixed-entries):
Comment out old alpha stuff.
=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el 2013-10-11 03:28:31 +0000
+++ b/lisp/progmodes/sh-script.el 2013-10-13 23:21:56 +0000
@@ -3438,26 +3438,23 @@
)
(goto-char (point-max))
(setq start (point))
- (insert line)
- (if occur-point
- (setq occur-point (point)))
- (insert message)
- (if point
- (add-text-properties
- start (point)
- '(mouse-face highlight
- help-echo "mouse-2: go to the line where I learned this")))
- (insert "\n")
- (if point
- (progn
- (put-text-property start (point) 'occur-target m1)
- (if occur-point
- (put-text-property start occur-point
- 'occur-match t))
- ))
- )))
-
-
+ (let ((inhibit-read-only t))
+ (insert line)
+ (if occur-point
+ (setq occur-point (point)))
+ (insert message)
+ (if point
+ (add-text-properties
+ start (point)
+ '(mouse-face highlight
+ help-echo "mouse-2: go to the line where I learned
this")))
+ (insert "\n")
+ (when point
+ (put-text-property start (point) 'occur-target m1)
+ (if occur-point
+ (put-text-property start occur-point
+ 'occur-match t))
+ )))))
;; Is this really worth having?
(defvar sh-learned-buffer-hook nil
@@ -3689,15 +3686,15 @@
(nth 2 learned-var) out-buffer)))
(with-current-buffer out-buffer
(goto-char (point-min))
- (insert
- (format "Indentation values for buffer %s.\n" name)
- (format "%d indentation variable%s different values%s\n\n"
- num-diffs
- (if (= num-diffs 1)
- " has" "s have")
- (if (zerop num-diffs)
- "." ":"))
- )))
+ (let ((inhibit-read-only t))
+ (insert
+ (format "Indentation values for buffer %s.\n" name)
+ (format "%d indentation variable%s different values%s\n\n"
+ num-diffs
+ (if (= num-diffs 1)
+ " has" "s have")
+ (if (zerop num-diffs)
+ "." ":"))))))
;; Are abnormal hooks considered bad form?
(run-hook-with-args 'sh-learned-buffer-hook learned-var-list)
(and (called-interactively-p 'any)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114653: * lisp/progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent):,
Glenn Morris <=