diff options
| author | Gerd Moellmann | 2001-04-09 15:10:30 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-04-09 15:10:30 +0000 |
| commit | 2d6fabfcdc03989dcd65f9aaa4da221ac070655b (patch) | |
| tree | b1d7cf161801c827961c9c40034562fd8aa069cf | |
| parent | 8d066ddc019f7184f19f9da878a9e90923b92ea6 (diff) | |
| download | emacs-2d6fabfcdc03989dcd65f9aaa4da221ac070655b.tar.gz emacs-2d6fabfcdc03989dcd65f9aaa4da221ac070655b.zip | |
(Fplist_get, Fplist_put): Add QUITs.
| -rw-r--r-- | src/fns.c | 23 |
1 files changed, 15 insertions, 8 deletions
| @@ -1852,8 +1852,8 @@ merge (org_l1, org_l2, pred) | |||
| 1852 | tail = tem; | 1852 | tail = tem; |
| 1853 | } | 1853 | } |
| 1854 | } | 1854 | } |
| 1855 | |||
| 1856 | 1855 | ||
| 1856 | |||
| 1857 | DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, | 1857 | DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, |
| 1858 | "Extract a value from a property list.\n\ | 1858 | "Extract a value from a property list.\n\ |
| 1859 | PLIST is a property list, which is a list of the form\n\ | 1859 | PLIST is a property list, which is a list of the form\n\ |
| @@ -1862,16 +1862,22 @@ corresponding to the given PROP, or nil if PROP is not\n\ | |||
| 1862 | one of the properties on the list.") | 1862 | one of the properties on the list.") |
| 1863 | (plist, prop) | 1863 | (plist, prop) |
| 1864 | Lisp_Object plist; | 1864 | Lisp_Object plist; |
| 1865 | register Lisp_Object prop; | 1865 | Lisp_Object prop; |
| 1866 | { | 1866 | { |
| 1867 | register Lisp_Object tail; | 1867 | Lisp_Object tail; |
| 1868 | for (tail = plist; !NILP (tail); tail = Fcdr (XCDR (tail))) | 1868 | |
| 1869 | for (tail = plist; | ||
| 1870 | CONSP (tail) && CONSP (XCDR (tail)); | ||
| 1871 | tail = XCDR (XCDR (tail))) | ||
| 1869 | { | 1872 | { |
| 1870 | register Lisp_Object tem; | 1873 | if (EQ (prop, XCAR (tail))) |
| 1871 | tem = Fcar (tail); | 1874 | return XCAR (XCDR (tail)); |
| 1872 | if (EQ (prop, tem)) | 1875 | QUIT; |
| 1873 | return Fcar (XCDR (tail)); | ||
| 1874 | } | 1876 | } |
| 1877 | |||
| 1878 | if (!NILP (tail)) | ||
| 1879 | wrong_type_argument (Qlistp, prop); | ||
| 1880 | |||
| 1875 | return Qnil; | 1881 | return Qnil; |
| 1876 | } | 1882 | } |
| 1877 | 1883 | ||
| @@ -1910,6 +1916,7 @@ The PLIST is modified by side effects.") | |||
| 1910 | return plist; | 1916 | return plist; |
| 1911 | } | 1917 | } |
| 1912 | prev = tail; | 1918 | prev = tail; |
| 1919 | QUIT; | ||
| 1913 | } | 1920 | } |
| 1914 | newcell = Fcons (prop, Fcons (val, Qnil)); | 1921 | newcell = Fcons (prop, Fcons (val, Qnil)); |
| 1915 | if (NILP (prev)) | 1922 | if (NILP (prev)) |