diff options
| author | Stefan Monnier | 2009-11-10 21:22:57 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-11-10 21:22:57 +0000 |
| commit | af98fc7f9aeb39902dfbe48cdf77b6f2dd8f2227 (patch) | |
| tree | 4f134b4479b83561ceb380f88c7307c39b9331bf /src/fns.c | |
| parent | e90292a90cdb9a3b4d28b21db39f5f44ad3de805 (diff) | |
| download | emacs-af98fc7f9aeb39902dfbe48cdf77b6f2dd8f2227.tar.gz emacs-af98fc7f9aeb39902dfbe48cdf77b6f2dd8f2227.zip | |
(Fplist_get): Merge the active and the uncommented code.
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 39 |
1 files changed, 7 insertions, 32 deletions
| @@ -1927,38 +1927,6 @@ merge (org_l1, org_l2, pred) | |||
| 1927 | } | 1927 | } |
| 1928 | 1928 | ||
| 1929 | 1929 | ||
| 1930 | #if 0 /* Unsafe version. */ | ||
| 1931 | DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, | ||
| 1932 | doc: /* Extract a value from a property list. | ||
| 1933 | PLIST is a property list, which is a list of the form | ||
| 1934 | \(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value | ||
| 1935 | corresponding to the given PROP, or nil if PROP is not | ||
| 1936 | one of the properties on the list. */) | ||
| 1937 | (plist, prop) | ||
| 1938 | Lisp_Object plist; | ||
| 1939 | Lisp_Object prop; | ||
| 1940 | { | ||
| 1941 | Lisp_Object tail; | ||
| 1942 | |||
| 1943 | for (tail = plist; | ||
| 1944 | CONSP (tail) && CONSP (XCDR (tail)); | ||
| 1945 | tail = XCDR (XCDR (tail))) | ||
| 1946 | { | ||
| 1947 | if (EQ (prop, XCAR (tail))) | ||
| 1948 | return XCAR (XCDR (tail)); | ||
| 1949 | |||
| 1950 | /* This function can be called asynchronously | ||
| 1951 | (setup_coding_system). Don't QUIT in that case. */ | ||
| 1952 | if (!interrupt_input_blocked) | ||
| 1953 | QUIT; | ||
| 1954 | } | ||
| 1955 | |||
| 1956 | CHECK_LIST_END (tail, prop); | ||
| 1957 | |||
| 1958 | return Qnil; | ||
| 1959 | } | ||
| 1960 | #endif | ||
| 1961 | |||
| 1962 | /* This does not check for quits. That is safe since it must terminate. */ | 1930 | /* This does not check for quits. That is safe since it must terminate. */ |
| 1963 | 1931 | ||
| 1964 | DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, | 1932 | DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, |
| @@ -1984,6 +1952,13 @@ properties on the list. This function never signals an error. */) | |||
| 1984 | halftail = XCDR (halftail); | 1952 | halftail = XCDR (halftail); |
| 1985 | if (EQ (tail, halftail)) | 1953 | if (EQ (tail, halftail)) |
| 1986 | break; | 1954 | break; |
| 1955 | |||
| 1956 | #if 0 /* Unsafe version. */ | ||
| 1957 | /* This function can be called asynchronously | ||
| 1958 | (setup_coding_system). Don't QUIT in that case. */ | ||
| 1959 | if (!interrupt_input_blocked) | ||
| 1960 | QUIT; | ||
| 1961 | #endif | ||
| 1987 | } | 1962 | } |
| 1988 | 1963 | ||
| 1989 | return Qnil; | 1964 | return Qnil; |