aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2012-02-07 14:34:52 +0800
committerChong Yidong <[email protected]>2012-02-07 14:34:52 +0800
commit0992bd9c06b90c8f316187467bcc005cbe51050e (patch)
tree8dc76890f747f5aaccd2e2754fad74616c7d18bf
parent75ded89ba50f0b1758fe5c70701e0ae422b0c497 (diff)
Fix and doc-fix for `buffer-local-variables'.
* src/buffer.c (Fbuffer_local_variables) (buffer_lisp_local_variables): Handle unbound vars correctly; don't let Qunbound leak into Lisp. * doc/lispref/variables.texi (Creating Buffer-Local): Minor clarification to buffer-local-variables doc. Fixes: debbugs:10715
-rw-r--r--admin/notes/bugtracker11
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/variables.texi11
-rw-r--r--src/ChangeLog6
-rw-r--r--src/buffer.c14
5 files changed, 38 insertions, 9 deletions
diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker
index dd1ea46ceb..3c24212ea1 100644
--- a/admin/notes/bugtracker
+++ b/admin/notes/bugtracker
@@ -640,3 +640,14 @@ I think you also have to add them to 'tags' and 'tags_single_letter'
in /usr/share/perl5/Debbugs/Config.pm.
And update /var/www/Developer.html with a description of what the tag means.
And the "valid tags" list in /var/www/index.html.
+
+** Backups
+
+The FSF sysadmins handle multi-generational backups of the filesystem
+on debbugs.gnu.org. But if you really want to have your own backup of
+the bug database, you can use rsync (this requires login access to
+debbugs.gnu.org):
+
+ rsync -azvv -e ssh [email protected]:/var/lib/debbugs/ DEST
+
+Note that this occupies well over 1G of disk space.
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 1a7c71232c..04d1234be0 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-07 Chong Yidong <[email protected]>
+
+ * variables.texi (Creating Buffer-Local): Minor clarification
+ to buffer-local-variables doc (Bug#10715).
+
2012-02-07 Glenn Morris <[email protected]>
* display.texi (ImageMagick Images): General update.
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index bdb16cd10a..ab3a4edc0a 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1317,11 +1317,12 @@ value (@pxref{Default Value}) of @var{variable} instead.
@defun buffer-local-variables &optional buffer
This function returns a list describing the buffer-local variables in
-buffer @var{buffer}. (If @var{buffer} is omitted, the current buffer is
-used.) It returns an association list (@pxref{Association Lists}) in
-which each element contains one buffer-local variable and its value.
-However, when a variable's buffer-local binding in @var{buffer} is void,
-then the variable appears directly in the resulting list.
+buffer @var{buffer}. (If @var{buffer} is omitted, the current buffer
+is used.) Normally, each list element has the form
+@w{@code{(@var{sym} . @var{val})}}, where @var{sym} is a buffer-local
+variable (a symbol) and @var{val} is its buffer-local value. But when
+a variable's buffer-local binding in @var{buffer} is void, its list
+element is just @var{sym}.
@example
@group
diff --git a/src/ChangeLog b/src/ChangeLog
index 5e4d995d85..71af862cda 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-07 Chong Yidong <[email protected]>
+
+ * buffer.c (Fbuffer_local_variables)
+ (buffer_lisp_local_variables): Handle unbound vars correctly;
+ don't let Qunbound leak into Lisp.
+
2012-02-07 Glenn Morris <[email protected]>
* image.c (Fimagemagick_types): Doc fix.
diff --git a/src/buffer.c b/src/buffer.c
index 01418956c8..a6f61a1936 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1022,7 +1022,10 @@ buffer_lisp_local_variables (struct buffer *buf)
if (buf != current_buffer)
val = XCDR (elt);
- result = Fcons (Fcons (XCAR (elt), val), result);
+ result = Fcons (EQ (val, Qunbound)
+ ? XCAR (elt)
+ : Fcons (XCAR (elt), val),
+ result);
}
return result;
@@ -1064,9 +1067,12 @@ No argument or nil as argument means use current buffer as BUFFER. */)
idx = PER_BUFFER_IDX (offset);
if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx))
&& SYMBOLP (PER_BUFFER_SYMBOL (offset)))
- result = Fcons (Fcons (PER_BUFFER_SYMBOL (offset),
- PER_BUFFER_VALUE (buf, offset)),
- result);
+ {
+ Lisp_Object sym = PER_BUFFER_SYMBOL (offset);
+ Lisp_Object val = PER_BUFFER_VALUE (buf, offset);
+ result = Fcons (EQ (val, Qunbound) ? sym : Fcons (sym, val),
+ result);
+ }
}
}