aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2012-08-28 09:01:59 -0700
committerGlenn Morris2012-08-28 09:01:59 -0700
commiteada086196ccb005ded188ac2e58d41f3682a125 (patch)
treef195bbf91841ea4e85d465307d62c709924892c2 /lisp
parent37b9743e79bac608a45fade0744248446aaa0a33 (diff)
parent806f0cc7302bd1dacfad8366f67a97e9bfbc8fc9 (diff)
downloademacs-eada086196ccb005ded188ac2e58d41f3682a125.tar.gz
emacs-eada086196ccb005ded188ac2e58d41f3682a125.zip
Merge from emacs-24; up to 2012-05-04T19:17:01Z!monnier@iro.umontreal.ca
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog33
-rw-r--r--lisp/files.el3
-rw-r--r--lisp/net/rcirc.el40
-rw-r--r--lisp/progmodes/hideif.el2
-rw-r--r--lisp/progmodes/hideshow.el2
-rw-r--r--lisp/progmodes/sh-script.el30
-rw-r--r--lisp/skeleton.el2
7 files changed, 75 insertions, 37 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3dd2b7b1272..5d05f3b8f3a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,35 @@
12012-08-28 Leo Liu <sdl.web@gmail.com>
2
3 * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to
4 completion-at-point. (Bug#12220)
5
6 * skeleton.el (skeleton-untabify): Change to nil (bug#12223).
7
8 * progmodes/sh-script.el (sh-indent-comment): Change to t (bug#12267).
9
102012-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
11
12 * files.el (safe-local-eval-forms): Fix before-save-hook entry to
13 be buffer-local; add delete-trailing-whitespace (bug#12259).
14
152012-08-28 Jeremy Moore <jmoore@ieee.org> (tiny change)
16
17 * progmodes/hideif.el (hif-compress-define-list):
18 Fix typo. (Bug#11951)
19
202012-08-28 Dan Nicolaescu <dann@gnu.org>
21
22 * progmodes/hideshow.el (hs-block-end-regexp): Restore lost
23 buffer local setting.
24
25 * net/rcirc.el (rcirc-split-message): Fix for buffer-local
26 rcirc-encode-coding-system.
27
282012-08-28 Leo Liu <sdl.web@gmail.com>
29
30 * net/rcirc.el (rcirc-split-message): New function.
31 (rcirc-send-message): Use it. (Bug#12051)
32
12012-08-28 Juri Linkov <juri@jurta.org> 332012-08-28 Juri Linkov <juri@jurta.org>
2 34
3 * info.el (Info-fontify-node): Hide empty lines at the end of 35 * info.el (Info-fontify-node): Hide empty lines at the end of
@@ -566,6 +598,7 @@
566 * files.el (hack-local-variables-filter): If an eval: form is not 598 * files.el (hack-local-variables-filter): If an eval: form is not
567 known to be safe, and enable-local-variables is :safe, then ignore 599 known to be safe, and enable-local-variables is :safe, then ignore
568 the form totally, as is done for non-eval forms. (Bug#12155) 600 the form totally, as is done for non-eval forms. (Bug#12155)
601 This is CVE-2012-3479.
569 602
5702012-08-10 Stefan Monnier <monnier@iro.umontreal.ca> 6032012-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
571 604
diff --git a/lisp/files.el b/lisp/files.el
index 5caa4681884..fecb02020e6 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2837,7 +2837,8 @@ symbol and VAL is a value that is considered safe."
2837 ;; This should be here at least as long as Emacs supports write-file-hooks. 2837 ;; This should be here at least as long as Emacs supports write-file-hooks.
2838 '((add-hook 'write-file-hooks 'time-stamp) 2838 '((add-hook 'write-file-hooks 'time-stamp)
2839 (add-hook 'write-file-functions 'time-stamp) 2839 (add-hook 'write-file-functions 'time-stamp)
2840 (add-hook 'before-save-hook 'time-stamp)) 2840 (add-hook 'before-save-hook 'time-stamp nil t)
2841 (add-hook 'before-save-hook 'delete-trailing-whitespace nil t))
2841 "Expressions that are considered safe in an `eval:' local variable. 2842 "Expressions that are considered safe in an `eval:' local variable.
2842Add expressions to this list if you want Emacs to evaluate them, when 2843Add expressions to this list if you want Emacs to evaluate them, when
2843they appear in an `eval' local variable specification, without first 2844they appear in an `eval' local variable specification, without first
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 27cf50f06ca..dd345630b9b 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -802,26 +802,36 @@ With no argument or nil as argument, use the current buffer."
802(defvar rcirc-max-message-length 420 802(defvar rcirc-max-message-length 420
803 "Messages longer than this value will be split.") 803 "Messages longer than this value will be split.")
804 804
805(defun rcirc-split-message (message)
806 "Split MESSAGE into chunks within `rcirc-max-message-length'."
807 ;; `rcirc-encode-coding-system' can have buffer-local value.
808 (let ((encoding rcirc-encode-coding-system))
809 (with-temp-buffer
810 (insert message)
811 (goto-char (point-min))
812 (let (result)
813 (while (not (eobp))
814 (goto-char (or (byte-to-position rcirc-max-message-length)
815 (point-max)))
816 ;; max message length is 512 including CRLF
817 (while (and (not (bobp))
818 (> (length (encode-coding-region
819 (point-min) (point) encoding t))
820 rcirc-max-message-length))
821 (forward-char -1))
822 (push (delete-and-extract-region (point-min) (point)) result))
823 (nreverse result)))))
824
805(defun rcirc-send-message (process target message &optional noticep silent) 825(defun rcirc-send-message (process target message &optional noticep silent)
806 "Send TARGET associated with PROCESS a privmsg with text MESSAGE. 826 "Send TARGET associated with PROCESS a privmsg with text MESSAGE.
807If NOTICEP is non-nil, send a notice instead of privmsg. 827If NOTICEP is non-nil, send a notice instead of privmsg.
808If SILENT is non-nil, do not print the message in any irc buffer." 828If SILENT is non-nil, do not print the message in any irc buffer."
809 ;; max message length is 512 including CRLF 829 (let ((response (if noticep "NOTICE" "PRIVMSG")))
810 (let* ((response (if noticep "NOTICE" "PRIVMSG"))
811 (oversize (> (length message) rcirc-max-message-length))
812 (text (if oversize
813 (substring message 0 rcirc-max-message-length)
814 message))
815 (text (if (string= text "")
816 " "
817 text))
818 (more (if oversize
819 (substring message rcirc-max-message-length))))
820 (rcirc-get-buffer-create process target) 830 (rcirc-get-buffer-create process target)
821 (rcirc-send-string process (concat response " " target " :" text)) 831 (dolist (msg (rcirc-split-message message))
822 (unless silent 832 (rcirc-send-string process (concat response " " target " :" msg))
823 (rcirc-print process (rcirc-nick process) response target text)) 833 (unless silent
824 (when more (rcirc-send-message process target more noticep)))) 834 (rcirc-print process (rcirc-nick process) response target msg)))))
825 835
826(defvar rcirc-input-ring nil) 836(defvar rcirc-input-ring nil)
827(defvar rcirc-input-ring-index 0) 837(defvar rcirc-input-ring-index 0)
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 3e3d7adc0b6..4b77c6dab1a 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1003,7 +1003,7 @@ Return as (TOP . BOTTOM) the extent of ifdef block."
1003 "Compress the define list ENV into a list of defined symbols only." 1003 "Compress the define list ENV into a list of defined symbols only."
1004 (let ((new-defs nil)) 1004 (let ((new-defs nil))
1005 (dolist (def env new-defs) 1005 (dolist (def env new-defs)
1006 (if (hif-lookup (car def)) (push (car env) new-defs))))) 1006 (if (hif-lookup (car def)) (push (car def) new-defs)))))
1007 1007
1008(defun hide-ifdef-set-define-alist (name) 1008(defun hide-ifdef-set-define-alist (name)
1009 "Set the association for NAME to `hide-ifdef-env'." 1009 "Set the association for NAME to `hide-ifdef-env'."
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index b6d2b5e319c..233b9a5212e 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -408,6 +408,8 @@ element (using `match-beginning') before calling `hs-forward-sexp-func'.")
408 408
409(defvar hs-block-end-regexp nil 409(defvar hs-block-end-regexp nil
410 "Regexp for end of block.") 410 "Regexp for end of block.")
411(make-variable-buffer-local 'hs-block-end-regexp)
412
411 413
412(defvar hs-forward-sexp-func 'forward-sexp 414(defvar hs-forward-sexp-func 'forward-sexp
413 "Function used to do a `forward-sexp'. 415 "Function used to do a `forward-sexp'.
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index a6089aabb04..a422462775d 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -202,6 +202,11 @@
202 (require 'comint)) 202 (require 'comint))
203(require 'executable) 203(require 'executable)
204 204
205(autoload 'comint-completion-at-point "comint")
206(autoload 'comint-filename-completion "comint")
207(autoload 'shell-command-completion "shell")
208(autoload 'shell-environment-variable-completion "shell")
209
205(defvar font-lock-comment-face) 210(defvar font-lock-comment-face)
206(defvar font-lock-set-defaults) 211(defvar font-lock-set-defaults)
207(defvar font-lock-string-face) 212(defvar font-lock-string-face)
@@ -470,7 +475,6 @@ This is buffer-local in every such buffer.")
470 (define-key map "\C-\M-x" 'sh-execute-region) 475 (define-key map "\C-\M-x" 'sh-execute-region)
471 (define-key map "\C-c\C-x" 'executable-interpret) 476 (define-key map "\C-c\C-x" 'executable-interpret)
472 477
473 (define-key map [remap complete-tag] 'comint-dynamic-complete)
474 (define-key map [remap delete-backward-char] 478 (define-key map [remap delete-backward-char]
475 'backward-delete-char-untabify) 479 'backward-delete-char-untabify)
476 (define-key map "\C-c:" 'sh-set-shell) 480 (define-key map "\C-c:" 'sh-set-shell)
@@ -553,9 +557,9 @@ This is buffer-local in every such buffer.")
553 "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.") 557 "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.")
554 558
555(defcustom sh-dynamic-complete-functions 559(defcustom sh-dynamic-complete-functions
556 '(shell-dynamic-complete-environment-variable 560 '(shell-environment-variable-completion
557 shell-dynamic-complete-command 561 shell-command-completion
558 comint-dynamic-complete-filename) 562 comint-filename-completion)
559 "Functions for doing TAB dynamic completion." 563 "Functions for doing TAB dynamic completion."
560 :type '(repeat function) 564 :type '(repeat function)
561 :group 'sh-script) 565 :group 'sh-script)
@@ -1187,7 +1191,7 @@ This value is used for the `+' and `-' symbols in an indentation variable."
1187 :group 'sh-indentation) 1191 :group 'sh-indentation)
1188(put 'sh-basic-offset 'safe-local-variable 'integerp) 1192(put 'sh-basic-offset 'safe-local-variable 'integerp)
1189 1193
1190(defcustom sh-indent-comment nil 1194(defcustom sh-indent-comment t
1191 "How a comment line is to be indented. 1195 "How a comment line is to be indented.
1192nil means leave it as it is; 1196nil means leave it as it is;
1193t means indent it as a normal line, aligning it to previous non-blank 1197t means indent it as a normal line, aligning it to previous non-blank
@@ -1198,6 +1202,7 @@ a number means align to that column, e.g. 0 means first column."
1198 (const :tag "Indent as a normal line." t) 1202 (const :tag "Indent as a normal line." t)
1199 (integer :menu-tag "Indent to this col (0 means first col)." 1203 (integer :menu-tag "Indent to this col (0 means first col)."
1200 :tag "Indent to column number.") ) 1204 :tag "Indent to column number.") )
1205 :version "24.3"
1201 :group 'sh-indentation) 1206 :group 'sh-indentation)
1202 1207
1203 1208
@@ -1485,6 +1490,7 @@ with your script for an edit-interpret-debug cycle."
1485 (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table) 1490 (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table)
1486 (set (make-local-variable 'comint-dynamic-complete-functions) 1491 (set (make-local-variable 'comint-dynamic-complete-functions)
1487 sh-dynamic-complete-functions) 1492 sh-dynamic-complete-functions)
1493 (add-hook 'completion-at-point-functions 'comint-completion-at-point nil t)
1488 ;; we can't look if previous line ended with `\' 1494 ;; we can't look if previous line ended with `\'
1489 (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*") 1495 (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*")
1490 (set (make-local-variable 'imenu-case-fold-search) nil) 1496 (set (make-local-variable 'imenu-case-fold-search) nil)
@@ -4109,20 +4115,6 @@ The document is bounded by `sh-here-document-word'."
4109 4115
4110;; various other commands 4116;; various other commands
4111 4117
4112(autoload 'comint-dynamic-complete "comint"
4113 "Dynamically perform completion at point." t)
4114
4115(autoload 'shell-dynamic-complete-command "shell"
4116 "Dynamically complete the command at point." t)
4117
4118(autoload 'comint-dynamic-complete-filename "comint"
4119 "Dynamically complete the filename at point." t)
4120
4121(autoload 'shell-dynamic-complete-environment-variable "shell"
4122 "Dynamically complete the environment variable at point." t)
4123
4124
4125
4126(defun sh-beginning-of-command () 4118(defun sh-beginning-of-command ()
4127 ;; FIXME: Redefine using SMIE. 4119 ;; FIXME: Redefine using SMIE.
4128 "Move point to successive beginnings of commands." 4120 "Move point to successive beginnings of commands."
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 34d69a74369..b6e1d0a58f2 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -77,7 +77,7 @@ The variables `v1' and `v2' are still set when calling this.")
77 "Function for transforming a skeleton proxy's aliases' variable value.") 77 "Function for transforming a skeleton proxy's aliases' variable value.")
78(defvaralias 'skeleton-filter 'skeleton-filter-function) 78(defvaralias 'skeleton-filter 'skeleton-filter-function)
79 79
80(defvar skeleton-untabify t 80(defvar skeleton-untabify nil ; bug#12223
81 "When non-nil untabifies when deleting backwards with element -ARG.") 81 "When non-nil untabifies when deleting backwards with element -ARG.")
82 82
83(defvar skeleton-newline-indent-rigidly nil 83(defvar skeleton-newline-indent-rigidly nil