summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/emacs-lisp/tabulated-list.el5
-rw-r--r--lisp/erc/ChangeLog9
-rw-r--r--lisp/erc/erc-track.el2
-rw-r--r--lisp/gnus/ChangeLog7
-rw-r--r--lisp/gnus/gnus-start.el33
-rw-r--r--lisp/progmodes/elisp-mode.el13
7 files changed, 73 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 055ec17160e..80157c67704 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
+2014-10-15 Eli Zaretskii <eliz@gnu.org>
+
+ * emacs-lisp/tabulated-list.el (tabulated-list-mode): Force
+ bidi-paragraph-direction to 'left-to-right'. This fixes
+ buffer-menu display when the first buffer happens to start with
+ R2L letter.
+
+2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/elisp-mode.el (elisp--local-variables-1):
+ Handle quoted expressions (bug#18688).
+
2014-10-14 Jérémy Compostella <jeremy.compostella@intel.com>
Michael Albinus <michael.albinus@gmx.de>
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 3ee261aa06b..1e613c7fd4e 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -519,7 +519,10 @@ as the ewoc pretty-printer."
(setq-local buffer-read-only t)
(setq-local buffer-undo-list t)
(setq-local revert-buffer-function #'tabulated-list-revert)
- (setq-local glyphless-char-display tabulated-list-glyphless-char-display))
+ (setq-local glyphless-char-display tabulated-list-glyphless-char-display)
+ ;; Avoid messing up the entries' display just because the first
+ ;; column of the first entry happens to begin with a R2L letter.
+ (setq bidi-paragraph-direction 'left-to-right))
(put 'tabulated-list-mode 'mode-class 'special)
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 0833bda4cb1..c12f289ce0f 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-15 Ivan Shmakov <ivan@siamics.net>
+
+ * erc-track.el (erc-modified-channels-display): Update mode line
+ more frequently (bug#18510).
+
2014-10-10 Kelvin White <kwhite@gnu.org>
* erc.el (erc-initialize-log-marker): Only initialize
@@ -434,9 +439,9 @@
2011-11-28 Mike Kazantsev <mk.fraggod@gmail.com> (tiny change)
- * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Updated regexp to
+ * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Update regexp to
match quoted filenames with spaces inside.
- (erc-dcc-handle-ctcp-send): Updated regexp match group numbers,
+ (erc-dcc-handle-ctcp-send): Update regexp match group numbers,
added processing of escaped quotes and backslashes if filename
itself was in quotes.
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 706cce2fefe..47e76c3ea1e 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -860,7 +860,7 @@ Use `erc-make-mode-line-buffer-name' to create buttons."
faces (cdr faces)))
strings)))
(newobject (erc-modified-channels-object strings)))
- (unless (equal oldobject newobject)
+ (unless (equal-including-properties oldobject newobject)
(setq erc-modified-channels-object newobject)
(force-mode-line-update t)))))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 6c59200dfa6..30eda3d2bf0 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-14 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-start.el (gnus-save-newsrc-file-check-timestamp): New option to
+ check the newsrc.eld file's timestamp before saving it.
+ (gnus-save-newsrc-file): Use it, with a prompt when the newsrc.eld
+ timestamp has changed to be newer.
+
2014-10-06 Jan Tatarik <jan.tatarik@gmail.com>
* gnus-icalendar.el (gnus-icalendar-identities):
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 766e7c26ac4..5b734d0ae77 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -442,6 +442,14 @@ See also `gnus-before-startup-hook'."
:group 'gnus-newsrc
:type 'hook)
+(defcustom gnus-save-newsrc-file-check-timestamp nil
+ "Check the modification time of the newsrc.eld file before saving it.
+When the newsrc.eld file is updated by multiple machines,
+checking the file's modification time is a good way to avoid
+overwriting updated data."
+ :group 'gnus-newsrc
+ :type 'boolean)
+
(defcustom gnus-save-newsrc-hook nil
"A hook called before saving any of the newsrc files."
:group 'gnus-newsrc
@@ -2783,6 +2791,7 @@ If FORCE is non-nil, the .newsrc file is read."
'msdos-long-file-names
(lambda () t))))
+(defvar gnus-save-newsrc-file-last-timestamp nil)
(defun gnus-save-newsrc-file (&optional force)
"Save .newsrc file."
;; Note: We cannot save .newsrc file if all newsgroups are removed
@@ -2821,12 +2830,30 @@ If FORCE is non-nil, the .newsrc file is read."
(erase-buffer)
(gnus-message 5 "Saving %s.eld..." gnus-current-startup-file)
+ ;; check timestamp of `gnus-current-startup-file'.eld against
+ ;; `gnus-save-newsrc-file-last-timestamp'
+ (when gnus-save-newsrc-file-check-timestamp
+ (let* ((checkfile (concat gnus-current-startup-file ".eld"))
+ (mtime (nth 5 (file-attributes checkfile))))
+ (when (and gnus-save-newsrc-file-last-timestamp
+ (time-less-p gnus-save-newsrc-file-last-timestamp
+ mtime))
+ (unless (y-or-n-p
+ (format "%s was updated externally after %s, save?"
+ checkfile
+ (format-time-string
+ "%c"
+ gnus-save-newsrc-file-last-timestamp)))
+ (error "Couldn't save %s: updated externally" checkfile)))))
+
(if gnus-save-startup-file-via-temp-buffer
(let ((coding-system-for-write gnus-ding-file-coding-system)
(standard-output (current-buffer)))
(gnus-gnus-to-quick-newsrc-format)
(gnus-run-hooks 'gnus-save-quick-newsrc-hook)
- (save-buffer))
+ (save-buffer)
+ (setq gnus-save-newsrc-file-last-timestamp
+ (nth 5 (file-attributes buffer-file-name))))
(let ((coding-system-for-write gnus-ding-file-coding-system)
(version-control gnus-backup-startup-file)
(startup-file (concat gnus-current-startup-file ".eld"))
@@ -2861,7 +2888,9 @@ If FORCE is non-nil, the .newsrc file is read."
;; Replace the existing startup file with the temp file.
(rename-file working-file startup-file t)
- (gnus-set-file-modes startup-file setmodes)))
+ (gnus-set-file-modes startup-file setmodes)
+ (setq gnus-save-newsrc-file-last-timestamp
+ (nth 5 (file-attributes startup-file)))))
(condition-case nil
(delete-file working-file)
(file-error nil)))))
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index f3143bd76ee..900e859b54a 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -255,18 +255,27 @@ Blank lines separate paragraphs. Semicolons start comments.
(dolist (binding bindings)
(push (or (car-safe binding) binding) vars))
(elisp--local-variables-1 vars (car (last body)))))
- (`(lambda ,_) (setq sexp nil))
+ (`(lambda ,_args)
+ ;; FIXME: Look for the witness inside `args'.
+ (setq sexp nil))
(`(lambda ,args . ,body)
(elisp--local-variables-1
- (append args vars) (car (last body))))
+ (append (remq '&optional (remq '&rest args)) vars)
+ (car (last body))))
(`(condition-case ,_ ,e) (elisp--local-variables-1 vars e))
(`(condition-case ,v ,_ . ,catches)
(elisp--local-variables-1
(cons v vars) (cdr (car (last catches)))))
+ (`(quote . ,_)
+ ;; FIXME: Look for the witness inside sexp.
+ (setq sexp nil))
+ ;; FIXME: Handle `cond'.
(`(,_ . ,_)
(elisp--local-variables-1 vars (car (last sexp))))
(`elisp--witness--lisp (or vars '(nil)))
(_ nil)))
+ ;; We didn't find the witness in the last element so we try to
+ ;; backtrack to the last-but-one.
(setq sexp (ignore-errors (butlast sexp)))))
res))