aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKenichi Handa2013-04-27 22:34:02 +0900
committerKenichi Handa2013-04-27 22:34:02 +0900
commit13d0e56fa3f73d3583b39409d98aefc30ea52daa (patch)
tree2ac0129ee112a3c2a662d25db50d5ca0afb8a672 /lisp
parent8bd722db81bcb303d6945b800c7ccb615a5474a5 (diff)
parent8beecaeda0d28bff0c4d3c2758bb938c656728b5 (diff)
downloademacs-13d0e56fa3f73d3583b39409d98aefc30ea52daa.tar.gz
emacs-13d0e56fa3f73d3583b39409d98aefc30ea52daa.zip
merge trunk
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog24
-rw-r--r--lisp/emacs-lisp/tabulated-list.el11
-rw-r--r--lisp/progmodes/octave.el33
-rw-r--r--lisp/textmodes/remember.el3
4 files changed, 56 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 340dc41a744..30c49c942c6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,21 @@
12013-04-26 Reuben Thomas <rrt@sc3d.org>
2
3 * textmodes/remember.el (remember-store-in-files): Document that
4 the file name format is passed to `format-time-string'.
5
62013-04-26 Leo Liu <sdl.web@gmail.com>
7
8 * progmodes/octave.el (octave-sync-function-file-names): New function.
9 (octave-mode): Use it in before-save-hook.
10
112013-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
12
13 * emacs-lisp/tabulated-list.el (tabulated-list-mode): Disable undo
14 (bug#14274).
15
16 * progmodes/octave.el (octave-smie-forward-token): Properly skip
17 \n and comment, even if it's not an implicit ; (bug#14218).
18
12013-04-26 Glenn Morris <rgm@gnu.org> 192013-04-26 Glenn Morris <rgm@gnu.org>
2 20
3 * subr.el (read-number): Once more use `read' rather than 21 * subr.el (read-number): Once more use `read' rather than
@@ -20,7 +38,7 @@
20 38
21 * progmodes/octave.el (octave-submit-bug-report): Obsolete. 39 * progmodes/octave.el (octave-submit-bug-report): Obsolete.
22 (octave-mode, inferior-octave-mode): Use setq-local. 40 (octave-mode, inferior-octave-mode): Use setq-local.
23 (octave-not-in-string-or-comment-p): Renamed to 41 (octave-not-in-string-or-comment-p): Rename to
24 octave-in-string-or-comment-p. 42 octave-in-string-or-comment-p.
25 (octave-in-comment-p, octave-in-string-p) 43 (octave-in-comment-p, octave-in-string-p)
26 (octave-in-string-or-comment-p): Replace defsubst with defun. 44 (octave-in-string-or-comment-p): Replace defsubst with defun.
@@ -36,8 +54,8 @@
36 54
372013-04-25 Leo Liu <sdl.web@gmail.com> 552013-04-25 Leo Liu <sdl.web@gmail.com>
38 56
39 * progmodes/octave.el (octave-completion-at-point-function): Make 57 * progmodes/octave.el (octave-completion-at-point-function):
40 use of inferior octave process. 58 Make use of inferior octave process.
41 (octave-initialize-completions): Remove. 59 (octave-initialize-completions): Remove.
42 (inferior-octave-completion-table): New function. 60 (inferior-octave-completion-table): New function.
43 (inferior-octave-completion-at-point): Use it. 61 (inferior-octave-completion-at-point): Use it.
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index da487e463e2..6dba423010f 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -519,12 +519,11 @@ printer is `tabulated-list-print-entry', but a mode that keeps
519data in an ewoc may instead specify a printer function (e.g., one 519data in an ewoc may instead specify a printer function (e.g., one
520that calls `ewoc-enter-last'), with `tabulated-list-print-entry' 520that calls `ewoc-enter-last'), with `tabulated-list-print-entry'
521as the ewoc pretty-printer." 521as the ewoc pretty-printer."
522 (setq truncate-lines t) 522 (setq-local truncate-lines t)
523 (setq buffer-read-only t) 523 (setq-local buffer-read-only t)
524 (set (make-local-variable 'revert-buffer-function) 524 (setq-local buffer-undo-list t)
525 'tabulated-list-revert) 525 (setq-local revert-buffer-function #'tabulated-list-revert)
526 (set (make-local-variable 'glyphless-char-display) 526 (setq-local glyphless-char-display tabulated-list-glyphless-char-display))
527 tabulated-list-glyphless-char-display))
528 527
529(put 'tabulated-list-mode 'mode-class 'special) 528(put 'tabulated-list-mode 'mode-class 'special)
530 529
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 640775bfe8b..f8b9e4f6fab 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -461,11 +461,12 @@ Non-nil means always go to the next Octave code line after sending."
461 (forward-comment 1)) 461 (forward-comment 1))
462 (cond 462 (cond
463 ((and (looking-at "$\\|[%#]") 463 ((and (looking-at "$\\|[%#]")
464 (not (smie-rule-bolp)) 464 ;; Ignore it if it's within parentheses or if the newline does not end
465 ;; Ignore it if it's within parentheses. 465 ;; some preceding text.
466 (prog1 (let ((ppss (syntax-ppss))) 466 (prog1 (and (not (smie-rule-bolp))
467 (not (and (nth 1 ppss) 467 (let ((ppss (syntax-ppss)))
468 (eq ?\( (char-after (nth 1 ppss)))))) 468 (not (and (nth 1 ppss)
469 (eq ?\( (char-after (nth 1 ppss)))))))
469 (forward-comment (point-max)))) 470 (forward-comment (point-max))))
470 ;; Why bother distinguishing \n and ;? 471 ;; Why bother distinguishing \n and ;?
471 ";") ;;"\n" 472 ";") ;;"\n"
@@ -625,6 +626,7 @@ including a reproducible test case and send the message."
625 626
626 (add-hook 'completion-at-point-functions 627 (add-hook 'completion-at-point-functions
627 'octave-completion-at-point-function nil t) 628 'octave-completion-at-point-function nil t)
629 (add-hook 'before-save-hook 'octave-sync-function-file-names nil t)
628 (setq-local beginning-of-defun-function 'octave-beginning-of-defun) 630 (setq-local beginning-of-defun-function 'octave-beginning-of-defun)
629 631
630 (easy-menu-add octave-mode-menu)) 632 (easy-menu-add octave-mode-menu))
@@ -1007,6 +1009,27 @@ directory and makes this the current buffer's default directory."
1007 nil 1009 nil
1008 (delete-horizontal-space) 1010 (delete-horizontal-space)
1009 (insert (concat " " octave-continuation-string)))) 1011 (insert (concat " " octave-continuation-string))))
1012
1013(defun octave-sync-function-file-names ()
1014 "Ensure function name agree with function file name.
1015See Info node `(octave)Function Files'."
1016 (interactive)
1017 (save-excursion
1018 (when (and buffer-file-name
1019 (prog2
1020 (goto-char (point-min))
1021 (equal (funcall smie-forward-token-function) "function")
1022 (forward-word -1)))
1023 (let ((file (file-name-sans-extension
1024 (file-name-nondirectory buffer-file-name)))
1025 (func (and (re-search-forward octave-function-header-regexp nil t)
1026 (match-string 3))))
1027 (when (and func
1028 (not (equal file func))
1029 (yes-or-no-p
1030 "Function name different from file name. Fix? "))
1031 (replace-match file nil nil nil 3))))))
1032
1010 1033
1011;;; Indentation 1034;;; Indentation
1012 1035
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 76ffeaf30be..c8bafd8176a 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -444,7 +444,8 @@ If you want to remember a region, supply a universal prefix to
444 444
445(defun remember-store-in-files () 445(defun remember-store-in-files ()
446 "Store remember data in a file in `remember-data-directory'. 446 "Store remember data in a file in `remember-data-directory'.
447The file is named after `remember-directory-file-name-format'." 447The file is named after `remember-directory-file-name-format' fed through
448`format-time-string'."
448 (let ((name (format-time-string 449 (let ((name (format-time-string
449 remember-directory-file-name-format (current-time))) 450 remember-directory-file-name-format (current-time)))
450 (text (buffer-string))) 451 (text (buffer-string)))